跳到主要内容

Getting started with the ONLYOFFICE Apps MCP server

Connect the ONLYOFFICE Apps MCP server to Claude Desktop and start interacting with your ONLYOFFICE Apps workspace through natural language.

Step 1: Connect to MCP client​

MCP clients like Claude, VS Code, and Devin Desktop act as a bridge to the ONLYOFFICE Apps MCP server, enabling LLMs to access and use the ONLYOFFICE Apps workspace and tools, thus improving the overall capabilities of ONLYOFFICE Apps. This guide uses the Claude Desktop client and connects to a local MCP server. You can also access via a remote server.

备注

Ensure Docker is installed on your system.

To connect Claude Desktop to your local MCP server:

  1. Open Claude Desktop.
  2. Navigate to Settings.
  3. Navigate to Developer.
  4. Click Edit config.
  5. Open the configuration file (claude_desktop_config.json) in a text editor.
  6. Add the mcpServers section from the example below to the top level of the file. If the file already contains other settings, copy the example without its outer braces and separate it from the existing settings with a comma:
    {
    "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"
    }
    }
    }
    }

Where:

  • 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).
  1. Save the file and quit Claude Desktop.
备注

It's important to quit and not just close the Claude Desktop window as quitting and restarting the app reloads the claude_desktop_config.json configuration with the new mcpServers entry. On Windows, right-click the Claude icon in the system tray and select Exit.

Step 2: Confirm the connection​

  1. Open Claude Desktop.

  2. Click + > Connectors on the chat bar.

    Our newly configured MCP server (onlyoffice-apps) is now enabled.

This image confirms a successful client-ONLYOFFICE Apps MCP server connectionThis image confirms a successful client-ONLYOFFICE Apps MCP server connection

Step 3: Interact with your ONLYOFFICE Apps workspace using the newly connected client​

Now we have our connection, let us interact with ONLYOFFICE Apps via Claude:

  1. Let's create a new room. Claude requests permission to create this room.

This image shows the command to create a roomThis image shows the command to create a room

You can confirm this new room in your ONLYOFFICE Apps account.

This image confirms the room was successfully createdThis image confirms the room was successfully created

  1. Now, create a new document in this room.

This image shows the command for creating a new documentThis image shows the command for creating a new document

Confirm the new document was created.

This image confirms the document was createdThis image confirms the document was created

You can confirm the existence of this new document in the new room in your ONLYOFFICE Apps workspace.

This image shows the new document visible inside the new room in ONLYOFFICE AppsThis image shows the new document visible inside the new room in ONLYOFFICE Apps

Next steps​