MCP Chat
MCP Chat
MCP Chat — это приложение с интерфейсом командной строки, которое обеспечивает интерактивное общение с моделями ИИ через Anthropic API. Приложение поддерживает получение документов, командные подсказки и расширяемые интеграции инструментов через архитектуру MCP (Model Control Protocol).
Предварительные требования
Python 3.9+
Ключ Anthropic API
Related MCP server: mcp_starter_project
Настройка
Шаг 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Использование
Базовое взаимодействие
Просто введите сообщение и нажмите Enter, чтобы общаться с моделью.
Получение документов
Используйте символ @, за которым следует идентификатор документа, чтобы включить содержимое документа в ваш запрос:
> Tell me about @deposition.mdКоманды
Используйте префикс / для выполнения команд, определённых на MCP-сервере:
> /summarize deposition.mdКоманды будут автоматически дополняться при нажатии Tab.
Разработка
Добавление новых документов
Отредактируйте файл mcp_server.py, чтобы добавить новые документы в словарь docs.
Реализация функций MCP
Для полной реализации функций MCP:
Завершите TODO в
mcp_server.pyРеализуйте недостающую функциональность в
mcp_client.py
Линтинг и проверка типов
Линтинг и проверка типов не реализованы.
Available Tools
2 toolsedit_documentA
Edit a document by replacing a string in the documents content with a new string
Inputs: doc_id (required), new_str (required), old_str (required).
read_doc_contentsA
Read the contents of a document and return it as a string.
Inputs: doc_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are clearly distinct: one reads document contents, the other modifies them. There is no overlap or ambiguity between the operations.
Both tools use a verb_noun pattern and snake_case, but one uses 'doc_contents' and the other uses 'document', which is a minor inconsistency. A more consistent pair would be read_document/edit_document.
Two tools is a thin surface and falls at the borderline for a useful server. The tools are focused, but the count feels minimal for a standalone document-related MCP server.
The tool surface covers reading and editing documents but lacks create, delete, list, and search capabilities. This leaves significant lifecycle gaps that agents may need to work around.
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnterprise-grade MCP server integrating Claude AI capabilities, enabling AI-powered conversations, file operations, and system tools via the Model Context Protocol.1Apache 2.0
- FlicenseNot gradedqualityDmaintenanceThis MCP server powers a chat CLI for Claude or Gemini, letting users reference local documents by ID and execute MCP prompts through natural language.-
- FlicenseBqualityDmaintenanceAn MCP server that manages documents, enabling retrieval and command-based operations within AI chat interfaces using the Anthropic API.2-
- FlicenseNot gradedqualityDmaintenanceA command-line interface MCP server that enables interactive chat with Anthropic AI models, supporting document retrieval and extensible command-based tools.-