TypingMind Integration (Type B)
Overview
Section titled “Overview”TypingMind can connect to MCP servers in two ways:
| Type | Connection | Description |
|---|---|---|
| Type B | Native remote MCP URL | Direct HTTP connection to the MCP server. No proxy needed. |
| Type C.b | stdio proxy | @typingmind/mcp proxy translates HTTP to stdio child processes. |
The OnlyOffice MCP Server uses Type B - a direct HTTP connection without a proxy. This is simpler, faster, and avoids maintaining a separate proxy process.
Prerequisites
Section titled “Prerequisites”- Running MCP server at
https://<host>/mcp - TLS termination (Caddy/Nginx)
CORS_ORIGINSenvironment variable configured correctly (see below)
Configure TypingMind
Section titled “Configure TypingMind”-
Add MCP connection in TypingMind admin panel
Admin → Plugins → MCP Connections → AddURL: https://onlyoffice.<domain>/mcpTransport: streamable-http -
Test the connection
TypingMind should send
initializeand receive the tool list (16 tools for the OnlyOffice MCP Server over HTTP - the 5 storage tools and the 5 credential tools are STDIO-only, #173/#175). -
Generate a document
In the chat, call
onlyoffice_generate_documentwith template ID, format, and field data. The generated document is returned as a download link.
CORS_ORIGINS Configuration
Section titled “CORS_ORIGINS Configuration”The MCP server validates the browser’s Origin header against the
CORS_ORIGINS environment variable. In production this is fail-closed:
without CORS_ORIGINS, browser requests receive a 403.
| Environment | Value | Behavior |
|---|---|---|
| Development | * |
All origins allowed |
| Production | https://mcp.<domain>,https://<tenant-domain> |
Only listed origins |
Production Configuration
Section titled “Production Configuration”# .env (Docker)CORS_ORIGINS=https://onlyoffice.worms.government.satware.ai,https://worms.government.satware.ai- First origin: The MCP server’s own domain (for Admin UI and same-origin requests)
- Second origin: The TypingMind tenant domain (for Type B browser fetch)
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| HTTP 403 from MCP endpoint | Origin not in CORS_ORIGINS |
Add tenant domain, recreate container |
| HTTP 403 only in browser, curl works | CORS only applies to browsers | Check CORS_ORIGINS (curl sends no Origin header) |
| Tools visible in Admin UI, but TypingMind can’t generate | MCP endpoint not exposed | Check /mcp path in Caddy config |
invalid_client on connect |
Wrong URL or missing TLS | Use https:// URL with /mcp suffix |
Architecture
Section titled “Architecture”TypingMind Browser (worms.government.satware.ai) | | POST /mcp (JSON-RPC, streamable-http) vCaddy :443 (onlyoffice.worms.government.satware.ai) | vOnlyOffice MCP Server (:3847) | vOnlyOffice Document Server (:80)The @typingmind/mcp proxy on port 50880/50980 is not involved in
OnlyOffice routing. It connects other MCP servers (DokuWiki, IMAP, Cortex)
via stdio.
Related
Section titled “Related”- HTTP Transport Setup - General HTTP configuration
- Docker Stack Deployment - Production deployment
- Web Platform Integration - Client-side artifact handling