Skip to content
LangChain

smartpolicy for LangChain

io.github.smartpolicy-protocol/smartpolicy

Runtime authorization for AI agents and smart contracts via an immutable on-chain policy registry

client:LangChain transport:stdio runtime:npm

Install smartpolicy in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "smartpolicy": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "@smartpolicy/mcp"],
        }
})

tools = await client.get_tools()

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

smartpolicy in other clients