Simple MCP Client to Explore MCP Servers
Quickly test and explore MCP servers from the command line!
A simple, text-based CLI client for Model Context Protocol (MCP) servers built with LangChain and Python.
Suitable for testing MCP servers, exploring their capabilities, and prototyping integrations.
Internally it uses LangChain ReAct Agent and
a utility function convert_mcp_to_langchain_tools()
from langchain_mcp_tools
.
A TypeScript equivalent of this utility is available here
Prerequisites
- Python 3.11+
- [optional]
uv
(uvx
) installed to run Python package-based MCP servers - [optional] npm 7+ (
npx
) to run Node.js package-based MCP servers - LLM API key(s) from OpenAI, Anthropic, Google AI Studio (for GenAI/Gemini), xAI, Cerebras, and/or Groq, as needed
Quick Start
- Install
mcp-chat
tool. This can take up to a few minutes to complete: - Configure LLM and MCP Servers settings via the configuration file,
llm_mcp_config.json5
The following is a simple configuration for quick testing: - Set up API keys
- Run the toolBy default, it reads the configuration file,
llm_mcp_config.json5
, from the current directory.
Then, it applies the environment variables specified in the.env
file, as well as the ones that are already defined.
Building from Source
See README_DEV.md for details.
Features
- Easy setup: Works out of the box with popular MCP servers
- Flexible configuration: JSON5 config with environment variable support
- Multiple LLM/API providers: OpenAI, Anthropic, Google (GenAI), xAI, Ceberas, Groq
- Command & URL servers: Support for both local and remote MCP servers
- Local MCP Server logging: Save stdio MCP server logs with customizable log directory
- Interactive testing: Example queries for the convenience of repeated testing
Limitations
- Tool Return Types: Currently, only text results of tool calls are supported.
It uses LangChain's
response_format: 'content'
(the default) internally, which only supports text strings. While MCP tools can return multiple content types (text, images, etc.), this library currently filters and uses only text content. - MCP Features: Only MCP Tools are supported. Other MCP features like Resources, Prompts, and Sampling are not implemented.
Usage
Basic Usage
By default, it reads the configuration file, llm_mcp_config.json5
, from the current directory.
Then, it applies the environment variables specified in the .env
file,
as well as the ones that are already defined.
It outputs local MCP server logs to the current directory.
With Options
Supported Model/API Providers
- OpenAI:
gpt-4o
,gpt-4o-mini
, etc. - Anthropic:
claude-sonnet-4-0
,claude-3-5-haiku-latest
, etc. - Google (GenAI):
gemini-2.0-flash
,gemini-1.5-pro
, etc. - xAI:
grok-3-mini
,grok-4
, etc. - Cerebras:
gpt-oss-120b
, etc. - Groq:
openai/gpt-oss-20b
,openai/gpt-oss-120b
, etc.
Configuration
Create a llm_mcp_config.json5
file:
- The configuration file format
for MCP servers follows the same structure as
Claude for Desktop,
with one difference: the key name
mcpServers
has been changed tomcp_servers
to follow the snake_case convention commonly used in JSON configuration files. - The file format is JSON5, where comments and trailing commas are allowed.
- The format is further extended to replace
${...}
notations with the values of corresponding environment variables. - Keep all the credentials and private info in the
.env
file and refer to them with${...}
notation as needed
Environment Variables
Create a .env
file for API keys:
Popular MCP Servers to Try
There are quite a few useful MCP servers already available:
Troubleshooting
- Make sure your configuration and .env files are correct, especially the spelling of the API keys
- Check the local MCP server logs
- Use
--verbose
flag to view the detailed logs - Refer to Debugging Section in MCP documentation
Change Log
Can be found here
License
MIT License - see LICENSE file for details.
Contributing
Issues and pull requests welcome! This tool aims to make MCP server testing as simple as possible.
This server cannot be installed
This server facilitates the invocation of AI models from providers like Anthropic, OpenAI, and Groq, enabling users to manage and configure large language model interactions seamlessly.
Related Resources
Related MCP Servers
- -securityFlicense-qualityThis server provides an API to query Large Language Models using context from local files, supporting various models and file types for context-aware responses.Last updated -1TypeScript
- -securityAlicense-qualityA server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.Last updated -313140TypeScriptMIT License
- -securityFlicense-qualityA server that provides rich UI context and interaction capabilities to AI models, enabling deep understanding of user interfaces through visual analysis and precise interaction via Model Context Protocol.Last updated -55Python
- -securityFlicense-qualityA server that allows AI agents to consult multiple large language models (like Grok, Gemini, Claude, GPT-4o) through Model Context Protocol for assistance and information.Last updated -4JavaScript
Appeared in Searches
- Information about modal concepts or elements
- Search for a creator named 'modelcontextprotocol'
- A server for Minecraft MCP gameplay or resources
- Resources and guidance for coding, developing, and training AI models
- Developing AI-Powered Mobile and Web Applications by Combining and Transferring Knowledge from Open Source AI Models