Zum Inhalt springen

STDIO-Transporteinrichtung

Verwenden Sie STDIO, wenn Ihr MCP-Client lokal läuft und den Server als Unterprozess startet.

Client Unterstützt STDIO Anwendungsfall
Claude Desktop Ja Standardtransport
Cline Ja Standardtransport
Hermes Ja Standardtransport
TypingMind Über Proxy Erfordert typingmind-mcp Proxy

Für Remote-Clients, die sich über HTTPS verbinden, siehe HTTP-Einrichtungsguide.

  • Abgeschlossene Installation
  • OnlyOffice Document Server läuft (docker compose -f docker/docker-compose.yml up -d)
  • Server gebaut (npm run build)
  1. Zur MCP-Client-Konfiguration hinzufügen

    Claude Desktop / Cline (Konfigurationsdatei):

    {
    "mcpServers": {
    "onlyoffice": {
    "command": "node",
    "args": ["/path/to/onlyoffice/dist/index.js"],
    "env": {
    "ONLYOFFICE_JWT_SECRET": "<your-jwt-secret>",
    "ONLYOFFICE_CONTAINER_NAME": "onlyoffice_documentserver"
    }
    }
    }
    }

    Speicherorte der Konfigurationsdatei:

    • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows)
    • Cline: ~/.config/opencode/opencode.jsonc oder Projekt .opencode/opencode.jsonc
  2. Artefakt-Liefermodus festlegen (optional)

    Standardmäßig werden generierte Dokumente als base64 in der MCP-Antwort zurückgegeben. Für große Dokumente verwenden Sie den URL-Modus, um zu vermeiden, dass Megabyte durch den LLM-Kontext gesendet werden:

    {
    "mcpServers": {
    "onlyoffice": {
    "command": "node",
    "args": ["dist/index.js"],
    "cwd": "/path/to/onlyoffice",
    "env": {
    "ONLYOFFICE_JWT_SECRET": "<jwt-secret>",
    "ARTIFACTS_BASE_URL": "https://artifacts.example.com",
    "ARTIFACTS_DIR": "/var/artifacts",
    "ARTIFACTS_TTL_SECONDS": "3600"
    }
    }
    }
    }

    Wenn ARTIFACTS_BASE_URL gesetzt ist, schreibt der Server Dokumente auf die Festplatte und gibt eine Download-URL statt inline-base64 zurück.

  3. MCP-Client neu starten

    Der Client startet den Server-Prozess beim Hochfahren. Starten Sie den Client neu, um die neue Konfiguration zu übernehmen.

  4. Verbindung überprüfen

    Fragen Sie Ihren AI-Client: “List available OnlyOffice templates.” Der Server sollte mit 5 Vorlagen antworten.

Modus Auslöser Antwort Am besten für
Base64 (inline) ARTIFACTS_BASE_URL nicht gesetzt data-Feld mit base64-String Kleine Dokumente, einfache Setups
Local URL ARTIFACTS_BASE_URL gesetzt downloadUrl + expiresAt Große Dokumente, Web-Integrationen
Variable Beschreibung
ONLYOFFICE_JWT_SECRET JWT-Geheimnis für die Authentifizierung am OnlyOffice Document Server
Variable Standard Beschreibung
ARTIFACTS_BASE_URL (nicht gesetzt) Zum Aktivieren des URL-Modus setzen. Nicht gesetzt = base64.
ARTIFACTS_DIR ./artifacts Verzeichnis für gespeicherte Artefakte
ARTIFACTS_TTL_SECONDS 3600 Sekunden bis zur automatischen Löschung
ARTIFACTS_CLEANUP_INTERVAL_SECONDS 300 Sekunden zwischen Aufräum-Durchläufen
Variable Standard Beschreibung
ONLYOFFICE_INSTANCES (nicht gesetzt) Multi-Instance-JSON-Konfiguration
ONLYOFFICE_CONTAINER_NAME onlyoffice_documentserver Container-Name für Docker exec
ONLYOFFICE_DEFAULT_INSTANCE default Standard-Instanz-ID

TypingMind unterstützt STDIO nicht direkt. Verwenden Sie den typingmind-mcp Proxy:

Terminal window
curl -X POST http://localhost:50880/start \
-H "Authorization: Bearer <proxy-token>" \
-H "Content-Type: application/json" \
-d '{
"mcpServers": {
"onlyoffice": {
"command": "node",
"args": ["/opt/onlyoffice/dist/index.js"],
"env": {
"ONLYOFFICE_JWT_SECRET": "<jwt-secret>"
}
}
}
}'