
Model Context Protocol server for authoring and debugging Rego
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.