Skip to content

STDIO Transport Setup

Use STDIO when your MCP client runs locally and spawns the server as a subprocess.

Client Supports STDIO Use Case
Claude Desktop Yes Default transport
Cline Yes Default transport
Hermes Yes Default transport
TypingMind Via proxy Requires typingmind-mcp proxy

For remote clients connecting over HTTPS, see the HTTP Setup Guide instead.

  • Completed Installation
  • OnlyOffice Document Server running (docker compose -f docker/docker-compose.yml up -d)
  • Built server (npm run build)
  1. Add to your MCP client config

    Claude Desktop / Cline (config file):

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

    Config file locations:

    • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows)
    • Cline: ~/.config/opencode/opencode.jsonc or project .opencode/opencode.jsonc
  2. Set artifact delivery mode (optional)

    By default, generated documents are returned as base64 in the MCP response. For large documents, use URL mode to avoid sending megabytes through the LLM context:

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

    When ARTIFACT_BASE_URL is set, the server writes documents to disk and returns a download URL instead of inline base64.

  3. Restart your MCP client

    The client spawns the server process on startup. Restart the client to pick up the new configuration.

  4. Verify connectivity

    Ask your AI client: “List available OnlyOffice templates.” The server should respond with 5 templates.

Mode Trigger Response Best for
Base64 (inline) ARTIFACT_BASE_URL unset data field with base64 string Small documents, simple setups
Local URL ARTIFACT_BASE_URL set downloadUrl + expiresAt Large documents, web integrations
Variable Description
ONLYOFFICE_JWT_SECRET JWT secret for OnlyOffice Document Server authentication
Variable Default Description
ARTIFACT_BASE_URL (unset) Set to enable URL mode. Unset = base64.
ARTIFACT_STORAGE_DIR ./docker/artifacts Directory for saved artifacts
ARTIFACT_EXPIRY_MS 86400000 Milliseconds before auto-deletion (24 h)
ARTIFACT_CLEANUP_INTERVAL_MS 3600000 Milliseconds between cleanup passes (1 h)

Canonical names are the singular ARTIFACT_* scheme (millisecond units). The plural ARTIFACTS_* aliases were deprecated in v2.0.0 and removed (#180) - they are no longer read.

Variable Default Description
ONLYOFFICE_INSTANCES (unset) Multi-instance JSON config
ONLYOFFICE_CONTAINER_NAME onlyoffice_documentserver Container name for Docker exec
ONLYOFFICE_DEFAULT_INSTANCE default Default instance ID

TypingMind doesn’t support STDIO directly. Use the typingmind-mcp proxy:

Terminal-Fenster
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>"
}
}
}
}'