npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

Readme

PageSpace MCP Server

npm version License: MIT

Deprecated. This package is no longer maintained. Install @pagespace/cli and run pagespace mcp instead — same tool surface, generated from the same registry the CLI and SDK use. Authenticate with pagespace login (or a scoped token from pagespace tokens create for CI/agents) instead of the PAGESPACE_AUTH_TOKEN env var. See migrating-from-pagespace-mcp.md for 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

  1. Set up MCP tokens in your PageSpace instance
  2. Configure Claude Desktop/Code with your tokens (no installation needed!)
  3. Start editing your PageSpace documents with Claude!

Features

  • 70 tools, full parity with the web app's pageSpaceTools registry — 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, and create_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 dedicated set_task_trigger / delete_task_trigger tools; timezone-aware
  • Custom status discovery: read_page on TASK_LIST pages returns availableStatuses (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_agent returns a conversationId)
  • 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; includeTrash to see trashed drives)
  • create_drive — create a new workspace/drive
  • rename_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 drive
  • set_home_page — set a drive's home page

📄 Page Operations (10 tools)

  • list_pages — explore the page tree within a drive
  • list_trash — list trashed pages
  • read_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 status
  • get_page_details — full metadata for a page (including revision for optimistic-concurrency writes)
  • create_page — create FOLDER, DOCUMENT, CHANNEL, AI_CHAT, CANVAS, SHEET, TASK_LIST, or CODE (optional content and contentMode html/markdown)
  • rename_page — rename a page
  • move_page — move/reorder a page within the drive
  • replace_lines — replace specific line(s) in a document
  • insert_lines — insert content at a specific line
  • delete_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 (requires confirmDriveName to match exactly)
  • restore_page — restore a trashed page
  • restore_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); supports assigneeId / assigneeAgentId / assigneeIds, dueDate, note, position, timezone, and an optional agentTrigger (schedule an AI agent on due-date/completion)
  • update_task — update fields of an existing task (pageId + taskId + fields to change); supports note, and agentTrigger to create/replace the task's trigger; assignees and dueDate accept null to clear
  • delete_task — delete a task (pageId + taskId) by trashing its linked TASK_LIST child page; restoring that page resurrects the task
  • reorder_task — move a task to a new position (re-densifies peer positions)
  • create_task_status — add a custom status (name, color, group) to a TASK_LIST; slug is auto-generated
  • get_assigned_tasks — list assigned tasks across drives; excludes completed tasks by default (includeCompleted: true to 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 content
  • glob_search — glob-pattern search over titles/paths
  • multi_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 after create_page with type=AI_CHAT to set up a new agent)
  • list_agents — list AI agents in a specific drive
  • multi_drive_list_agents — list AI agents across all accessible drives
  • ask_agent — consult another AI agent; conversations persist and return a conversationId you can pass back to continue them

📅 Calendar (9 tools)

  • list_calendar_events — list events (and scheduled agent runs) between startDate and endDate; optional driveId scope
  • get_calendar_event — full details of a single event, including attendees with RSVP status
  • check_calendar_availability — find free gaps between startDate and endDate (raw gaps — no working-hours windowing or recurrence expansion)
  • create_calendar_event — create an event (startAt, endAt; invitees via attendeeIds; supports timezone, recurrenceRule, visibility, color, linked pageId, and an agentTrigger)
  • update_calendar_event — update fields on an existing event (same field surface as create; agentTrigger: null removes the trigger)
  • delete_calendar_event — delete an event
  • rsvp_calendar_event — respond ACCEPTED / DECLINED / TENTATIVE / PENDING (uppercase), with an optional responseNote
  • invite_calendar_attendees — invite attendees by userIds (optionally as optional attendees)
  • remove_calendar_attendee — remove an attendee by targetUserId

💬 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 via parentId, quotes, file attachments); returns the message ID
  • delete_channel_message — delete a message from a CHANNEL page
  • get_activity — fetch activity feed (workspace/drive/page scope) with operation, resourceType, actorId, and date filters

💻 Slash Commands (4 tools)

  • list_commands — list slash commands in a drive
  • create_command — create a slash command (name, description, prompt)
  • update_command — update a slash command's fields
  • delete_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 invites
  • list_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 role
  • create_drive_role — create a new drive role (name, description, color, optional initial per-page permissions and driveWidePermissions)
  • update_drive_role — update a role's name, description, or color (null clears a field)
  • delete_drive_role — delete a drive role
  • set_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 role
  • remove_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 event
  • delete_calendar_trigger — remove a calendar event trigger
  • set_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 a prompt and/or instructionPageId)
  • 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

  1. Start your PageSpace application
  2. Navigate to Dashboard > Settings > MCP Connection (or /dashboard/settings/mcp)
  3. Click Create New Token to generate a new MCP token
  4. Give your token a descriptive name (e.g., "Claude Desktop", "Development")
  5. 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" (uses create_task with agentTrigger) "Update task [task-id] on page [page-id] — set status to completed" (uses update_task) "Delete task [task-id] on page [page-id]" (uses delete_task; trashes the linked TASK_LIST child page) "Move task [task-id] on page [page-id] to position 0" (uses reorder_task; re-densifies peers) "Add a custom 'In Review' status to task list [page-id]" (uses create_task_status) "Read task list [page-id] and tell me which custom statuses are available" (uses availableStatuses)

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]" (uses list_trash) "Restore page [page-id] from trash" (uses restore_page) "Trash the drive [drive-id] — its name is 'Old Workspace'" (uses trash_drive with confirmDriveName)

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" (uses update_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: drivespage treedocumentsediting/management.

For content editing: list_driveslist_pagesread_page (with pageId) → replace_lines (with same pageId) For sheet editing: list_driveslist_pagesread_page (SHEET type) → edit_sheet_cells (with pageId and cells) For task management: list_driveslist_pagescreate_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_availability computes 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_task is 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 dev

This 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_TOKEN is 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/endLine on read_page for 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

  1. Fork the repository
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by the PageSpace Team