docspace-mcp

docspace-mcp

3.2

If you are the rightful owner of docspace-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

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.

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.

[!WARNING]

This ONLYOFFICE DocSpace MCP server is currently in preview state. While functional, it may undergo breaking changes, have incomplete features, or contain bugs. Use with caution in production environments and expect potential updates that could affect compatibility.

Installation

Most clients that implement the MCP protocol have a common configuration file in JSON format, inside which you can add ONLYOFFICE DocSpace MCP server as follows:

{
	"mcpServers": {
		"onlyoffice-docspace": {
			"env": {
				"DOCSPACE_BASE_URL": "https://your-instance.onlyoffice.com",
				"DOCSPACE_API_KEY": "your-api-key"
			},
			"command": "npx",
			"args": ["--yes", "@onlyoffice/docspace-mcp"]
		}
	}
}

For a more detailed example of the MCP server installation process, see how it can be done using Claude Desktop.

Configuration

The only way to configure ONLYOFFICE DocSpace MCP server is through environment variables. Below is an example of the .env file with possible configuration options:

# The base URL of the DocSpace instance for API requests.
# Type: URL
# Presence: Required
# Example: https://your-instance.onlyoffice.com
DOCSPACE_BASE_URL=

# The origin URL to include in the Origin header for DocSpace API requests.
# Type: URL
# Presence: Optional
# Example: https://your-instance.onlyoffice.com
DOCSPACE_ORIGIN=

# The user agent to include in the User-Agent header for DocSpace API requests.
# Type: String
# Presence: Optional
# Default: @onlyoffice/docspace-mcp v1.3.0
DOCSPACE_USER_AGENT=

# The API key for accessing the DocSpace API.
# Type: String
# Presence:
#   Required if nether DOCSPACE_AUTH_TOKEN nor DOCSPACE_USERNAME and
#   DOCSPACE_PASSWORD are provided.
# Example: sk-a499e...
DOCSPACE_API_KEY=

# The Personal Access Token (PAT) for accessing the DocSpace API.
# Type: String
# Presence:
#   Required if neither DOCSPACE_API_KEY nor DOCSPACE_USERNAME and
#   DOCSPACE_PASSWORD are provided.
# Example: Fe4Hrgl6...
DOCSPACE_AUTH_TOKEN=

# The username for accessing the DocSpace API using basic authentication.
# Type: String
# Presence:
#   Required if neither DOCSPACE_API_KEY nor DOCSPACE_AUTH_TOKEN are provided.
#   This configuration is used in conjunction with DOCSPACE_PASSWORD.
# Example: henry.milton@onlyoffice.com
DOCSPACE_USERNAME=

# The password for accessing the DocSpace API using basic authentication.
# Type: String
# Presence:
#   Required if neither DOCSPACE_API_KEY nor DOCSPACE_AUTH_TOKEN are provided.
#   This configuration is used in conjunction with DOCSPACE_USERNAME.
# Example: ditgor-p...
DOCSPACE_PASSWORD=

# Whether to enable dynamic tools.
# Type: Boolean
# Presence: Optional
# Default: false
DOCSPACE_DYNAMIC=

# The list of toolsets to use or 'all' to use all available toolsets.
# Type: Comma-separated list of strings
# Presence: Optional
# Default: all
DOCSPACE_TOOLSETS=

Usage

Model Context Protocol describes several different concepts, however ONLYOFFICE DocSpace MCP server implements Tools only.

Toolsets

In addition to the existing concept of Tools, ONLYOFFICE DocSpace MCP server introduces a new one, Toolsets. A Toolset is a set of related tools. Using the DOCSPACE_TOOLSETS configuration option, you can specify the tools from selected toolsets that will be available in ONLYOFFICE DocSpace MCP server. Below is a table with the names of available toolsets and their descriptions:

#NameDescription
1filesOperations for working with files, folders, and rooms.
2othersOperations for listing additional enumeration values. Operations for downloading and uploading files.
3peopleOperations for working with users.
4portalOperations for working with the portal.
5settingsOperations for working with settings.

Meta Tools

In some cases, directly connecting all available tools can be problematic. Using the DOCSPACE_DYNAMIC configuration option, you can wrap all available tools into meta-tools. Meta-tools are tools that allow an AI model to interact with other tools dynamically without loading them all simultaneously. Below is a table with the names of available meta-tools and their descriptions:

#NameDescription
1call_toolThis is a meta-tool for calling a tool. The list of available tools can be obtained using the list_tools meta-tool. The input schema can be obtained using the get_tool_input_schema meta-tool.
2get_tool_input_schemaThis is a meta-tool for getting an input schema for a specific tool. The list of available tools can be obtained using the list_tools meta-tool.
3list_toolsThis is a meta-tool for listing available tools of a specific toolset. The list of available toolsets can be obtained using the list_toolsets meta-tool.
4list_toolsetsThis is a meta-tool for listing available toolsets. Toolset is a set of available tools.

Tools

Below is a table with the names of available tools and their descriptions:

#NameDescription
1files_archive_roomArchive a room.
2files_copy_batch_itemsCopy to a folder.
3files_create_folderCreate a folder.
4files_create_roomCreate a room.
5files_delete_fileDelete a file.
6files_delete_folderDelete a folder.
7files_get_file_infoGet file information.
8files_get_folderGet content of a folder.
9files_get_folder_infoGet folder information.
10files_get_foldersGet subfolders of a folder.
11files_get_my_folderGet the 'My Documents' folder.
12files_get_operation_statusesGet active file operations.
13files_get_room_infoGet room information.
14files_get_room_security_infoGet a list of users with their access levels to a room.
15files_get_rooms_folderGet the 'Rooms' folder.
16files_move_batch_itemsMove to a folder.
17files_rename_folderRename a folder.
18files_set_room_securityInvite or remove users from a room.
19files_update_fileUpdate a file.
20files_update_roomUpdate a room.
21others_download_as_textDownload a file as text.
22others_get_available_room_accessGet a list of available room invitation access levels.
23others_get_available_room_typesGet a list of available room types.
24others_upload_fileUpload a file.
25people_get_allGet all people.
26portal_get_quotaGet the current quota.
27portal_get_tariffGet the current tariff.
28settings_get_supported_culturesGet a list of the supported cultures, languages.
29settings_get_time_zonesGet a list of the available time zones.

License

ONLYOFFICE DocSpace MCP server is distributed under the Apache-2.0 license found in the LICENSE file.