MCP Chat
MCP Chat
MCP Chat 是一个命令行界面应用程序,支持通过 Anthropic API 与 AI 模型进行交互式聊天。该应用程序支持文档检索、基于命令的提示词,以及通过 MCP(模型控制协议)架构实现的可扩展工具集成。
先决条件
Python 3.9+
Anthropic API Key
Related MCP server: MCP Chat
设置
第 1 步:配置环境变量
在项目根目录创建或编辑
.env文件,并确保以下变量设置正确:
ANTHROPIC_API_KEY="" # Enter your Anthropic API secret key第 2 步:安装依赖
选项 1:使用 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选项 2:不使用 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使用方法
基本交互
只需输入您的消息并按回车键即可与模型聊天。
文档检索
使用 @ 符号后跟文档 ID,将文档内容包含在您的查询中:
> Tell me about @deposition.md命令
使用 / 前缀来执行 MCP 服务器中定义的命令:
> /summarize deposition.md按下 Tab 键时,命令将自动补全。
开发
添加新文档
编辑 mcp_server.py 文件,将新文档添加到 docs 字典中。
This server cannot be deployed
Maintenance
Related MCP Connectors
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Related MCP Servers
- FlicenseAqualityDmaintenanceA command-line interface application enabling interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.2-
- FlicenseNot gradedqualityDmaintenanceA command-line interface application that enables interactive chat with AI models via the Anthropic API, supporting document retrieval and command-based prompts through the MCP architecture.-
- FlicenseNot gradedqualityDmaintenanceA command-line interface application for interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the Model Control Protocol architecture.-
- FlicenseNot gradedqualityDmaintenanceA CLI chat application enabling interactive conversations with AI models via the Anthropic API, with document retrieval and command-based prompt support through the MCP architecture.-