Skip to content
LangChain

mcp opa authz for LangChain

io.github.kanywst/mcp-opa-authz

Authorization answers from real policy code: evaluate Rego locally, or ask an AuthZEN 1.0 PDP.

client:LangChain transport:stdio runtime:oci

Install mcp opa authz in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "mcp-opa-authz": {
            "transport": "stdio",
            "command": "docker",
            "args": ["run", "-i", "--rm", "ghcr.io/kanywst/mcp-opa-authz:0.3.0"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

mcp opa authz in other clients