mcp-client-langchain-py
A simple text-based Python CLI, built on LangChain's ReAct agent, for testing and exploring Model Context Protocol servers from the command line, configured through a JSON5 file listing servers and their LLM provider.
mcp-client-langchain-py is a minimal command-line client for trying out MCP servers without writing integration code. It wires a LangChain ReAct agent to any configured MCP servers through the langchain-mcp-tools utility function convert_mcp_to_langchain_tools, and supports both local, package-run servers and remote URL-based servers, logging local server stdio output to a configurable directory.
Configuration lives in a JSON5 file, llm_mcp_config.json5, that lists the MCP servers to connect and which LLM provider to use, with support for OpenAI, Anthropic, Google AI Studio, xAI, Cerebras and Groq; API keys are read from environment variables or a .env file. The tool installs as the mcp-chat command through pip and is explicitly scoped as a testing and prototyping aid rather than a production client: it currently supports MCP protocol version 2025-03-26, not the newer 2026-07-28 specification, and only text tool-call results are handled.
A TypeScript equivalent of the same utility and CLI is maintained as a separate, sibling project.