Skip to content
LangChain

inference.sh for LangChain

ac.inference.sh/mcp

run any ai model. compose agents, stack knowledge, connect tools. one api, pay per run.

client:LangChain transport:streamable-http

Install inference.sh in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "mcp": {
            "transport": "streamable_http",
            "url": "https://api.inference.sh/mcp",
        }
})

tools = await client.get_tools()

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

inference.sh in other clients