Skip to content
LangChain

ComparEdge LLM Cost for LangChain

io.github.imkemit-ops/comparedge-llm-cost

Token cost math for LLM API calls: verified per-1M-token rates for 69 models, 17 providers.

client:LangChain transport:stdio runtime:npm

Install ComparEdge LLM Cost in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

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

tools = await client.get_tools()

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

ComparEdge LLM Cost in other clients