MCP Client CLI
CLI chatbot client app that connects to a specified MCP server. Built using TypeScript, OpenAI SDK, and MCP SDK.
What is MCP Client CLI?
MCP Client CLI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to cli chatbot client app that connects to a specified mcp server. built using typescript, openai sdk, and mcp sdk.
CLI chatbot client app that connects to a specified MCP server. Built using TypeScript, OpenAI SDK, and MCP SDK.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- CLI chatbot client app that connects to a specified MCP serv
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-client-cliConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Client CLI
mcp-client-cli is a terminal-based MCP client that lets you chat with any MCP-compatible server directly from your command line, using your choice of LLM provider (OpenAI, Groq, local Llama, and others). It serves as an alternative to Claude Desktop for developers who prefer the terminal, providing a simple llm command that sends prompts to an LLM equipped with the tools exposed by your configured MCP servers. It also supports piped input, image analysis, and reusable prompt templates.
Prerequisites
- Python 3.10 or higher
- pip package manager
- An LLM API key: LLM_API_KEY or OPENAI_API_KEY for OpenAI, or equivalent for Groq/other providers
- At least one MCP server installed and runnable (e.g. via uvx or npx)
- A ~/.llm/config.json configuration file
Install via pip
Install the mcp-client-cli package from PyPI. This installs the llm command globally in your Python environment.
pip install mcp-client-cliCreate the configuration file
Create ~/.llm/config.json to configure your LLM provider and any MCP servers you want to connect. The config supports JSON with // comments for easy toggling.
mkdir -p ~/.llm
cat > ~/.llm/config.json << 'EOF'
{
"systemPrompt": "You are a helpful assistant.",
"llm": {
"provider": "openai",
"model": "gpt-4o",
"api_key": "your-openai-api-key",
"temperature": 0.7
},
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"enabled": true
}
}
}
EOFSet your API key via environment variable
As an alternative to embedding the key in config.json, set the LLM_API_KEY or OPENAI_API_KEY environment variable. The CLI checks both.
export OPENAI_API_KEY=sk-...Send your first prompt
Run the llm command followed by your prompt. The CLI sends it to your configured LLM along with any tools from your MCP servers.
llm "What is the top article on Hacker News today?"Use piped input and images
Pipe text files or images into llm for contextual analysis. The CLI passes piped content as additional context to the LLM.
# Pipe a file
cat error.log | llm "What is causing this error?"
# Pipe an image for vision analysis
cat screenshot.png | llm "Is there any error in this screenshot?"Use and list prompt templates
The CLI supports reusable prompt templates accessible via the p prefix. List available templates and use them by name.
# List available templates
llm --list-prompts
# Use a template to review git changes
llm p review
# Generate a commit message
llm p commitMCP Client CLI Examples
Client configuration
A complete ~/.llm/config.json with OpenAI as the LLM provider and two MCP servers configured.
{
"systemPrompt": "You are an AI assistant helping a software engineer.",
"llm": {
"provider": "openai",
"model": "gpt-4o",
"api_key": "your-openai-api-key",
"temperature": 0.7
},
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"requires_confirmation": ["fetch"],
"enabled": true
},
"brave-search": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "your-brave-api-key"
},
"requires_confirmation": ["brave_web_search"]
}
}
}Prompts to try
Example CLI commands demonstrating the range of the mcp-client-cli capabilities.
- llm "What is the capital of North Sumatra?"
- cat package.json | llm "Summarize the dependencies in this file"
- llm "What are the latest AI news headlines?" (uses brave-search MCP server)
- llm p review (runs the built-in code review prompt template against git diff)
- llm --list-prompts (shows all available prompt templates)Troubleshooting MCP Client CLI
Command 'llm' not found after pip install
The pip scripts directory may not be on your PATH. Run python -m mcp_client_cli directly, or add the pip scripts directory (e.g. ~/.local/bin on Linux/macOS) to your PATH environment variable.
MCP server tools are not invoked even though they are configured
Check that the server entry in mcpServers has "enabled": true (or omit it, as true is the default). Verify the command (uvx, npx, etc.) is installed and accessible in your PATH. Run the MCP server command manually to confirm it starts without errors.
Tool requiring confirmation blocks indefinitely in non-interactive mode
When piping input or running llm in a script, tools listed in requires_confirmation will prompt for [y/n] on stdin. Either remove the tool from requires_confirmation, or answer the prompt interactively when running the command directly.
Frequently Asked Questions about MCP Client CLI
What is MCP Client CLI?
MCP Client CLI is a Model Context Protocol (MCP) server that cli chatbot client app that connects to a specified mcp server. built using typescript, openai sdk, and mcp sdk. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Client CLI?
Follow the installation instructions on the MCP Client CLI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Client CLI?
MCP Client CLI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Client CLI free to use?
Yes, MCP Client CLI is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
MCP Client CLI Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP Client CLI? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Client CLI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Client CLI?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.