MCP Chat is an open-source client designed for testing and evaluating Model Context Protocol (MCP) servers and agents. It provides both a command-line interface and a web interface for interacting with any MCP server, whether it's written in JavaScript, Python, or running in Docker. The tool allows developers to easily test their MCP implementations, debug tool calls, and interact with language models through a consistent interface.
MCP Chat is a versatile client for testing and evaluating Model Context Protocol (MCP) servers and agents. It provides both command-line and web interfaces to interact with any MCP server implementation, making it an essential tool for MCP server developers and users.
You can use MCP Chat directly via npx without installing it:
npx mcp-chat
Alternatively, you can install it globally:
npm install -g mcp-chat
To use MCP Chat, you need an Anthropic API key. You can set it as an environment variable or include it in a .env
file in your project root:
ANTHROPIC_API_KEY=your_api_key_here
You can get an API key by signing up at the Anthropic Console keys page.
MCP Chat can be used in interactive mode or to run single prompts:
npx mcp-chat --server "npx -y @modelcontextprotocol/server-filesystem /Users/$USER/Desktop"
This opens an interactive chat prompt where you can communicate with the model and use the specified MCP server.
npx mcp-chat --server "npx mcp-server-kubernetes" -p "List the pods in the default namespace"
This runs the prompt with the kubernetes MCP server and exits after receiving the response.
MCP Chat also offers a web interface:
npx mcp-chat --web
In web mode, you can:
Chats created via the web UI are saved to ~/.mcpchats/chats
, just like chats created via the CLI.
MCP Chat supports several configuration options:
You can specify a Claude desktop configuration file:
On macOS:
npx mcp-chat --config "~/Library/Application Support/Claude/claude_desktop_config.json"
On Windows:
npx mcp-chat --config "%APPDATA%\Claude\claude_desktop_config.json"
Choose a specific model with the -m
flag:
npx mcp-chat --server "npx mcp-server-kubernetes" -m "claude-3.5"
Currently, only Anthropic models are supported.
Set a custom system prompt with the --system
flag:
npx mcp-chat --system "Explain the output to the user in pirate speak." --server "npx mcp-server-kubernetes" -p "List the pods in the default namespace"
MCP Chat is particularly useful for testing MCP server implementations:
# Directly executing built script
npx mcp-chat --server "/path/to/mcp-server-kubernetes/dist/index.js"
# Using node / bun
npx mcp-chat --server "node /path/to/mcp-server-kubernetes/dist/index.js"
# Using uv
npx mcp-chat --server "uv --directory /path/to/mcp-server-weather/ run weather.py"
# Using python / python3
npx mcp-chat --server "/path/to/mcp-server-weather/weather.py"
MCP Chat includes the following features:
-p
-m
--system
~/.mcpchat/chats
~/.mcpchat/history
MCP Chat automatically saves your chat history, including all settings, in ~/.mcpchat/chats
. This applies to both CLI and web interface chats.
Command history is also saved in ~/.mcpchat/history
, allowing you to easily recall previous commands.