MCP Chat
MCP Chat
MCP Chat ist eine Befehlszeilenanwendung, die interaktive Chat-Funktionen mit KI-Modellen über die Anthropic API ermöglicht. Die Anwendung unterstützt Dokumentabruf, befehlsbasierte Prompts und erweiterbare Tool-Integrationen über die MCP-Architektur (Model Control Protocol).
Voraussetzungen
Python 3.9+
Anthropic API-Schlüssel
Related MCP server: mcp_starter_project
Einrichtung
Schritt 1: Umgebungsvariablen konfigurieren
Erstellen oder bearbeiten Sie die Datei
.envim Projektverzeichnis und stellen Sie sicher, dass die folgenden Variablen korrekt gesetzt sind:
ANTHROPIC_API_KEY="" # Enter your Anthropic API secret keySchritt 2: Abhängigkeiten installieren
Option 1: Einrichtung mit uv (empfohlen)
uv ist ein schneller Python-Paketinstallierer und -Resolver.
Installieren Sie uv, falls es noch nicht installiert ist:
pip install uvErstellen und aktivieren Sie eine virtuelle Umgebung:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstallieren Sie die Abhängigkeiten:
uv pip install -e .Führen Sie das Projekt aus
uv run main.pyOption 2: Einrichtung ohne uv
Erstellen und aktivieren Sie eine virtuelle Umgebung:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstallieren Sie die Abhängigkeiten:
pip install anthropic python-dotenv prompt-toolkit "mcp[cli]==1.8.0"Führen Sie das Projekt aus
python main.pyVerwendung
Grundlegende Interaktion
Geben Sie einfach Ihre Nachricht ein und drücken Sie die Eingabetaste, um mit dem Modell zu chatten.
Dokumentabruf
Verwenden Sie das @-Symbol gefolgt von einer Dokument-ID, um Dokumentinhalte in Ihre Anfrage aufzunehmen:
> Tell me about @deposition.mdBefehle
Verwenden Sie das Präfix /, um im MCP-Server definierte Befehle auszuführen:
> /summarize deposition.mdBefehle werden automatisch vervollständigt, wenn Sie die Tabulatortaste drücken.
Entwicklung
Hinzufügen neuer Dokumente
Bearbeiten Sie die Datei mcp_server.py, um dem Wörterbuch docs neue Dokumente hinzuzufügen.
Implementieren von MCP-Funktionen
Um die MCP-Funktionen vollständig zu implementieren:
Vervollständigen Sie die TODOs in
mcp_server.pyImplementieren Sie die fehlende Funktionalität in
mcp_client.py
Linting- und Typprüfung
Es sind keine Lint- oder Typprüfungen implementiert.
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.-