STDIO Transport Setup
When to Use STDIO
Section titled “When to Use STDIO”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.
Prerequisites
Section titled “Prerequisites”- Completed Installation
- OnlyOffice Document Server running (
docker compose -f docker/docker-compose.yml up -d) - Built server (
npm run build)
Configuration
Section titled “Configuration”-
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.jsoncor project.opencode/opencode.jsonc
- Claude Desktop:
-
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_URLis set, the server writes documents to disk and returns a download URL instead of inline base64. -
Restart your MCP client
The client spawns the server process on startup. Restart the client to pick up the new configuration.
-
Verify connectivity
Ask your AI client: “List available OnlyOffice templates.” The server should respond with 5 templates.
Artifact Delivery Modes
Section titled “Artifact Delivery Modes”| 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 |
Environment Variables
Section titled “Environment Variables”Required
Section titled “Required”| Variable | Description |
|---|---|
ONLYOFFICE_JWT_SECRET |
JWT secret for OnlyOffice Document Server authentication |
Artifact Delivery
Section titled “Artifact Delivery”| 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 |
OnlyOffice Instance
Section titled “OnlyOffice Instance”| 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 via Proxy
Section titled “TypingMind via Proxy”TypingMind doesn’t support STDIO directly. Use the typingmind-mcp proxy:
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>" } } } }'Related
Section titled “Related”- HTTP Setup - Remote transport for opencode, TypingMind, OpenClaw
- Quick Start - Generate your first document
- Web Platform Integration - Client-side artifact handling