mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
docs(ecosystem): add OPA MCP (#8618)
Adds **OPA MCP** to the ecosystem listing. - **Repo:** https://github.com/OrygnsCode/opa-mcp-server - **npm:** https://www.npmjs.com/package/@orygn/opa-mcp - **Docker Hub:** https://hub.docker.com/r/orygn/opa-mcp OPA MCP is a Model Context Protocol server that gives MCP-compatible clients (Claude Desktop, Cursor, VS Code, Zed, Windsurf, etc.) a structured interface to Rego. It wraps the OPA CLI, the OPA REST API, and the Regal linter behind 32 schema-validated tools, plus higher-level helpers (`rego_explain_decision`, `rego_describe_policy`, `rego_generate_test_skeleton`, `rego_suggest_fix`) that compose the primitives into agent-friendly workflows. ## Files - `docs/src/data/ecosystem/entries/opa-mcp.md` — entry following the format of `vscode-opa.md` and `regal.md`. - `docs/static/img/ecosystem-entry-logos/opa-mcp.png` — 256×256 logo, ~55 KB. ## Labels - `category: tooling` - `layer: editor` ## docs_features `learning-rego`, `policy-testing`, `debugging-rego`, `editors` — all chosen from the existing taxonomy used by other entries. Signed-off-by: OrygnsCode <38231263+OrygnsCode@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: OPA MCP
|
||||
subtitle: Model Context Protocol server for authoring and debugging Rego
|
||||
labels:
|
||||
category: tooling
|
||||
layer: editor
|
||||
inventors:
|
||||
- independent
|
||||
code:
|
||||
- https://github.com/OrygnsCode/opa-mcp-server
|
||||
docs_features:
|
||||
learning-rego:
|
||||
note: |
|
||||
OPA MCP exposes higher-level helpers (rego_describe_policy,
|
||||
rego_suggest_fix, rego_explain_decision) that compose opa fmt,
|
||||
opa parse, and opa eval into AI-friendly tools. Agents in any MCP
|
||||
client (Claude Desktop, Cursor, VS Code, Zed) can author, format,
|
||||
and review Rego with structured output instead of free-form CLI text.
|
||||
policy-testing:
|
||||
note: |
|
||||
The rego_test tool runs opa test over a directory and returns
|
||||
pass/fail per test with optional coverage. rego_generate_test_skeleton
|
||||
produces a _test.rego scaffold covering each rule in a policy.
|
||||
debugging-rego:
|
||||
note: |
|
||||
rego_explain_decision wraps opa eval --explain=full and returns a
|
||||
structured trace, letting agents answer "why was this rejected"
|
||||
without reading raw traces. rego_eval_with_profile and
|
||||
rego_eval_with_coverage surface hot rules and per-line coverage.
|
||||
editors:
|
||||
note: |
|
||||
OPA MCP is a stdio MCP server that plugs into any MCP-compatible
|
||||
client. One-line Smithery install for Claude Desktop, drop-in
|
||||
configs for Cursor, VS Code, Zed, and Windsurf. Multi-arch Docker
|
||||
image and a signed .mcpb bundle are also published.
|
||||
---
|
||||
|
||||
OPA MCP is a Model Context Protocol server that gives MCP-compatible
|
||||
clients a structured interface to Rego. It wraps the OPA CLI (opa fmt,
|
||||
opa check, opa eval, opa test, opa build, opa sign), the OPA REST API,
|
||||
and the Regal linter, exposing 32 tools with stable error codes and
|
||||
schema-validated input/output.
|
||||
|
||||
Higher-level helpers (rego_explain_decision, rego_describe_policy,
|
||||
rego_generate_test_skeleton, rego_suggest_fix) compose the primitives
|
||||
into the tasks agents typically perform. A curated resource set exposes
|
||||
the OPA built-in function catalog, the Rego style guide, and a pattern
|
||||
library covering RBAC, ABAC, Kubernetes admission, IaC gates, API
|
||||
authorization, and rate limiting.
|
||||
|
||||
Distributed via npm (@orygn/opa-mcp), Docker Hub (orygn/opa-mcp), and a
|
||||
signed .mcpb bundle.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
Reference in New Issue
Block a user