HomeSecurity › OPA MCP

OPA MCP

Author, validate, debug, and explain OPA Rego policies through any MCP-compatible client.

TypeScript CloudLocal macOSWindowsLinux
★ 8 stars Last pushed 2026-09-23 License: MIT

Topics: Security

Connect

Review any command before running it. Package names and URLs come from the server's own registry entry.

Package (npm 0.6.0)

npx -y @orygn/[email protected]

Or add to your MCP client config:

{
  "mcpServers": {
    "opa-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@orygn/[email protected]"
      ],
      "env": {
        "OPA_URL": "<YOUR_VALUE>",
        "OPA_TOKEN": "<YOUR_VALUE>",
        "OPA_BINARY": "<YOUR_VALUE>",
        "REGAL_BINARY": "<YOUR_VALUE>",
        "CONFTEST_BINARY": "<YOUR_VALUE>",
        "OPA_MCP_ALLOWED_PATHS": "<YOUR_VALUE>",
        "GITHUB_TOKEN": "<YOUR_VALUE>"
      }
    }
  }
}
  • OPA_URL — Base URL of a running OPA server. Required only for opa_* runtime tools, not for rego_* language tools.
  • OPA_TOKEN secret — Bearer token for OPA running with --authentication=token.
  • OPA_BINARY — Path to the opa binary. Defaults to 'opa' on PATH.
  • REGAL_BINARY — Path to the regal binary (optional; used by rego_lint, rego_security_audit and rego_fix). Defaults to 'regal' on PATH.
  • CONFTEST_BINARY — Path to the conftest binary (optional, used by conftest_* tools). Defaults to 'conftest' on PATH.
  • OPA_MCP_ALLOWED_PATHS — Comma-separated list of root directories tools may read/write. When unset, file-based tools refuse to access the disk.
  • GITHUB_TOKEN secret — GitHub personal access token with the "gist" scope. Required only for rego_playground_share.

Package (oci)

docker run -i --rm docker.io/orygn/opa-mcp:0.6.0

Or add to your MCP client config:

{
  "mcpServers": {
    "opa-mcp-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/orygn/opa-mcp:0.6.0"
      ],
      "env": {
        "OPA_URL": "<YOUR_VALUE>",
        "OPA_TOKEN": "<YOUR_VALUE>",
        "GITHUB_TOKEN": "<YOUR_VALUE>"
      }
    }
  }
}
  • OPA_URL — Base URL of a running OPA server.
  • OPA_TOKEN secret — Bearer token for OPA authentication.
  • GITHUB_TOKEN secret — GitHub personal access token with the "gist" scope. Required only for rego_playground_share.

Related servers

Listed in punkpeye/awesome-mcp-servers (MIT)

Data from the Official MCP Registry