Connecting ONLYOFFICE MCP Server to Claude Desktop

Introduction

The ONLYOFFICE DocSpace MCP Server is a tool for managing the interaction with language models tailored to enhance efficiency, to streamline the AI-driven workflows, document and task management and to bring out the full potential of the ONLYOFFICE DocSpace.

The ONLYOFFICE DocSpace MCP Server may be connected to clients that support connection to the MCP servers running on a remote 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. We recommend that you use the Streamable HTTP transport whenever possible.

ONLYOFFICE DocSpace MCP Server can be connected to Сlaude Desktop in three different ways:

  1. Connector - is suitable for most of the users;
  2. Extension - is suitable for local development environment;
  3. Local MCP - is suitable for advanced configurations and developers who are willing to use Docker and configuration files.

First of all download and install Claude Desktop for your operating system. Claude Desktop is available for macOS and Windows. If your Claude Desktop has already been installed, check the version you are running. Click the Claude Desktop menu and select Check for Updates.

Connector

  1. Open Claude Desktop.
  2. Access the menu and select Settings.
  3. On the Settings page, go to Connectors and click the Add custom connector button.
    Claude ConnectorClaude Connector
  4. Enter the connector name (ex., "ONLYOFFICE DocSpace MCP").
  5. Enter the URL:
    https://mcp.onlyoffice.com/mcp
  6. Click the Add button.
    Claude ConnectorClaude Connector
  7. Click Connect next to the newly added connector.
  8. Complete the OAuth authentication process.

Extension

Claude Desktop Extension is another way to connect to the locally running MCP Server.

MCP server requires Node.js. Make sure that you are using Node.js version 18 or later, then download the mcpb file from GitHub Releases. If Node.js is not installed, access nodejs.org to download.

  1. Open Claude Desktop.
  2. Access the menu and select Settings.
  3. On the Settings page, go to Extensions and click Advanced settings.
    Claude ConnectorClaude Connector
  4. Click Install extension
    Claude ConnectorClaude Connector
  5. Select the downloaded MCP bundle
    Claude ConnectorClaude Connector

Local MCP

Claude Local MCP servers is the third way to connect to the locally running MCP Server.

Make sure that Docker is installed and is running on your system.

Generate a DocSpace api key. Go to your DocSpace, click the Developer Tools tab in the left panel. Choose the API keys tab on top and click the Create new secret key button. Copy the generated key.

  1. Open Claude Desktop.
  2. Access the menu and select Settings.
  3. On the Settings page, navigate to Developer tab in the left sidebar.
  4. Click Edit config button
    Claude ConnectorClaude Connector
  5. Open the configuration file in a text editor. The file path:
    • On macOS:
      ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows:
      %APPDATA%\Claude\claude_desktop_config.json
  6. Add the following JSON structure:
    
      {
    	"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 - DocSpace portal address
    • DOCSPACE_API_KEY - DocSpace API key that has been generated as per instructions above.
    • command: "docker" - the command used to launch the MCP Server via Docker
    • onlyoffice/docspace-mcp - the MCP Server Docker image
  7. Save the file and restart Claude Desktop

Using the ONLYOFFICE MCP Server

  • After a successful authentication, open the chat and give your prompt, click Always allow or Allow once to confirm the list of tools used to respond to your prompt.
    Approve toolsApprove tools

Host ONLYOFFICE DocSpace on your own server or use it in the cloud

Article with the tag:
Browse all tags