Skip to content

TypingMind Integration (Type B)

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.

  • Running MCP server at https://<host>/mcp
  • TLS termination (Caddy/Nginx)
  • CORS_ORIGINS environment variable configured correctly (see below)
  1. Add MCP connection in TypingMind admin panel

    Admin → Plugins → MCP Connections → Add
    URL: https://onlyoffice.<domain>/mcp
    Transport: streamable-http
  2. Test the connection

    TypingMind should send initialize and 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).

  3. Generate a document

    In the chat, call onlyoffice_generate_document with template ID, format, and field data. The generated document is returned as a download link.

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
Terminal-Fenster
# .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)
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
TypingMind Browser (worms.government.satware.ai)
|
| POST /mcp (JSON-RPC, streamable-http)
v
Caddy :443 (onlyoffice.worms.government.satware.ai)
|
v
OnlyOffice MCP Server (:3847)
|
v
OnlyOffice 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.