
mcp terminal client
A Python MCP terminal client
Repository Info
About This Server
A Python MCP terminal client
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
🖥️ MCP Terminal Chat Client
A terminal-based interactive chat client for communicating with Model Context Protocol (MCP) servers using Anthropic's Claude models.
Designed for developers building and testing tools via the MCP spec.
💡 Features
- 🧑💻 Terminal chat interface with Claude
- 🔍 Auto-discovers tools from an MCP server
- 🧰 Executes Claude's
tool_usecalls live - ✅ Validates tool inputs via JSON Schema
- 🪵 Full structured logging and debugging
- 🔁 Multi-turn conversation loop with memory
- 📎 File Attachments for Images and PDF
⚙️ Requirements
- Python 3.11+
- MCP tool server (conforming to the spec)
.envfile with Anthropic API key
📦 Python Packages
Install with uv (recommended) or pip:
uv pip install -r requirements.txt
# or
pip install -r requirements.txt
Dependencies:
anthropicanyiomcppython-dotenvjsonschema
🧾 Configuration
🔑 llm_config.json
{
"provider": "anthropic",
"model": "claude-3-haiku-20240307"
}
⚙️ mcp_servers.json
{
"mcpServers": {
"default": {
"command": "python",
"args": ["-m", "your_mcp_tool_server"],
"env": {
"MY_ENV_VAR": "value"
}
}
}
}
🔐 .env
ANTHROPIC_API_KEY=your-api-key-here
🧪 Usage
Run with default config:
python main.py
Custom configs:
python main.py --llm_config custom_llm_config.json --mcp_config custom_mcp_servers.json
💬 Conversation Flow
- You send a prompt in terminal
- Claude replies with text or
tool_useblocks - MCP client validates and calls the appropriate tool
- Tool results are returned to Claude
- Claude completes the response
All without leaving your terminal.
📎 File Attachments
You can attach PDF and image files (.png, .jpg, .webp) to your prompt using the --file flag.
These files will be sent to Claude along with your message using base64 encoding and the correct MIME type.
🖼️ Supported Types
application/pdfimage/pngimage/jpegimage/webp
📁 Example Usage
python main.py --file ./sample.pdf
🛠 Tool Handling
- Tools are discovered via
tools/list - Input schemas are parsed and validated
- Tool outputs must return a string (per Claude API)
- Errors are passed back as strings with
content
🐛 Troubleshooting
- Make sure
ANTHROPIC_API_KEYis in.env - Set log level to
DEBUGfor full trace - If Claude throws 400 errors:
- Ensure
tool_result.contentis a string - Validate tool inputs match declared schema
- Ensure
📌 TODO
- Support OpenAI, VertexAI
- Vendor-agnostic LLM integration
- SSE support
- Packaging
- Add tests and CLI improvements
Quick Start
Clone the repository
git clone https://github.com/dolwinf/mcp-terminal-clientInstall dependencies
cd mcp-terminal-client
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.