docspace-mcp

docspace-mcp

1

The ONLYOFFICE DocSpace MCP Server is a platform designed to facilitate integration between large language models and ONLYOFFICE DocSpace by using the standardized Model Context Protocol (MCP). It supports various tools for file, room, and user management to enhance productivity and collaboration.

ONLYOFFICE DocSpace MCP Server

Open in VS Code using npx command Open in VS Code Insiders using npx command

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.

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 a table with the names of available environment variables and their descriptions:

NameDescription
DOCSPACE_BASE_URLThe base URL of the DocSpace instance. This configuration is required for making API requests to DocSpace.
DOCSPACE_ORIGINThe origin of the DocSpace instance. This configuration is not required but can be used to specify the Origin header in requests to DocSpace.
DOCSPACE_USER_AGENTThe user agent to use for requests. This configuration is not required but can be used to specify the User-Agent header in requests to DocSpace.
DOCSPACE_API_KEYThe API key for accessing the DocSpace API. This configuration is required if nether DOCSPACE_AUTH_TOKEN nor DOCSPACE_USERNAME and DOCSPACE_PASSWORD are provided.
DOCSPACE_AUTH_TOKENThe authentication token for accessing the DocSpace API. This configuration is required if neither DOCSPACE_API_KEY nor DOCSPACE_USERNAME and DOCSPACE_PASSWORD are provided.
DOCSPACE_USERNAMEThe username for accessing the DocSpace API using basic authentication. This configuration is required if neither DOCSPACE_API_KEY nor DOCSPACE_AUTH_TOKEN are provided. This is used in conjunction with DOCSPACE_PASSWORD.
DOCSPACE_PASSWORDThe password for accessing the DocSpace API using basic authentication. This configuration is required if neither DOCSPACE_API_KEY nor DOCSPACE_AUTH_TOKEN are provided. This is used in conjunction with DOCSPACE_USERNAME.

Usage

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

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_invitation_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

This SDK is distributed under the Apache-2.0 license found in the LICENSE file.