API endpoints for MCP (Model Context Protocol) clients. These routes are used by the pagespace-mcp server to interact with PageSpace.
All MCP routes authenticate via Authorization: Bearer mcp_... header.
Perform line operations on document content.
Body:
{
"pageId": "string",
"operation": "read | replace | insert | delete",
"startLine": 1,
"endLine": 10,
"content": "string (for replace/insert)"
}
Operations:
read — Read content with line numbersreplace — Replace lines in a rangeinsert — Insert content at a linedelete — Delete lines in a rangeContent is automatically formatted and validated.
List drives accessible via the MCP token.
Response:
[{
"id": "string",
"name": "string",
"slug": "string",
"pageCount": 23
}]
If the token is scoped to specific drives, only those drives are returned.
Detect and resolve MCP paths for integrations. Used by the MCP server to resolve page references.
MCP API routes use Bearer token authentication:
Authorization: Bearer mcp_abc123...
Tokens are created via POST /api/auth/mcp-tokens or Settings > MCP in the web UI. Each token authenticates as a specific user with that user's permissions.
Search docs, blog posts, and more.