Skip to content
LangChain

contextbudget for LangChain

io.github.cloudcorprecords/contextbudget

Token budget auditor for agent context: per-file estimates, top offenders, exclusion advice.

client:LangChain transport:stdio runtime:npm

Install contextbudget in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

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

tools = await client.get_tools()

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

contextbudget in other clients