OPA MCP
An open-source Model Context Protocol server that allows AI agents to author, validate, debug, and explain Open Policy Agent (OPA) Rego policies. It provides over 50 tools for policy evaluation, bundle operations, server management, and Conftest configuration testing, bundling the OPA binary for ease of use.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Author and edit Rego policies
- Validate and debug policy logic
- Explain policy decisions and traces
- Run Conftest configuration tests
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
@orygn/opa-mcp 0.9.1
{
"version": "0.9.1",
"transport": "stdio",
"identifier": "@orygn/opa-mcp",
"runtimeHint": "npx",
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"environmentVariables": [
{
"name": "OPA_URL",
"default": "http://localhost:8181",
"description": "Base URL of a running OPA server. Required only for opa_* runtime tools, not for rego_* language tools."
},
{
"name": "OPA_TOKEN",
"description": "Bearer token for OPA running with --authentication=token."
},
{
"name": "OPA_BINARY",
"default": "opa",
"description": "Path to the opa binary. Defaults to 'opa' on PATH."
},
{
"name": "REGAL_BINARY",
"default": "regal",
"description": "Path to the regal binary (optional; used by rego_lint, rego_security_audit and rego_fix). Defaults to 'regal' on PATH."
},
{
"name": "CONFTEST_BINARY",
"default": "conftest",
"description": "Path to the conftest binary (optional, used by conftest_* tools). Defaults to 'conftest' on PATH."
},
{
"name": "OPA_MCP_ALLOWED_PATHS",
"description": "Comma-separated list of root directories tools may read/write. When unset, file-based tools refuse to access the disk."
},
{
"name": "GITHUB_TOKEN",
"description": "GitHub personal access token with the \"gist\" scope. Required only for rego_playground_share."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"opa-mcp": {
"command": "npx",
"args": [
"-y",
"@orygn/opa-mcp@0.9.1"
],
"env": {
"OPA_URL": "<YOUR_OPA_URL>",
"OPA_TOKEN": "<YOUR_OPA_TOKEN>",
"OPA_BINARY": "<YOUR_OPA_BINARY>",
"REGAL_BINARY": "<YOUR_REGAL_BINARY>",
"CONFTEST_BINARY": "<YOUR_CONFTEST_BINARY>",
"OPA_MCP_ALLOWED_PATHS": "<YOUR_OPA_MCP_ALLOWED_PATHS>",
"GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
}
}
}
}Cline
{
"mcpServers": {
"opa-mcp": {
"command": "npx",
"args": [
"-y",
"@orygn/opa-mcp@0.9.1"
],
"env": {
"OPA_URL": "<YOUR_OPA_URL>",
"OPA_TOKEN": "<YOUR_OPA_TOKEN>",
"OPA_BINARY": "<YOUR_OPA_BINARY>",
"REGAL_BINARY": "<YOUR_REGAL_BINARY>",
"CONFTEST_BINARY": "<YOUR_CONFTEST_BINARY>",
"OPA_MCP_ALLOWED_PATHS": "<YOUR_OPA_MCP_ALLOWED_PATHS>",
"GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
}
}
}
}VS Code
{
"servers": {
"opa-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@orygn/opa-mcp@0.9.1"
],
"env": {
"OPA_URL": "<YOUR_OPA_URL>",
"OPA_TOKEN": "<YOUR_OPA_TOKEN>",
"OPA_BINARY": "<YOUR_OPA_BINARY>",
"REGAL_BINARY": "<YOUR_REGAL_BINARY>",
"CONFTEST_BINARY": "<YOUR_CONFTEST_BINARY>",
"OPA_MCP_ALLOWED_PATHS": "<YOUR_OPA_MCP_ALLOWED_PATHS>",
"GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"opa-mcp": {
"command": "npx",
"args": [
"-y",
"@orygn/opa-mcp@0.9.1"
],
"env": {
"OPA_URL": "<YOUR_OPA_URL>",
"OPA_TOKEN": "<YOUR_OPA_TOKEN>",
"OPA_BINARY": "<YOUR_OPA_BINARY>",
"REGAL_BINARY": "<YOUR_REGAL_BINARY>",
"CONFTEST_BINARY": "<YOUR_CONFTEST_BINARY>",
"OPA_MCP_ALLOWED_PATHS": "<YOUR_OPA_MCP_ALLOWED_PATHS>",
"GITHUB_TOKEN": "<YOUR_GITHUB_TOKEN>"
}
}
}
}Let your agent find its tools
Find servers like OPA MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.