Skip to content
LangChain

Spend Guard for LangChain

io.github.vulinh1704/spend-guard

Budgets, payee allowlists, price-spike checks and human approval for agents paying x402 paywalls

client:LangChain transport:stdio runtime:npm

Install Spend Guard in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

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

tools = await client.get_tools()

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

Spend Guard in other clients