opa-mcp

mheers/opa-mcp

3.2

If you are the rightful owner of opa-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The OPA MCP server exposes a rego language server for Model Context Protocol (MCP), enabling advanced policy management and diagnostics.

Tools
  1. mcp-language-server

    A language server for MCP that supports rego language.

  2. regal

    A tool from StyraInc for policy analysis and diagnostics.

OPA MCP

Exposes a rego language server for MCP

Pre-requisites

Install mcp language server:

go install github.com/isaacphi/mcp-language-server@latest

Install regal from github.com/StyraInc/regal

Code Guidelines

This project follows the coding guidelines specified in .github/copilot-instructions.md. These guidelines ensure consistent code generation and AI-assisted development practices across the codebase.

Demo queries

  • whats the definition of amount_allowed?
  • give me diagnostics of the simple.rego file
  • display the metadata and documentation of amount_allowed

Problems

  • rename all symbols from "allow" to "allowed"
    • method not supported: textDocument/references (code: -32601)
  • give me all references of the "user" function
    • method not supported: textDocument/references (code: -32601)