跳到主要内容

Installing the ONLYOFFICE Apps MCP server

Before interacting with the ONLYOFFICE Apps MCP server, you need to install or connect to it. ONLYOFFICE Apps offers two ways to do this:

Before you start​

Access via a local ONLYOFFICE Apps MCP server​

You can configure your local machine to interact with the ONLYOFFICE Apps MCP server using:

Before proceeding, make sure to set these environment variables:

  • DOCSPACE_BASE_URL - the URL of your ONLYOFFICE Apps instance (e.g. https://your-instance.onlyoffice.com).
  • DOCSPACE_API_KEY - your personal API key generated in ONLYOFFICE Apps Developer Tools → API keys (open Developer Tools from the banner at the bottom of the left sidebar).

Quick install​

Use the buttons below to add the ONLYOFFICE Apps MCP server to your client in one click. When the browser asks to open the application, confirm it. In VS Code, click Install on the server page and enter the environment variable values when prompted. In Cursor, replace the placeholder values in the Secrets section of the Install MCP server dialog before clicking Install. If Cursor does not open, copy the configuration shown on the page and add it to ~/.cursor/mcp.json manually.

Docker ImageNode.js Application
Add to Cursor using Docker ImageAdd to Cursor using npx
Add to VS Code using Docker ImageAdd to VS Code using npx
Add to VS Code Insiders using Docker ImageAdd to VS Code Insiders using npx

Install with Docker image​

  1. Follow these steps to pull the latest ONLYOFFICE Apps MCP server from Docker Hub.

  2. Locate your MCP client .json config file. The location of this file depends on the specific client.

  3. Add the ONLYOFFICE Apps MCP server entry.

    Insert the following block into the mcpServers section of your .json configuration file:

    {
    "mcpServers": {
    "onlyoffice-apps": {
    "command": "docker",
    "args": [
    "run",
    "--interactive",
    "--rm",
    "--env",
    "DOCSPACE_BASE_URL",
    "--env",
    "DOCSPACE_API_KEY",
    "onlyoffice/docspace-mcp"
    ],
    "env": {
    "DOCSPACE_BASE_URL": "https://your-instance.onlyoffice.com",
    "DOCSPACE_API_KEY": "your-api-key"
    }
    }
    }
    }

Configuration options

OptionDescription
dockerThe executable to run
runCommand to create and start a container
--interactiveKeep stdin open so the client can communicate with the server over stdio
--rmAutomatically remove the container when it exits
--envFlag to pass environment variables
onlyoffice/docspace-mcpDocker image name to run

Install with Docker MCP Toolkit​

Using the Docker MCP Toolkit requires Docker Desktop to be installed on your system and the Docker MCP Toolkit to be enabled.

备注

The Docker MCP Toolkit is currently a beta feature and is only available to specific user segments, subscription tiers, or by invitation.

  1. Follow this guide to install the server through the Docker Desktop interface.

  2. Connect the server to an MCP client through the Docker Desktop interface.

  3. Configure the server through the Docker Desktop interface. In general:

    • Select the ONLYOFFICE Apps MCP server in Docker Desktop
    • Open the server's configuration or settings panel
    • Enter your ONLYOFFICE Apps base URL (e.g., https://your-instance.onlyoffice.com)
    • Enter your personal API key
    • Save the configuration

Install with MCP bundle​

Running the MCP bundle requires Node.js version 18 or higher to be installed on your system.

  1. Download the latest MCP bundle from GitHub Releases (typically named docspace-mcp-bundle-x.x.x.zip or similar).

  2. Install the MCP bundle in an application by following the application's MCP bundles installation procedure.

  3. Configure the server through the application's interface. In general:

    • Open the server settings within your application
    • Enter your ONLYOFFICE Apps base URL (e.g., https://your-instance.onlyoffice.com)
    • Enter your personal API key
    • Save the configuration and restart the application if required

Install via Node.js application​

备注

Running the Node.js application requires Node.js version 18 or higher to be installed on your system.

Configure your MCP client to use the Node.js application by adding the following configuration to your client's configuration file:

{
"mcpServers": {
"onlyoffice-apps": {
"command": "npx",
"args": [
"--yes",
"@onlyoffice/docspace-mcp"
],
"env": {
"DOCSPACE_BASE_URL": "https://your-instance.onlyoffice.com",
"DOCSPACE_API_KEY": "your-api-key"
}
}
}
}

Configuration options

OptionDescription
npxThe Node.js package runner, which downloads and executes packages on demand
--yesAutomatically confirms the installation prompt, enabling unattended startup
@onlyoffice/docspace-mcpThe official ONLYOFFICE Apps MCP server package from npm

Access via the remote ONLYOFFICE Apps MCP server​

Another way to use the ONLYOFFICE Apps MCP server is to access it via a public ONLYOFFICE Apps MCP Server instance hosted by ONLYOFFICE. This eliminates the need to run your own server infrastructure while providing access to ONLYOFFICE Apps functionality through your AI assistant. To do this, provide the ONLYOFFICE Apps MCP server public instance URL when connecting to any of the MCP clients.

Public instance​

The public instance is available at two endpoints:

EndpointTransportRecommendation
https://mcp.onlyoffice.com/mcpHTTPPreferred: use this endpoint whenever your client supports it. Streamable HTTP offers better performance and reliability.
https://mcp.onlyoffice.com/sseServer-Sent Events (SSE)Legacy: use this endpoint only if your client does not support the modern Streamable HTTP transport.

The public instance provides access to all available tools by default. Tool selection can be customized using query parameters or custom headers. However, we recommend using the MCP client interface for tool configuration when supported.

Tool configuration​

Tool selection can be customized using the following options:

Authenticating the remote MCP server-client connection​

The public instance supports multiple authentication methods to meet different security requirements and client capabilities: OAuth, API key, Personal Access Token (PAT), username/password pair, or raw Authorization header.

备注

OAuth is the recommended method as it provides the strongest security model by allowing users to authorize specific permissions without sharing their credentials directly.

Authentication methodDefinitionRequirementsExampleRecommendations
OAuth (public app)Authenticates the connection without requiring custom credentialsConnection URLSee VS Code remote connectionSimplest and most secure method, requiring no custom credentials or additional configuration
OAuth (custom app)Connects using a client ID and client secret after creating a custom appConnection URL, Client ID, Client SecretSee Claude Desktop connectionOffers more flexibility and full control over the OAuth configuration, including custom redirect URIs, specific scopes, and branding.
API Key (Header)Connects using an API key and base URL configured via custom headersConnection URL, API keySee ONLYOFFICE Apps connection, See Devin Desktop connectionIdeal when integrating with platforms that support custom HTTP headers but don't have built-in OAuth support
API Key (Authorization header)Connects using an API key in the Authorization header and a base URL in a query parameterConnection URL, API keySee Mistral Vibe connectionIdeal when working with clients that support Bearer token authentication but don't allow custom headers
Username & password in URLConnects using URL-encoded credentials and a base URL in a query parameterConnection URL, username, passwordSee Claude web connectionIdeal for quick setup, testing, or when using clients with limited authentication options

After installation​