Skip to content
LangChain

cli2mcp for LangChain

io.github.ronieneubauer/cli2mcp

Wrap any CLI as a Model Context Protocol server - schema auto-inferred from --help.

client:LangChain transport:stdio runtime:npm

Install cli2mcp in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "cli2mcp": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "cli2mcp"],
        }
})

tools = await client.get_tools()

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

cli2mcp in other clients