what is MCP Client?
MCP Client is a command-line interface (CLI) tool designed for interacting with Anthropic's Claude model through Model Context Protocol (MCP) servers.
how to use MCP Client?
To use MCP Client, clone the repository, install the necessary dependencies, and create a JSON configuration file to define your MCP servers. You can then run interactive chats or single-query modes using the command line.
key features of MCP Client?
- Connect to multiple MCP servers defined in a configuration file
- Interactive chat with Claude using available MCP tools
- Stream Claude's responses in real-time
- Support for both interactive and single-query modes
- Rich terminal output with clear formatting
use cases of MCP Client?
- Engaging in real-time conversations with the Claude model.
- Processing single queries for quick responses.
- Managing multiple server connections for diverse interactions.
FAQ from MCP Client?
- What is the purpose of the MCP Client?
The MCP Client allows users to interact with the Claude model efficiently through a command-line interface.
- How do I configure the MCP Client?
You need to create a JSON configuration file that specifies your MCP servers and their respective commands.
- Is there a way to customize the model parameters?
Yes! You can customize the Claude model and parameters using command-line options.
MCP Client
A CLI tool for interacting with Anthropic's Claude model using MCP (Model Context Protocol) servers.
Features
- Connect to multiple MCP servers defined in a configuration file
- Interactive chat with Claude using available MCP tools
- Stream Claude's responses in real-time
- Support for both interactive and single-query modes
- Rich terminal output with clear formatting
Installation
# Clone the repository
git clone https://github.com/lingster/mcp-llm.git
cd mcp-llm
# Install with uv
uv sync
Configuration
Create a JSON configuration file that defines your MCP servers. For example:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "your-api-key-here"
}
}
}
}
Save this file to one of these locations:
~/.config/mcp-client/config.json
~/.mcp-client.json
./mcp-client.json
./config.json
Alternatively, you can specify a custom config file with the --config
option.
Usage
Interactive Chat
# Start interactive chat with all configured servers
uv run mcpllm chat
# Connect to specific servers only
uv run mcpllm chat --server brave-search
# Use a custom configuration file
uv run mcpllm chat --config /path/to/config.json
# Customize Claude model and parameters
uv run mcpllm chat --model claude-3-5-sonnet-20241022 --temperature 0.8 --max-tokens 8192
Single-Query Mode
# Process a single query and exit
uv run mcpllm chat --query "Is it raining in London?"
# tool use
uv run mcpllm chat --server brave-search --query "Where's wally?"
List Configured Servers
# Show all configured servers
mcpllm servers
Environment Variables
ANTHROPIC_API_KEY
: Your Anthropic API key (required)
You can also create a .env
file in your current directory:
ANTHROPIC_API_KEY=your-api-key-here
License
MIT