Skip to content
MCP server
Registry

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.

by orygnscodeMITTypeScript9 stars
Trust score
44Fair
Trust score 44 of 100, Fair

Fair trust

44 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 44 comes from

0 + 20 + 7 + 10 + 4 + 3 = 44. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity7 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 7 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs3 / 10

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.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "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

NameRequiredNotes
OPA_URLOptionalBase URL of a running OPA server. Required only for opa_* runtime tools, not for rego_* language tools.
OPA_TOKENSecretOptionalBearer token for OPA running with --authentication=token.
OPA_BINARYOptionalPath to the opa binary. Defaults to 'opa' on PATH.
REGAL_BINARYOptionalPath to the regal binary (optional; used by rego_lint, rego_security_audit and rego_fix). Defaults to 'regal' on PATH.
CONFTEST_BINARYOptionalPath to the conftest binary (optional, used by conftest_* tools). Defaults to 'conftest' on PATH.
OPA_MCP_ALLOWED_PATHSOptionalComma-separated list of root directories tools may read/write. When unset, file-based tools refuse to access the disk.
GITHUB_TOKENSecretOptionalGitHub personal access token with the "gist" scope. Required only for rego_playground_share.
OPA_URLOptionalBase URL of a running OPA server.
OPA_TOKENSecretOptionalBearer token for OPA authentication.
GITHUB_TOKENSecretOptionalGitHub personal access token with the "gist" scope. Required only for rego_playground_share.

Tools40Tool docs quality grade C

All capabilities
  • Build a .tar.gz bundle from a policy directory. Supports optimize and revision.

  • Sign 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.

  • Server 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.

  • Delete a document from the data hierarchy.

  • Delete a policy by ID.

  • Batch-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.

  • Read a path from the data hierarchy.

  • Get a single policy by ID. Returns the Rego source; includeAst adds OPA's parsed AST.

  • Liveness / 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

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server