Back to MCP Catalog

Chat MCP Server

Developer ToolsTypeScript
A generic client for testing and evaluating MCP servers and agents

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.

Overview

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.

Installation

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

Usage

Basic Usage

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.

Command Line Interface

MCP Chat can be used in interactive mode or to run single prompts:

Interactive Mode with an MCP Server

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.

Running a Single Prompt

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.

Web Interface

MCP Chat also offers a web interface:

npx mcp-chat --web

In web mode, you can:

  • Start new chats
  • Send messages to the model
  • Dynamically configure MCP servers via the UI
  • View chat history

Chats created via the web UI are saved to ~/.mcpchats/chats, just like chats created via the CLI.

Configuration Options

MCP Chat supports several configuration options:

Using a Configuration File

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"

Selecting a Model

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.

Custom System Prompt

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"

For MCP Server Developers

MCP Chat is particularly useful for testing MCP server implementations:

Testing Node.js MCP Servers

# 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"

Testing Python MCP Servers

# 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"

Features

MCP Chat includes the following features:

  • Interactive CLI mode and direct prompt passing with -p
  • Web interface for chatting via a browser
  • Connection to any MCP server (JavaScript, Python, Docker)
  • Model selection with -m
  • Custom system prompts with --system
  • Chat history saved in ~/.mcpchat/chats
  • Command history saved in ~/.mcpchat/history
  • Tool call output and argument visualization for debugging

Saving and Restoring Chats

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.

Related MCPs

Apple Shortcuts
Developer ToolsJavaScript

Control Apple Shortcuts automations from AI assistants

Clojars Dependency Lookup
Developer ToolsJavaScript

Fetch dependency information from Clojars, the Clojure community's artifact repository

Simple Timeserver
Developer ToolsPython

Provides Claude with current time and timezone information

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.