ONLYOFFICE DocSpace MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "DOCSPACE_BASE_URL=${DOCSPACE_BASE_URL}" -e "DOCSPACE_API_KEY=${DOCSPACE_API_KEY}" docspace-mcp -- docker run --interactive --rm --env DOCSPACE_BASE_URL --env DOCSPACE_API_KEY onlyoffice/docspace-mcp
Required:DOCSPACE_BASE_URLDOCSPACE_API_KEY
README.md

Connects AI agents to ONLYOFFICE DocSpace for document workflow automation.

ONLYOFFICE DocSpace MCP Server

[Model Context Protocol] (MCP) is a standardized protocol for managing context between large language models (LLMs) and external systems. This repository provides an MCP server for [ONLYOFFICE DocSpace].

The DocSpace MCP Server connects AI tools directly to ONLYOFFICE DocSpace. This gives AI agents, assistants, and chatbots the ability to manage rooms, collaborate on files, handle permissions, and automate document workflows - all through natural language interactions.

Features

  • Tools with granular control - Access to tools organized into logical toolsets with fine-grained enable/disable capabilities and meta tools.
  • Multiple transport protocols - Support for stdio, SSE, and Streamable HTTP transports.
  • Different authentication methods - Supports API keys, Personal Access Tokens, Basic authentication, and OAuth 2.0 with dynamic client registration. See examples.
  • Request-level configuration - Configure authentication and tool selection during session initialization using custom HTTP headers.
  • Various distribution formats - Available as Docker image, Docker MCP Server, MCP bundle, and Node.js application.

Use Cases

  • Room Management: Create, update, and archive rooms. Configure room types, manage membership, and control access levels.
  • Folder & File Operations: Create folders, upload documents, copy or move items in batches, rename or delete content, and check file or folder details.
  • Collaboration & Permissions: Invite or remove users, adjust security settings, and review current access rights for rooms and shared spaces.
  • Content Access: Retrieve "My documents" or "Rooms" folders, get folder contents, download files as text, and monitor ongoing file operations.
  • People Directory: List all people in the portal to streamline invitations and access management.

Connecting Clients to DocSpace MCP Server

You can connect to the DocSpace MCP server using any MCP clients. We have covered some popular clients, such as Claude Desktop, Cursor, Windsurf, etc., and here you can read about it.

Remote DocSpace MCP Server

The remote DocSpace MCP Server is hosted by ONLYOFFICE and provides the fastest way to start using DocSpace tools inside your AI agent. You can connect to it instantly without deploying or configuring anything on your 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. It is preferable to use the Streamable HTTP transport whenever possible.

See all options for connecting clients to the Remote DocSpace MCP Server here.

Local DocSpace MCP Server

If your MCP host does not support remote MCP servers, you can run the local version of the DocSpace MCP Server instead.

Most clients that implement the MCP protocol have a common configuration file in the JSON format, inside which you can add the ONLYOFFICE DocSpace MCP Local Server.

Note: The common example below is applicable for Docker image, so Docker must be installed on your system.

Step 1. Locate your config file

Find your client .json configuration file.

Step 2. 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"
			}
		}
	}
}
Step 3. Set environment values
  • 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.

All available parameters are listed here.

Step 4. Restart the client

Close and reopen your client. In most cases, the DocSpace MCP Server will start automatically, and you'll be able to issue natural language commands like:

  • Create a new project room and invite Anna with editor rights.
  • Uplo

Tools (3)

room_managementCreate, update, and archive rooms, manage membership, and control access levels.
file_operationsCreate folders, upload documents, copy, move, rename, or delete content.
collaboration_permissionsInvite or remove users and adjust security settings for rooms and shared spaces.

Environment Variables

DOCSPACE_BASE_URLrequiredThe URL of your DocSpace instance
DOCSPACE_API_KEYrequiredYour personal API key generated in DocSpace settings

Configuration

claude_desktop_config.json
{"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"}}}}

Try it

Create a new project room and invite Anna with editor rights.
List all files in my 'Marketing' folder and tell me which ones were modified today.
Move the 'Q3 Report' file from the 'Drafts' folder to the 'Finalized' folder.
Remove access for user john.doe@example.com from the 'Internal' room.

Frequently Asked Questions

What are the key features of ONLYOFFICE DocSpace?

Granular control over tools with fine-grained enable/disable capabilities. Support for multiple transport protocols including stdio, SSE, and Streamable HTTP. Flexible authentication methods including API keys, Personal Access Tokens, and OAuth 2.0. Request-level configuration via custom HTTP headers. Available in multiple distribution formats including Docker and Node.js.

What can I use ONLYOFFICE DocSpace for?

Automating the creation and configuration of project rooms for new teams. Batch moving or renaming documents across folders to maintain file organization. Managing user access rights and invitations to sensitive document rooms. Retrieving and summarizing content from 'My documents' or specific room folders.

How do I install ONLYOFFICE DocSpace?

Install ONLYOFFICE DocSpace by running: docker run --interactive --rm --env DOCSPACE_BASE_URL --env DOCSPACE_API_KEY onlyoffice/docspace-mcp

What MCP clients work with ONLYOFFICE DocSpace?

ONLYOFFICE DocSpace works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep ONLYOFFICE DocSpace docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare