pagespace-mcp
v5.2.7
Published
DEPRECATED — use @pagespace/cli's "pagespace mcp" instead. Model Context Protocol (MCP) server for PageSpace. Conformant tool surface mirroring the web app's pageSpaceTools registry — drive management, page operations, content search, sheet editing, task
Maintainers
Readme
PageSpace MCP Server
Deprecated. This package is no longer maintained. Install
@pagespace/cliand runpagespace mcpinstead — same tool surface, generated from the same registry the CLI and SDK use. Authenticate withpagespace login(or a scoped token frompagespace tokens createfor CI/agents) instead of thePAGESPACE_AUTH_TOKENenv var. Seemigrating-from-pagespace-mcp.mdfor config-diff examples. This version keeps working unchanged — it just prints a startup deprecation notice to stderr.
A Model Context Protocol (MCP) server that enables Claude Code and Claude Desktop to directly read, edit, create, manage, and organize your PageSpace documents with full CRUD operations and line-level precision.
Quick Start
- Set up MCP tokens in your PageSpace instance
- Configure Claude Desktop/Code with your tokens (no installation needed!)
- Start editing your PageSpace documents with Claude!
Features
- 70 tools, full parity with the web app's
pageSpaceToolsregistry — drive, page, search, task, agent, calendar, conversations, channel, commands, roles, triggers, workflows, and activity coverage - Verb-based task surface:
create_task,update_task,delete_task,reorder_task, andcreate_task_status(mirrors web PR #1455) - Agent triggers: schedule an AI agent to run on a task's due date or completion — at create time (
create_task), on update (update_task), or via the dedicatedset_task_trigger/delete_task_triggertools; timezone-aware - Custom status discovery:
read_pageon TASK_LIST pages returnsavailableStatuses(slug, label, group), dynamic progress counts, parent task list, and per-task sub-task counts - Page management: move, reorder, trash, and restore with hierarchy support
- Line-based editing: replace, insert, and delete specific lines; ranged reads via
startLine/endLine - Sheet editing: edit spreadsheet cells with formula support
- Multi-page types: FOLDER, DOCUMENT, CHANNEL, AI_CHAT, CANVAS, SHEET, TASK_LIST, CODE (plus CHANNEL transcripts and FILE processing status via
read_page) - Search: regex and glob patterns, single-drive or multi-drive
- AI agents: create via
create_page(type=AI_CHAT) +update_agent_config; list agents, and consult them with persistent, continuable conversations (ask_agentreturns aconversationId) - Calendar: list / get / availability / create / update / delete events (timezone, recurrence, visibility, color, agent triggers); RSVP and attendee management
- Conversations & channels: list / read AI agent conversations, send channel messages (threads, quotes, files), fetch activity feeds
- Trash system: safe soft-delete with restore for pages and drives
- Secure: per-user MCP tokens
Available Tools
📁 Drive Management (5 tools)
list_drives— list all available workspaces/drives (with your role;includeTrashto see trashed drives)create_drive— create a new workspace/driverename_drive— rename an existing drive (owner only; the drive slug is regenerated from the new name)update_drive_context— set the AI context/system prompt for a driveset_home_page— set a drive's home page
📄 Page Operations (10 tools)
list_pages— explore the page tree within a drivelist_trash— list trashed pagesread_page— read any page; supports ranged reads (startLine/endLine). TASK_LIST output includes tasks with IDs,availableStatuses, progress, and sub-task counts; CHANNEL pages return a message transcript; FILE pages report processing statusget_page_details— full metadata for a page (includingrevisionfor optimistic-concurrency writes)create_page— create FOLDER, DOCUMENT, CHANNEL, AI_CHAT, CANVAS, SHEET, TASK_LIST, or CODE (optionalcontentandcontentModehtml/markdown)rename_page— rename a pagemove_page— move/reorder a page within the drivereplace_lines— replace specific line(s) in a documentinsert_lines— insert content at a specific linedelete_lines— delete a range of lines
🗑️ Trash & Restore (4 tools)
trash_page— move a page to trash (optionally with its children)trash_drive— move a drive to trash (requiresconfirmDriveNameto match exactly)restore_page— restore a trashed pagerestore_drive— restore a trashed drive
📊 Sheet Editing (1 tool)
edit_sheet_cells— edit SHEET cells with A1 addressing and formulas
✅ Task Management (6 tools)
create_task— create a task on a TASK_LIST page (pageId+title); supportsassigneeId/assigneeAgentId/assigneeIds,dueDate,note,position,timezone, and an optionalagentTrigger(schedule an AI agent on due-date/completion)update_task— update fields of an existing task (pageId+taskId+ fields to change); supportsnote, andagentTriggerto create/replace the task's trigger; assignees and dueDate acceptnullto cleardelete_task— delete a task (pageId+taskId) by trashing its linked TASK_LIST child page; restoring that page resurrects the taskreorder_task— move a task to a newposition(re-densifies peer positions)create_task_status— add a custom status (name,color,group) to a TASK_LIST; slug is auto-generatedget_assigned_tasks— list assigned tasks across drives; excludes completed tasks by default (includeCompleted: trueto include).context(user/drive), plus filters:driveId,status,priority,assigneeId,assigneeAgentId,showAllAssignees,dueDateFilter,startDate/endDate,statusGroup,search,limit,offset
🔍 Search & Discovery (3 tools)
regex_search— regular-expression search across page contentglob_search— glob-pattern search over titles/pathsmulti_drive_search— text or regex search across multiple drives
🤖 AI Agents (4 tools)
update_agent_config— update an agent's system prompt, enabled tools, provider, model, agent definition, tool exposure mode, and visibility (use aftercreate_pagewith type=AI_CHAT to set up a new agent)list_agents— list AI agents in a specific drivemulti_drive_list_agents— list AI agents across all accessible drivesask_agent— consult another AI agent; conversations persist and return aconversationIdyou can pass back to continue them
📅 Calendar (9 tools)
list_calendar_events— list events (and scheduled agent runs) betweenstartDateandendDate; optionaldriveIdscopeget_calendar_event— full details of a single event, including attendees with RSVP statuscheck_calendar_availability— find free gaps betweenstartDateandendDate(raw gaps — no working-hours windowing or recurrence expansion)create_calendar_event— create an event (startAt,endAt; invitees viaattendeeIds; supportstimezone,recurrenceRule,visibility,color, linkedpageId, and anagentTrigger)update_calendar_event— update fields on an existing event (same field surface as create;agentTrigger: nullremoves the trigger)delete_calendar_event— delete an eventrsvp_calendar_event— respondACCEPTED/DECLINED/TENTATIVE/PENDING(uppercase), with an optionalresponseNoteinvite_calendar_attendees— invite attendees byuserIds(optionally as optional attendees)remove_calendar_attendee— remove an attendee bytargetUserId
💬 Conversations, Channels & Activity (5 tools)
list_conversations— list conversations for an AI agent (paginated, with titles and message counts)read_conversation— read a conversation transcript (message text, tool-call summaries, cursor pagination)send_channel_message— post to a CHANNEL page (thread replies viaparentId, quotes, file attachments); returns the message IDdelete_channel_message— delete a message from a CHANNEL pageget_activity— fetch activity feed (workspace/drive/page scope) withoperation,resourceType,actorId, and date filters
💻 Slash Commands (4 tools)
list_commands— list slash commands in a drivecreate_command— create a slash command (name,description,prompt)update_command— update a slash command's fieldsdelete_command— delete a slash command
👥 Members & Collaborators (2 tools)
list_drive_members— list all members of a drive (including the owner) with roles, permission counts, and pending inviteslist_collaborators— list collaborators across the workspace (optionally filtered by connection status)
🔐 Role Management (8 tools)
list_drive_roles— list all roles in a drive (with position and default flag)get_drive_role— get details of a specific rolecreate_drive_role— create a new drive role (name, description, color, optional initial per-pagepermissionsanddriveWidePermissions)update_drive_role— update a role's name, description, or color (nullclears a field)delete_drive_role— delete a drive roleset_role_page_permissions— set page-level permissions for a role (atomic server-side patch; other pages' grants are untouched; all three flags required)set_role_drive_wide_permissions— set drive-wide default permissions for a roleremove_role_page_permissions— remove a page's override so the role falls back to its drive-wide permissions
⚡ Agent Triggers (4 tools)
set_calendar_trigger— attach an AI agent trigger to a calendar eventdelete_calendar_trigger— remove a calendar event triggerset_task_trigger— attach an AI agent trigger to a task (due date or completion)delete_task_trigger— remove a task trigger
🔄 Scheduled Workflows (4 tools)
list_workflows— list scheduled workflows in a drive (with last-run status and timing)create_workflow— create a scheduled workflow (cronExpression,agentPageId, and apromptand/orinstructionPageId)update_workflow— update workflow fields (cron, prompt, instruction page, enabled state, etc.)delete_workflow— delete a scheduled workflow
🧠 Models (1 tool)
list_models— list available AI models for agent configuration
Setup Instructions
1. Generate an MCP Token
- Start your PageSpace application
- Navigate to Dashboard > Settings > MCP Connection (or
/dashboard/settings/mcp) - Click Create New Token to generate a new MCP token
- Give your token a descriptive name (e.g., "Claude Desktop", "Development")
- Copy and save the token immediately - it's only shown once for security
2. Configure Claude Desktop
Add this to your Claude Desktop MCP configuration file:
For PageSpace Beta (most common):
{
"mcpServers": {
"pagespace": {
"command": "npx",
"args": [
"-y",
"pagespace-mcp@latest"
],
"env": {
"PAGESPACE_API_URL": "https://beta.pagespace.ai",
"PAGESPACE_AUTH_TOKEN": "<YOUR_PAGESPACE_MCP_TOKEN_HERE>"
}
}
}
}For self-hosted PageSpace:
{
"mcpServers": {
"pagespace": {
"command": "npx",
"args": [
"-y",
"pagespace-mcp@latest"
],
"env": {
"PAGESPACE_API_URL": "https://your-pagespace-domain.com",
"PAGESPACE_AUTH_TOKEN": "<YOUR_PAGESPACE_MCP_TOKEN_HERE>"
}
}
}
}3. Test the Connection
Restart Claude Desktop and try:
"Show me my drives"
Claude should list your available drives, then you can:
"Show me the page tree in [drive-name]"
"Read the [document-name] document"
Claude will guide you through the workflow: drives → page tree → documents → editing!
Usage Examples
Getting Started
"Show me my drives" "Show me the page tree in my-drive" (use driveSlug and driveId from list_drives) "Read the document [page-id]" (use pageId from list_pages)
Line Replacement
"Replace line 15 in [page-id] with a new heading:
<h2>New Section</h2>" (use pageId from list_pages) "Replace lines 8-10 in [page-id] with a code block showing the API example"
Sheet Editing
"Set cell A1 to 100 and B1 to a formula =A1*2 in sheet [page-id]" "Update the budget spreadsheet with new values in cells A1:C5"
Task Management
"Create a new task 'Review PR' on task list [page-id]" (uses
create_task) "Create task 'Send report' due [date] and have agent [agent-id] follow up when it's done" (usescreate_taskwithagentTrigger) "Update task [task-id] on page [page-id] — set status to completed" (usesupdate_task) "Delete task [task-id] on page [page-id]" (usesdelete_task; trashes the linked TASK_LIST child page) "Move task [task-id] on page [page-id] to position 0" (usesreorder_task; re-densifies peers) "Add a custom 'In Review' status to task list [page-id]" (usescreate_task_status) "Read task list [page-id] and tell me which custom statuses are available" (usesavailableStatuses)
Page Management
"Create a new folder called 'Meeting Notes' in drive [drive-id]" "Create a document called 'Project Plan' under parent [parent-id] with some initial content" "Create a new spreadsheet called 'Budget' in drive [drive-id]" "Rename page [page-id] to 'Q4 Project Plan'" "Move page [page-id] to be under parent [parent-id] at position 2"
Trash and Restore
"Move page [page-id] to trash" (uses
trash_page) "Show me what's in the trash for drive [drive-id]" (useslist_trash) "Restore page [page-id] from trash" (usesrestore_page) "Trash the drive [drive-id] — its name is 'Old Workspace'" (usestrash_drivewithconfirmDriveName)
Search Operations
"Search for all pages containing 'TODO' using regex in drive [drive-id]" "Find all pages matching '*.md' pattern" "Search across all my drives for 'API documentation'"
AI Agent Operations
"Create an AI_CHAT page called 'Code Reviewer' in drive [drive-id]" (uses
create_page) "Update agent [agent-id] config — set systemPrompt and enable read_page + regex_search" (usesupdate_agent_config) "List all AI agents across my workspaces" "Ask the 'Documentation Writer' agent to help improve this page"
Calendar
"List my calendar events between [startDate] and [endDate] in ISO 8601" "Create a calendar event 'Standup' from [startAt] to [endAt] and invite attendees [attendeeIds]" "Create a weekly recurring event 'Retro' in my timezone with a reminder agent" (uses
recurrenceRule,timezone,agentTrigger) "RSVP ACCEPTED to event [event-id] with a note" "Remove user [targetUserId] from event [event-id]"
Workflow
The typical workflow is: drives → page tree → documents → editing/management.
For content editing: list_drives → list_pages → read_page (with pageId) → replace_lines (with same pageId) For sheet editing: list_drives → list_pages → read_page (SHEET type) → edit_sheet_cells (with pageId and cells) For task management: list_drives → list_pages → create_task / update_task (with pageId of TASK_LIST)
Note: The system uses IDs for operations. When you use list_pages, you'll see both the path (for easy reading) and the ID (for operations).
Claude will guide you through each step!
Limitations
check_calendar_availabilitycomputes raw free gaps across the requested range — it does not apply working-hours windows or expand recurring events. Treat its output as "no events scheduled", not "good time for a meeting".delete_taskis a soft delete: it trashes the task's linked TASK_LIST child page; restoring that page brings the task back. There is no hard delete over MCP.
Security Notes
- Each MCP token is scoped to your specific user account
- Tokens can be revoked at any time from the web interface
- The server only accesses your documents, not other users'
- All changes go through the same validation as the web editor
Development
To run the MCP server in development mode:
pnpm run devThis enables file watching for automatic restarts during development.
Troubleshooting
Authentication Errors
- Verify your MCP token is correct and hasn't been revoked
- Check that
PAGESPACE_AUTH_TOKENis set in your MCP configuration
Connection Issues
- Ensure your PageSpace app is running on the specified URL
- Check that the API URL in the MCP config matches your app's URL
Line Number Issues
- Line numbers are 1-based (first line is line 1)
- Line numbering matches the web app's AI tools: HTML documents are normalized so each block element is a line; CODE and markdown pages keep their natural lines
- Always read the document first to see current line numbers; use
startLine/endLineonread_pagefor large documents
API Reference
The MCP server communicates with the PageSpace REST API using your MCP bearer token. Key endpoints include:
/api/mcp/documents- Document read/replace/insert/delete and sheet cell editing/api/drives,/api/pages- Drive and page management/api/pages/[pageId]/tasks,/api/tasks- Task management and assigned-task queries/api/calendar/events- Calendar events, attendees, and triggers/api/workflows,/api/commands,/api/activities- Workflows, slash commands, activity feeds/api/ai/page-agents- Agent listing, configuration, and consultation/api/auth/mcp-tokens- MCP token management (create/list/revoke from the web UI)
Requirements
- Node.js: >= 18.0.0
- PageSpace: Any version with MCP support
- Claude Desktop or Claude Code with MCP enabled
Contributing
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request
Support
- 💬 Discord: Join our Discord for support questions
- 📖 Documentation: PageSpace Docs
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by the PageSpace Team
