Connecting MCP servers
ONLYOFFICE Desktop Editors version 9.2 and later supports connecting MCP (Model Context Protocol) servers to extend AI capabilities with custom tools and integrations. MCP allows AI agents to interact with various services and data sources through standardized protocols.
AI Agent capabilities
The AI agent in Desktop Editors provides several powerful features:
- Chat interface - Natural language interaction with documents and data
- Web search - Integrated web search capabilities for real-time information
- MCP servers - Connect custom or community MCP servers for extended functionality
- Built-in tools - Desktop Editors includes native tools for document operations (generation, forms, presentations)
Viewing available tools
To see all available tools (both built-in and MCP):
Method 1: Console command
Open the browser console in Desktop Editors and execute:
JSON.parse(AscDesktopEditor.getToolFunctions());
This returns an object with descriptions of all available functions.
Method 2: Source code
View the built-in tool definitions in the Desktop SDK repository.
Each folder (except internal) contains a JSON file with function descriptions.
Prerequisites
Before connecting MCP servers, ensure you have:
- ONLYOFFICE Desktop Editors version 9.2 or higher
- A configured AI provider (OpenAI, Anthropic Claude, or other supported LLM)
- Required dependencies for the MCP server (e.g., Docker, Node.js, or Python)
Important: The MCP Servers tab only appears after establishing an AI connection in Desktop Editors.
Configuration steps
Follow these steps to connect an MCP server to Desktop Editors:
Step 1: Access MCP configuration
- Open ONLYOFFICE Desktop Editors
- Navigate to the start window
- Go to AI agent → MCP Servers section
- Click Edit configuration to open the JSON editor
Step 2: Add server configuration
Enter your MCP server configuration in JSON format. The configuration structure depends on how the server is launched:
- Docker
- Node.js
- Python
- npx
{
"mcpServers": {
"server-name": {
"command": "docker",
"args": [
"run",
"--interactive",
"--rm",
"--env", "VARIABLE_NAME",
"--env", "API_KEY",
"docker-image-name"
],
"env": {
"VARIABLE_NAME": "value",
"API_KEY": "your-api-key"
}
}
}
}
Docker must be installed and running.
{
"mcpServers": {
"server-name": {
"command": "node",
"args": ["/path/to/server/index.js"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
{
"mcpServers": {
"server-name": {
"command": "python",
"args": ["-m", "mcp_server_package"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["--yes", "package-name"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
Uses npx to run packages without global installation. The --yes flag automatically installs the package if not present.
Configuration parameters
| Parameter | Type | Description |
|---|---|---|
| mcpServers | object | Root object containing all MCP server configurations. |
| server-name | object | Unique identifier for the MCP server. Replace with your server's name (e.g., "onlyoffice-docspace"). |
| command | string | Command to launch the MCP server (e.g., "docker", "node", "python"). |
| args | array | Array of command-line arguments passed to the command. |
| env | object | Environment variables required by the MCP server (e.g., API keys, URLs). |
Practical examples
ONLYOFFICE DocSpace MCP
Connect to DocSpace for document management operations:
{
"mcpServers": {
"onlyoffice-docspace": {
"env": {
"DOCSPACE_BASE_URL": "https://your-docspace-instance.onlyoffice.com",
"DOCSPACE_API_KEY": "your-api-key-here"
},
"command": "npx",
"args": [
"--yes",
"@onlyoffice/docspace-mcp"
]
}
}
}
Local custom MCP server
Run a custom Node.js MCP server from your local machine:
{
"mcpServers": {
"mcp_local": {
"command": "node",
"args": [
"D:/MCP_EXAMPLE/index.js"
]
}
}
}
To create your own custom MCP server:
- Install Node.js on your system
- Create a new directory for your MCP server
- Run
npm installto install dependencies - Implement your custom tools following the MCP protocol
- Reference the path to your server's entry point in the configuration
Multiple MCP servers
Configure multiple servers simultaneously:
{
"mcpServers": {
"mcp_local": {
"command": "node",
"args": [
"D:/MCP_EXAMPLE/index.js"
]
},
"onlyoffice-docspace": {
"env": {
"DOCSPACE_BASE_URL": "https://your-docspace-instance.onlyoffice.com",
"DOCSPACE_API_KEY": "your-api-key-here"
},
"command": "npx",
"args": [
"--yes",
"@onlyoffice/docspace-mcp"
]
}
}
}
When configuring multiple servers, separate each server configuration with a comma.
Step 3: Save and enable tools
- After entering the configuration, click Save
- The server will appear in your MCP servers list
- Enable or disable individual tools provided by the server
- You can also manage all tools at once using the toggle controls
Step 4: Use the MCP server
Once connected and enabled:
- Open the AI agent panel in Desktop Editors
- Type natural language commands that correspond to the server's capabilities
- The AI agent will automatically utilize the available MCP tools
- Results are displayed directly in the chat interface
- You can copy conversations or save them as .docx files
Available MCP servers
Desktop Editors supports various MCP servers that extend AI capabilities:
- ONLYOFFICE DocSpace - Connect to DocSpace for document management
- Community MCP servers - Any MCP-compatible server following the protocol specification
Troubleshooting
Common issues and solutions:
- MCP Servers tab not visible: Ensure you have configured an AI provider connection first
- Server fails to start: Check that all required dependencies are installed and running
- Authentication errors: Verify that API keys and credentials in the
envsection are correct - Tools not appearing: Restart Desktop Editors after saving the configuration
Notes
- MCP server support is currently in preview and may undergo changes in future versions
- Server configurations are stored locally on your machine
- Each server runs in its own process and communicates via the Model Context Protocol
- Multiple MCP servers can be configured simultaneously