Connect DocSpace MCP server to MCP clients
The DocSpace MCP server allows you to connect numerous MCP clients, offering flexibility to choose between interfaces when interacting with your DocSpace. This guide demonstrates how to connect the DocSpace MCP server to the following clients:
Before you start
Take note of these environment variables used when configuring the DocSpace MCP server:
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.
Ensure your API key is valid.
For local (command-based) connections, Docker must also be installed on your system.
Connect to ONLYOFFICE Desktop Editors
Connect to the locally running MCP server using stdio transport.
- Open ONLYOFFICE Desktop Editors.
- Navigate to AI agent.
- Navigate to Settings.
- Navigate to MCP Servers.
- Click Edit configuration.
- Add a new record to the
mcpServerssection:
{
"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"
}
}
}
}
- Click Save.
Connect to Claude Desktop
Claude Desktop offers three different ways to connect to the DocSpace MCP server:
Connect via connectors
Connect to the MCP server running remotely using Claude's Connectors. This is the preferred connection method.
- Open Claude Desktop.
- Navigate to Settings.
- Navigate to Connectors.
- Click "Add custom connector".
- Enter a name for the connector (e.g., "ONLYOFFICE DocSpace MCP").
- Enter the connection URL (e.g., https://mcp.onlyoffice.com/mcp).
- Follow based on your authentication preference:
- OAuth with public app: Click Add
- OAuth with custom app:
- Click "Advanced settings".
- In the "OAuth Client ID" field, enter the Client ID from your DocSpace OAuth application.
- In the "OAuth Client Secret" field, enter the Client Secret from your DocSpace OAuth application.
- Click "Add".
- Click "Connect" next to the newly added connector.
- Complete the OAuth authentication process:
- Sign in to your DocSpace account by entering your email and password and clicking "Sign In".
- If you have more than one account associated with the entered email, choose one of them.
- Allow the MCP Remote Server to access the specified data in your DocSpace account.
Connect via extensions
Connect to the locally running MCP server using Claude's Extensions. Before connecting, ensure you have:
- Node.js (v18 or higher)
- Download the GitHub MCP bundle. Follow these steps to install Node and the GitHub release.
- Open Claude Desktop.
- Navigate to Settings.
- Navigate to Extensions.
- Click "Advanced settings".
- Click "Install extension".
- Select the downloaded MCP bundle.
- Click "Install".
Connect via Local MCP
Connect to the locally running MCP server using Claude's Local MCP servers.
- Open Claude Desktop.
- Navigate to Settings.
- Navigate to Developer.
- Click "Edit config".
- Open the configuration file in a text editor.
- Add a new record to the
mcpServerssection:{"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"}}}} - Save the file.
Connect to Claude Web
- Open Claude Web in your web browser.
- Navigate to Settings.
- Navigate to Connectors.
- Click "Add custom connector".
- Enter a name for the connector (e.g., "ONLYOFFICE DocSpace MCP").
- Enter connection URL based on your preferred authentication method:
- OAuth with public app (Recommended)
- Enter the connection URL (e.g., https://mcp.onlyoffice.com/mcp).
- Authentication with URL-encoded credentials:
- Enter the connection URL with your encoded credentials:
https://{encoded_username}:{encoded_password}@mcp.onlyoffice.com/mcp?base_url=https://your-instance.onlyoffice.com/ - Replace
{encoded_username}with your URL-encoded DocSpace email - Replace
{encoded_password}with your URL-encoded DocSpace password - Replace
your-instance.onlyoffice.comwith your actual DocSpace domain
- Enter the connection URL with your encoded credentials:
- OAuth with public app (Recommended)
- Click "Add".
- Click "Connect" next to the newly added connector.
- If you chose OAuth, complete the authentication process:
- Sign in to your DocSpace account by entering your email and password and clicking "Sign In".
- If you have more than one account associated with the entered email, choose one of them.
- Allow the MCP Remote Server to access the specified data in your DocSpace account.
Connect to Cursor
Cursor allows you to connect to the DocSpace MCP server either via:
Connect Cursor to remote DocSpace MCP server via HTTP
Connect to the MCP server running remotely using Streamable-HTTP transport.
- Open Cursor.
- Bring up Command Palette.
- Select View: Open MCP Settings.
- Click Add Custom MCP.
- Add a new record to the
mcpServerssection:{"mcpServers": {"onlyoffice-docspace": {"type": "http","url": "https://mcp.onlyoffice.com/mcp"}}} - Save the file.
- Navigate back to MCP Settings.
- Click Connect next to the newly added MCP server.
- Complete the OAuth authentication process:
- Sign in to your DocSpace account by entering your email and password and clicking Sign In.
- If you have more than one account associated with the entered email, choose one of them.
- Allow the MCP Remote Server to access the specified data in your DocSpace account.
Connect Cursor to local DocSpace MCP server via command
Connect to the locally running MCP server using stdio transport.
- Open Cursor.
- Bring up Command Palette.
- Select View: Open MCP Settings.
- Click Add Custom MCP.
- Add a new record to the
mcpServerssection:{"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"}}}} - Enter the values of the
DOCSPACE_BASE_URLandDOCSPACE_API_KEYenvironment variables. - Save the file.
Connect to Le Chat
- Open Le Chat in your web browser.
- Navigate to Intelligence.
- Navigate to Connectors.
- Click Add Connector.
- Navigate to Custom MCP Connector.
- Enter a name for the connector (e.g., "ONLYOFFICE_DocSpace_MCP").
- Enter the server URL based on your preferred authentication method:
- OAuth:
https://mcp.onlyoffice.com/mcp - API Token Authentication: server URL with your DocSpace instance as a query parameter:
https://mcp.onlyoffice.com/mcp?base_url=https://your-instance.onlyoffice.com(replace the base_url value with your actual DocSpace URL).
- OAuth:
- Authenticate the connection with any of these auth methods:
- OAuth:
- Select OAuth 2.1 from Authentication method.
- Enter your Client ID and Client Secret gotten from creating your custom app on DocSpace
- API Token:
- Select "API Token Authentication" from "Authentication Methods" section and
- In the "Header value" field, enter your personal API key generated in DocSpace settings -> Developer Tools -> API keys.
- OAuth:
- Click Connect.
- Confirm connection by enabling the DocSpace MCP server in the Enable tools section of the chat bar.
Connect to VS Code
VS Code client also connects to DocSpace MCP server using:
Connect VS Code to remote DocSpace MCP server via HTTP
This is the preferred connection method and connects to the remote MCP server using Streamable-HTTP transport.
- Open Visual Studio Code.
- Bring up Command Palette.
- Select MCP: Open User Configuration.
- Add a new record to the
serverssection:{"servers": {"onlyoffice-docspace": {"type": "http","url": "https://mcp.onlyoffice.com/mcp"}}} - Save the file.
- Bring up Command Palette.
- Select MCP: List Servers.
- Select onlyoffice-docspace.
- Select Start Server.
- Complete the OAuth authentication process:
- Sign in to your DocSpace account by entering your email and password and clicking Sign In.
- If you have more than one account associated with the entered email, choose one of them.
- Allow the MCP Remote Server to access the specified data in your DocSpace account.
Connect VS Code to local DocSpace MCP server via command
Connect to the locally running MCP server using stdio transport.
- Open Visual Studio Code.
- Bring up Command Palette.
- Select MCP: Open User Configuration.
- Add a new record to the
serverssection:{"servers": {"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"}}}} - Save the file.
- Bring up Command Palette.
- Select MCP: List Servers.
- Select onlyoffice-docspace.
- Select Start Server.
Connect to Windsurf
Windsurf offers two ways to connect to the DocSpace MCP server:
Connect Windsurf to remote DocSpace MCP server via HTTP
This is the recommended method and connects to the remote MCP server using Streamable-HTTP transport.
- Open Windsurf.
- Bring up Command Palette.
- Select Open Windsurf User Settings.
- Navigate to Cascade.
- Click Open MCP Marketplace.
- Click Settings.
- Add a new record to the
mcpServerssection:{"mcpServers": {"onlyoffice-docspace": {"serverUrl": "https://mcp.onlyoffice.com/mcp"}}} - Save the file.
- Complete the OAuth authentication process:
- Sign in to your DocSpace account by entering your email and password and clicking Sign In.
- If you have more than one account associated with the entered email, choose one of them.
- Allow the MCP Remote Server to access the specified data in your DocSpace account.
Connect Windsurf to local DocSpace MCP server via command
This method uses stdio transport to connect to a locally running MCP server.
- Open Windsurf.
- Bring up Command Palette.
- Select Open Windsurf User Settings.
- Navigate to Cascade.
- Click Open MCP Marketplace.
- Click Settings.
- Add a new record to the
mcpServerssection:{"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"}}}} - Save the file.
- Open Cascade.
- Click Actions(...). You'll find onlyoffice-docspace under the MCP section if connection was successful. Toggle to enable the connection.