Skip to content
LangChain

anchor x402 for LangChain

io.github.hypeprinter007-stack/anchor-x402

x402-paid agent tools: 18 over HTTP, 14 over stdio. USDC per call, no API key.

client:LangChain transport:streamable-http runtime:npm tools:18

Install anchor x402 in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "anchor-x402": {
            "transport": "streamable_http",
            "url": "https://api.anchor-x402.com/mcp",
        }
})

tools = await client.get_tools()

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

What LangChain can do once it is connected

anchor x402 in other clients