MCP Chat
MCP Chat
MCP Chat 是一个命令行界面应用,可通过 Anthropic API 与 AI 模型进行交互式聊天。该应用支持文档检索、基于命令的提示,以及通过 MCP(Model Control Protocol)架构实现的可扩展工具集成。
前提条件
Python 3.9+
Anthropic API Key
Related MCP server: MCP Chat
环境配置
第 1 步:配置环境变量
在项目根目录创建或编辑
.env文件,并确认以下变量已正确设置:
ANTHROPIC_API_KEY="" # Enter your Anthropic API secret key第 2 步:安装依赖
方式一:使用 uv 配置(推荐)
uv 是一个快速的 Python 包安装与解析器。
如果尚未安装 uv,请先安装:
pip install uv创建并激活虚拟环境:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate安装依赖:
uv pip install -e .运行项目
uv run main.py方式二:不使用 uv 进行配置
创建并激活虚拟环境:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate安装依赖:
pip install anthropic python-dotenv prompt-toolkit "mcp[cli]==1.8.0"运行项目
python main.py使用方法
基本交互
直接输入消息并按下 Enter 即可与模型对话。
文档检索
使用 @ 符号并输入文档 ID,即可在查询中包含文档内容:
> Tell me about @deposition.md命令
使用 / 前缀来执行 MCP 服务器中定义的命令:
> /summarize deposition.md按 Tab 键时命令会自动补全。
开发
添加新文档
编辑 mcp_server.py 文件,将新文档添加到 docs 字典中。
实现 MCP 功能
要实现完整的 MCP 功能:
完成
mcp_server.py中遗留的 TODO 代码在
mcp_client.py中实现缺失的功能
Lint 与类型检查
目前还没有实现 lint 或类型检查。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA command-line interface application that enables interactive chat with AI models through the Anthropic API, supporting document retrieval, command-based prompts, and extensible tool integrations.
- FlicenseBqualityDmaintenanceA command-line interface application that enables interactive chat with AI models through the Anthropic API, supporting document retrieval, command-based prompts, and extensible tool integrations.2
- FlicenseNot gradedqualityDmaintenanceA command-line interface application that enables interactive chat with AI models through the Anthropic API, supporting document retrieval, command-based prompts, and extensible tool integrations.
Related MCP Connectors
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dani-tc/anthropic-mcp-chat'
If you have feedback or need assistance with the MCP directory API, please join our Discord server