Connects Claude directly to ONLYOFFICE DocSpace instances for room-based collaboration through natural language. You get tools for creating and archiving rooms, managing folders and files, controlling permissions, inviting users, and downloading document content as text. Supports multiple auth methods including API keys, Personal Access Tokens, and OAuth 2.0. Available as both a hosted remote server at mcp.onlyoffice.com and a local Docker container you can run yourself with your own DocSpace credentials. Implements granular toolset controls so you can enable only the operations you need. Useful if you're already using DocSpace and want AI assistance with document workflow automation or room management tasks.
Model Context Protocol (MCP) is a standardized protocol for managing context between large language models (LLMs) and external systems. This repository provides an MCP server for ONLYOFFICE DocSpace.
The DocSpace MCP Server connects AI tools directly to ONLYOFFICE DocSpace. This gives AI agents, assistants, and chatbots the ability to manage rooms, collaborate on files, handle permissions, and automate document workflows - all through natural language interactions.
You can connect to the DocSpace MCP server using any MCP clients. We have covered some popular clients, such as Claude Desktop, Cursor, Windsurf, etc., and here you can read about it.
The remote DocSpace MCP Server is hosted by ONLYOFFICE and provides the fastest way to start using DocSpace tools inside your AI agent. You can connect to it instantly without deploying or configuring anything on your machine.
The public instance is available at https://mcp.onlyoffice.com/mcp for clients that support modern Streamable HTTP transport and at https://mcp.onlyoffice.com/sse for clients that support only the legacy SSE transport. It is preferable to use the Streamable HTTP transport whenever possible.
See all options for connecting clients to the Remote DocSpace MCP Server here.
If your MCP host does not support remote MCP servers, you can run the local version of the DocSpace MCP Server instead.
Most clients that implement the MCP protocol have a common configuration file in the JSON format, inside which you can add the ONLYOFFICE DocSpace MCP Local Server.
Note: The common example below is applicable for Docker image, so Docker must be installed on your system.
Find your client .json configuration file.
Insert the following block into the mcpServers section of your .json configuration file:
{
"mcpServers": {
"onlyoffice-docspace": {
"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"
}
}
}
}
DOCSPACE_BASE_URL - the URL of your DocSpace instance (e.g. https://portal.onlyoffice.com).DOCSPACE_API_KEY - your personal API key generated in DocSpace settings -> Developer Tools -> API keys.All available parameters are listed here.
Close and reopen your client. In most cases, the DocSpace MCP Server will start automatically, and you'll be able to issue natural language commands like:
The DocSpace MCP server implements the Tools concept described in the MCP specification.
All DocSpace MCP server tools are described here.
The documentation is available in the docs directory.
The following examples show how to use ONLYOFFICE DocSpace MCP server.
The policies are available at Legal Terms and Privacy Policy.
The DocSpace MCP server is distributed under the MIT license found in the LICENSE file.
DOCSPACE_BASE_URLThe base URL of the DocSpace instance for API requests.
DOCSPACE_API_KEYsecretThe API key for accessing the API.
DOCSPACE_TRANSPORTdefault: stdioThe transport protocol to use for communication with the MCP server.
DOCSPACE_DYNAMICdefault: falseThe flag that indicates whether the MCP server should use meta tools.
DOCSPACE_TOOLSETSdefault: allThe list of toolsets to enable for the MCP server.
DOCSPACE_ENABLED_TOOLSThe list of tools to enable for the MCP server.
DOCSPACE_DISABLED_TOOLSThe list of tools to disable for the MCP server.
DOCSPACE_USER_AGENTdefault: @onlyoffice/docspace-mcp v3.2.0The user agent to include in the User-Agent header for API requests.
DOCSPACE_AUTHORIZATIONsecretThe raw value to include in the Authorization header for API requests.
DOCSPACE_AUTH_TOKENsecretThe Personal Access Token (PAT) for accessing the API.
DOCSPACE_USERNAMEThe username for accessing the API using basic authentication.
DOCSPACE_PASSWORDsecretThe password for accessing the API using basic authentication.
DOCSPACE_SESSION_TTLdefault: 28800000The time-to-live (TTL) for HTTP sessions in milliseconds.
DOCSPACE_SESSION_INTERVALdefault: 240000The interval for checking HTTP sessions for expiration in milliseconds.
DOCSPACE_OAUTH_BASE_URLThe base URL of the DocSpace OAuth service for OAuth requests.
DOCSPACE_OAUTH_CLIENT_IDThe client ID of the OAuth application.
DOCSPACE_OAUTH_CLIENT_SECRETsecretThe client secret of the OAuth application.
DOCSPACE_OAUTH_AUTH_TOKEN_ALGORITHMdefault: HS256The algorithm to use for signing OAuth access tokens.
DOCSPACE_OAUTH_AUTH_TOKEN_TTLdefault: 3600000The time-to-live (TTL) for OAuth access tokens in milliseconds.
DOCSPACE_OAUTH_AUTH_TOKEN_SECRET_KEYsecretThe secret key to use for signing OAuth access tokens.
DOCSPACE_OAUTH_STATE_TOKEN_ALGORITHMdefault: HS256The algorithm to use for signing OAuth state tokens.
DOCSPACE_OAUTH_STATE_TOKEN_TTLdefault: 3600000The time-to-live (TTL) for OAuth state tokens in milliseconds.
DOCSPACE_OAUTH_STATE_TOKEN_SECRET_KEYsecretThe secret key to use for signing OAuth state tokens.
DOCSPACE_SERVER_BASE_URLThe base URL of the server.