OD

ONLYOFFICE DocSpace

Created 5 months ago

ONLYOFFICE DocSpace MCP Server for managing context between LLMs and external systems.

development documentation public

What is ONLYOFFICE DocSpace?

Interact with [ONLYOFFICE DocSpace](https://www.onlyoffice.com/docspace.aspx) API to create rooms, manage files and folders.

Documentation

Installation

Most clients that implement the MCP protocol have a common configuration file in JSON format, inside which you can add ONLYOFFICE DocSpace MCP server as follows:

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

For a more detailed example of the MCP server installation process, see how it can be done using Claude Desktop.

Build from source

ONLYOFFICE DocSpace MCP server can be built from source. To do this, you need to have the following tools installed on your system:

  • Node.js version 24 or higher;
  • pnpm version 10 or higher. This project uses mise, a polyglot tool version manager, which you can use to install these tools. If you already have experience with tools like asdf, nvm, nodenv, or similar ones, you will find it very familiar. Once you have everything installed, clone the Git repository from the company's Git server:
git clone [email protected]:ONLYOFFICE/docspace-mcp.git

... or from the GitHub mirror:

git clone [email protected]:ONLYOFFICE/docspace-mcp.git

... install dependencies:

pnpm install

... build ONLYOFFICE DocSpace MCP server:

pnpm build

Now, you can use local build of ONLYOFFICE DocSpace MCP server in your MCP client:

{
  "mcpServers": {
    "onlyoffice-docspace": {
      "env": {
        "DOCSPACE_BASE_URL": "https://your-instance.onlyoffice.com",
        "DOCSPACE_API_KEY": "your-api-key"
      },
      "command": "/bin/onlyoffice-docspace-mcp"
    }
  }
}

Configuration

The only way to configure ONLYOFFICE DocSpace MCP server is through environment variables. Below is an example of the .env file with possible configuration options:

DOCSPACE_INTERNAL=\n\n# General configuration options\n\n# The transport protocol to use for communication with the DocSpace MCP server.
DOCSPACE_TRANSPORT=\n\n# The user agent to include in the User-Agent header for DocSpace API requests
DOCSPACE_USER_AGENT=\n\n# Whether to enable dynamic tools.
DOCSPACE_DYNAMIC=\n\n# The list of toolsets to use or 'all' to use all available toolsets.
DOCSPACE_TOOLSETS=\n\n# The list of tools to enable.
DOCSPACE_ENABLED_TOOLS=\n\n# The list of tools to disable.
DOCSPACE_DISABLED_TOOLS=\n\n# stdio configuration options\n\n# The base URL of the DocSpace instance for API requests.
DOCSPACE_BASE_URL=\n\n# The origin URL to include in the Origin header for DocSpace API requests.
DOCSPACE_ORIGIN=\n\n# The API key for accessing the DocSpace API.
DOCSPACE_API_KEY=\n\n# The Personal Access Token (PAT) for accessing the DocSpace API.
DOCSPACE_AUTH_TOKEN=\n\n# The username for accessing the DocSpace API using basic authentication.
DOCSPACE_USERNAME=\n\n# The password for accessing the DocSpace API using basic authentication.
DOCSPACE_PASSWORD=\n\n# HTTP configuration options\n\n# The host to listen on for incoming HTTP requests.
DOCSPACE_HOST=\n\n# The port to listen on for incoming HTTP requests.
DOCSPACE_PORT=\n\n# The time-to-live (TTL) for HTTP sessions in milliseconds.
DOCSPACE_SESSION_TTL=\n\n# The interval for checking HTTP sessions for expiration in milliseconds.
DOCSPACE_SESSION_INTERVAL=

Usage

Model Context Protocol describes several different concepts, however ONLYOFFICE DocSpace MCP server implements Tools only.

Tools

In addition to the existing concept of Tools, ONLYOFFICE DocSpace MCP server introduces a new one, Toolsets. A Toolset is a set of related tools. In ONLYOFFICE DocSpace MCP server, all toolsets and their tools are available by default. However, you can manage this using the following configuration options: DOCSPACE_TOOLSETS, DOCSPACE_ENABLED_TOOLS, and DOCSPACE_DISABLED_TOOLS.

Server Config

{
  "mcpServers": {
    "onlyoffice-docspace-server": {
      "command": "npx",
      "args": [
        "onlyoffice-docspace"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: Yes

Project Info

Hosted Featured
Created At: Jul 02, 2025
Updated At: Aug 07, 2025
Author: ONLYOFFICE
Category: official
License: Apache-2.0
Tags:
development documentation public