Skip to main content

Installing the DocSpace MCP server

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

Before you start

  • Ensure you have a DocSpace Instance. Sign up to DocSpace to access your instance and get an API key.
  • Choose your desired client. You can build a custom client or choose from the different MCP clients available based on your integration, features, user interface, or security needs.

Access via a local DocSpace MCP server

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

Before proceeding, ensure to set these environment variables:

  • 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 ToolsAPI keys.

Install with Docker image

  1. Follow these steps to pull the latest DocSpace 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 DocSpace MCP Server entry

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"
}
}
}
}

Configuration options

OptionDescription
dockerThe executable to run
runCommand to create and start a container
--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.

note

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 DocSpace MCP server in Docker Desktop
    • Open the server's configuration or settings panel
    • Enter your DocSpace 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 DocSpace 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

note

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-docspace": {
"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 DocSpace MCP server package from npm

After Installation