OPA MCP Server
Author, validate, debug, and explain OPA Rego policies through any MCP-compatible client.
OPA MCP scores 44 (Fair), licensed MIT and written in TypeScript. It installs as a local process. It declares 40 tools. Filed under Developer tools. GitHub shows 9 stars. Package registries report about 172 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
44 of 100 from six public signals. Nobody can buy a point.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade B
70/100 for listing completeness. Lost points: no README, short summary.
How quality is graded
Where the 44 comes from
0 + 20 + 7 + 10 + 4 + 3 = 44. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 0 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 7 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 3 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "orygnscode-opa-mcp-server": { "command": "npx", "args": [ "-y", "@orygn/opa-mcp@0.12.0" ], "env": { "OPA_URL": "http://localhost:8181", "OPA_TOKEN": "YOUR_OPA_TOKEN", "OPA_BINARY": "opa", "REGAL_BINARY": "regal", "CONFTEST_BINARY": "conftest", "OPA_MCP_ALLOWED_PATHS": "", "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
OPA_URL | Optional | Base URL of a running OPA server. Required only for opa_* runtime tools, not for rego_* language tools. |
OPA_TOKENSecret | Optional | Bearer token for OPA running with --authentication=token. |
OPA_BINARY | Optional | Path to the opa binary. Defaults to 'opa' on PATH. |
REGAL_BINARY | Optional | Path to the regal binary (optional; used by rego_lint, rego_security_audit and rego_fix). Defaults to 'regal' on PATH. |
CONFTEST_BINARY | Optional | Path to the conftest binary (optional, used by conftest_* tools). Defaults to 'conftest' on PATH. |
OPA_MCP_ALLOWED_PATHS | Optional | Comma-separated list of root directories tools may read/write. When unset, file-based tools refuse to access the disk. |
GITHUB_TOKENSecret | Optional | GitHub personal access token with the "gist" scope. Required only for rego_playground_share. |
OPA_URL | Optional | Base URL of a running OPA server. |
OPA_TOKENSecret | Optional | Bearer token for OPA authentication. |
GITHUB_TOKENSecret | Optional | GitHub personal access token with the "gist" scope. Required only for rego_playground_share. |
Tools40Tool docs quality grade C
All capabilitiesopa_bundle_buildtoolBuild a .tar.gz bundle from a policy directory. Supports optimize and revision.
opa_bundle_signtoolSign a bundle directory in place with a private key; an archive is refused, since OPA reads the signature from inside it, and comes signed from opabundlebuild. A directory signature stays valid wherever the directory is placed under the sam
Verify a signed bundle with a public key through opa build --verification-key. Failures name the reason: wrong key, scope, modified, added, missing or unparseable file, unsigned, or a bundle that does not load.
Partially evaluate a query against the running server.
opa_configtoolServer configuration from GET /v1/config. OPA drops the credentials block but returns service headers verbatim, so header values are redacted here and the names kept.
opa_delete_datatoolDelete a document from the data hierarchy.
Delete a policy by ID.
opa_exectoolBatch-evaluate a decision against multiple input files. Returns per-file results with successCount and errorCount. dataPaths load as opa eval --data loads them; bundle takes a bundle.
opa_get_datatoolRead a path from the data hierarchy.
opa_get_policytoolGet a single policy by ID. Returns the Rego source; includeAst adds OPA's parsed AST.
opa_healthtoolLiveness / readiness check. A server that answers reports healthy: true or healthy: false with OPA's reason; OPAUNREACHABLE means it could not be reached at all.
List the policy IDs registered on the server, with a count. includeSource and includeAst add the Rego text or the parsed AST.
About
Model Context Protocol server for Open Policy Agent (OPA). Author, validate, debug, and explain Rego policies through any MCP-compatible client.
Frequently asked questions
What is OPA MCP Server?
Author, validate, debug, and explain OPA Rego policies through any MCP-compatible client.
How do I install OPA MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. OPA MCP Server runs locally from the npm package @orygn/opa-mcp with the command npx -y @orygn/opa-mcp@0.12.0.
Is OPA MCP Server free and open source?
Yes. OPA MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does OPA MCP Server support remote (HTTP) connections?
No remote endpoint is listed for OPA MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does OPA MCP Server provide?
OPA MCP Server provides 40 tools, including opa_bundle_build, opa_bundle_sign, opa_bundle_verify, and opa_compile_query. See the full tool list for descriptions and parameters.
How is OPA MCP Server's trust score calculated?
OPA MCP Server scores 44 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.