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>",
    "ARTIFACTS_BASE_URL": "https://artifacts.example.com",
    "ARTIFACTS_DIR": "/var/artifacts",
    "ARTIFACTS_TTL_SECONDS": "3600"
    }
    }
    }
    }

    When ARTIFACTS_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) ARTIFACTS_BASE_URL unset data field with base64 string Small documents, simple setups
Local URL ARTIFACTS_BASE_URL set downloadUrl + expiresAt Large documents, web integrations
Variable Description
ONLYOFFICE_JWT_SECRET JWT secret for OnlyOffice Document Server authentication
Variable Default Description
ARTIFACTS_BASE_URL (unset) Set to enable URL mode. Unset = base64.
ARTIFACTS_DIR ./artifacts Directory for saved artifacts
ARTIFACTS_TTL_SECONDS 3600 Seconds before auto-deletion
ARTIFACTS_CLEANUP_INTERVAL_SECONDS 300 Seconds between cleanup passes
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 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>"
}
}
}
}'