OPA MCP

io.github.OrygnsCode/opa-mcp

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

Connect this server

Add this to your MCP client config — claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor).Suits: Claude Desktop · Cursor.

{
  "mcpServers": {
    "opa-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@orygn/opa-mcp@0.9.1"
      ],
      "env": {
        "OPA_URL": "http://localhost:8181",
        "OPA_TOKEN": "<your OPA_TOKEN>",
        "OPA_BINARY": "opa",
        "REGAL_BINARY": "regal",
        "CONFTEST_BINARY": "conftest",
        "GITHUB_TOKEN": "<your GITHUB_TOKEN>"
      }
    }
  }
}
Environment variables
  • OPA_URLBase URL of a running OPA server. Required only for opa_* runtime tools, not for rego_* language tools.
  • OPA_TOKENsecretBearer token for OPA running with --authentication=token.
  • OPA_BINARYPath to the opa binary. Defaults to 'opa' on PATH.
  • REGAL_BINARYPath to the regal binary (optional; used by rego_lint, rego_security_audit and rego_fix). Defaults to 'regal' on PATH.
  • CONFTEST_BINARYPath to the conftest binary (optional, used by conftest_* tools). Defaults to 'conftest' on PATH.
  • GITHUB_TOKENsecretGitHub personal access token with the "gist" scope. Required only for rego_playground_share.

A starting point — check the repository for exact arguments and setup. Restart your client after editing the config.

Category
Developer Tools
Version
0.9.1
Registry
active
Published
10/23/2026
Browse all Developer Tools →

Add the badge to your site

Show visitors that OPA MCP is listed here — it’s also the link we check for a free listing.

OPA MCP — listed on Serverdex

HTML — for your website

<a href="https://serverdex.io/server/io-github-orygnscode-opa-mcp?utm_source=badge"><img src="https://serverdex.io/brand/badge.svg" alt="OPA MCP — listed on Serverdex" width="123" height="40" loading="lazy"></a>

Recommended. A dofollow link from your own domain is the one that counts for search engines, and it's the link we check for a free listing.

Markdown — for your README

[![OPA MCP — listed on Serverdex](https://serverdex.io/brand/badge.svg)](https://serverdex.io/server/io-github-orygnscode-opa-mcp?utm_source=badge)

Nice for visibility, but GitHub marks README links nofollow, so it doesn't pass authority. Use the HTML badge on your site as well.