Skip to main content
Glama

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

  1. Erstellen oder bearbeiten Sie die Datei .env im Projektverzeichnis und stellen Sie sicher, dass die folgenden Variablen korrekt gesetzt sind:

ANTHROPIC_API_KEY=""  # Enter your Anthropic API secret key

Schritt 2: Abhängigkeiten installieren

Option 1: Einrichtung mit uv (empfohlen)

uv ist ein schneller Python-Paketinstallierer und -Resolver.

  1. Installieren Sie uv, falls es noch nicht installiert ist:

pip install uv
  1. Erstellen und aktivieren Sie eine virtuelle Umgebung:

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Installieren Sie die Abhängigkeiten:

uv pip install -e .
  1. Führen Sie das Projekt aus

uv run main.py

Option 2: Einrichtung ohne uv

  1. Erstellen und aktivieren Sie eine virtuelle Umgebung:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Installieren Sie die Abhängigkeiten:

pip install anthropic python-dotenv prompt-toolkit "mcp[cli]==1.8.0"
  1. Führen Sie das Projekt aus

python main.py

Verwendung

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.md

Befehle

Verwenden Sie das Präfix /, um im MCP-Server definierte Befehle auszuführen:

> /summarize deposition.md

Befehle 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:

  1. Vervollständigen Sie die TODOs in mcp_server.py

  2. Implementieren Sie die fehlende Funktionalität in mcp_client.py

Linting- und Typprüfung

Es sind keine Lint- oder Typprüfungen implementiert.

Available Tools

2 tools
edit_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

    A3.6/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools are clearly distinct: one reads document contents, the other modifies them. There is no overlap or ambiguity between the operations.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness2/5

    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

    Related MCP Servers