# ONLYOFFICE DocSpace — how to use (mcp.ai)

Connect your ONLYOFFICE DocSpace account and use 10 tools for documents straight from your AI agent. Connect with your own API key. ONLYOFFICE DocSpace provides tenant-hosted APIs for managing rooms, documents, files, folders, users, groups, sharing, and portal settings.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_onlyoffice_docspace?ms=1787295960000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `onlyoffice_docspace_create_folder`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/onlyoffice_docspace`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/onlyoffice_docspace/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/onlyoffice_docspace/create/folder` — Create a named subfolder inside an existing DocSpace folder.
  - body: { title: string, parent_folder_id: integer }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/create/text/file` — Create a plain-text file with supplied content inside a DocSpace folder.
  - body: { title: string, content?: string, folder_id: integer, create_new_if_exists?: boolean }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/delete/item` — Move one file or folder to Trash, or permanently delete it when explicitly requested, then wait for the asynchronous operation to finish.
  - body: { item_id: integer, item_type: string, permanently?: boolean, delete_after_editing?: boolean }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/get/account/context` — Return the connected user's identity, non-secret API-key metadata, available key permissions, portal capabilities, and quota features in one read-only preflight.
- `POST https://api.mcp.ai/api/onlyoffice_docspace/get/file` — Return metadata, version information, and effective security flags for one file by ID.
  - body: { file_id: integer, version?: integer }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/get/room` — Return detailed metadata and effective security flags for one room by ID.
  - body: { room_id: integer }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/list/folder/items` — List files and subfolders in My Documents or a folder selected by numeric ID, with optional text or extension filtering.
  - body: { limit?: integer, query?: string, cursor?: string, extension?: string, folder_id?: integer|string }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/list/groups` — List or search DocSpace groups, optionally restricted to groups associated with a user or manager role.
  - body: { limit?: integer, query?: string, cursor?: string, manager?: boolean, user_id?: string }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/list/people` — List visible DocSpace users, optionally filtering by text, group membership, or administrator status.
  - body: { limit?: integer, query?: string, cursor?: string, group_id?: string, without_group?: boolean, is_administrator?: boolean }
- `POST https://api.mcp.ai/api/onlyoffice_docspace/list/rooms` — List rooms visible to the connected account, optionally filtering by text and continuing from a previous page.
  - body: { limit?: integer, query?: string, cursor?: string }

## Example prompts
- "What can I do in ONLYOFFICE DocSpace?"
- "Show me a summary of my ONLYOFFICE DocSpace account"

## More
- Page: https://mcp.ai/onlyoffice_docspace
- Agent spec (llms.txt): https://mcp.ai/onlyoffice_docspace/llms.txt
- Postman collection: https://mcp.ai/onlyoffice_docspace/postman.json
