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

v4.0.1

Published

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, combined task management (create/update/delete/reorder via updat

Downloads

460

Readme

PageSpace MCP Server

npm version License: MIT

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

  • 37 tools, full parity with the web app's pageSpaceTools registry — drive, page, search, task, agent, calendar, conversations, channel, and activity coverage
  • Combined task surface: a single update_task tool covers create, update, delete, and reorder
  • Custom status discovery: read_page on TASK_LIST pages returns availableStatuses (slug, label, group) and dynamic progress counts keyed by status group
  • Page management: move, reorder, trash, and restore with hierarchy support
  • Line-based editing: replace specific lines with precision
  • Sheet editing: edit spreadsheet cells with formula support
  • Multi-page types: FOLDER, DOCUMENT, CHANNEL, AI_CHAT, CANVAS, SHEET, TASK_LIST
  • Search: regex and glob patterns, single-drive or multi-drive
  • AI agents: create via create_page (type=AI_CHAT) + update_agent_config; list and consult agents
  • Calendar: list / get / availability / create / update / delete events; RSVP and attendee management
  • Conversations & channels: list / read AI agent conversations, send channel messages, fetch activity feeds
  • Trash system: safe soft-delete with restore for pages and drives
  • Secure: per-user MCP tokens

Available Tools

📁 Drive Management (4 tools)

  • list_drives — list all available workspaces/drives
  • create_drive — create a new workspace/drive
  • rename_drive — rename an existing drive (owner only)
  • update_drive_context — set the AI context/system prompt for a drive

📄 Page Operations (8 tools)

  • list_pages — explore the page tree within a drive
  • list_trash — list trashed pages
  • read_page — read any page (TASK_LIST output includes availableStatuses and dynamic progress)
  • get_page_details — full metadata for a page
  • create_page — create FOLDER, DOCUMENT, CHANNEL, AI_CHAT, CANVAS, SHEET, or TASK_LIST
  • rename_page — rename a page
  • move_page — move/reorder a page within the drive
  • replace_lines — replace specific line(s) in a document

🗑️ Trash & Restore (2 tools)

  • trash — move a page or drive to trash (drives require name confirmation)
  • restore — restore a trashed page or drive

📊 Sheet Editing (1 tool)

  • edit_sheet_cells — edit SHEET cells with A1 addressing and formulas

✅ Task Management (2 tools)

  • update_task — combined create/update/delete/reorder for tasks on a TASK_LIST page
    • Create: pageId + title
    • Update: pageId + taskId + fields to change
    • Delete: pageId + taskId + delete: true (hard-removes the task and trashes its linked DOCUMENT page; field updates in the same call are ignored)
    • Reorder: pageId + taskId + position (re-densifies peer positions; combine with field updates freely)
  • get_assigned_tasks — tasks assigned to a user, optionally filtered by drive

🔍 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 (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 for specialized knowledge

📅 Calendar (9 tools)

  • list_calendar_events — list events between startDate and endDate
  • get_calendar_event — full details of a single event
  • check_calendar_availability — find free slots between startDate and endDate
  • create_calendar_event — create an event (startAt, endAt; invitees via userIds)
  • update_calendar_event — update fields on an existing event (startAt/endAt)
  • delete_calendar_event — delete an event
  • rsvp_calendar_event — respond ACCEPTED / DECLINED / TENTATIVE (uppercase)
  • invite_calendar_attendees — invite attendees by userIds
  • remove_calendar_attendee — remove an attendee by targetUserId

💬 Conversations, Channels & Activity (4 tools)

  • list_conversations — list conversations for an AI agent
  • read_conversation — read a full conversation transcript
  • send_channel_message — post to a CHANNEL page (session auth only — see note below)
  • get_activity — fetch activity feed (workspace/drive/page scope)

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 (combined update_task)

"Create a new task 'Review PR' on task list [page-id]" "Update task [task-id] on page [page-id] — set status to completed" "Delete task [task-id] on page [page-id]" (passes delete: true; trashes the linked DOCUMENT page) "Move task [task-id] on page [page-id] to position 0" (reorders and re-densifies peers) "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" "Show me what's in the trash for drive [drive-id]" "Restore page [page-id] from trash"

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 users [userIds]" "RSVP ACCEPTED to event [event-id]" "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_pagesupdate_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!

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)
  • After operations, Prettier may reformat and change line numbers
  • Always read the document first to see current line numbers

API Reference

The MCP server communicates with these PageSpace endpoints:

  • /api/mcp/drives - Drive discovery and listing
  • /api/mcp/documents - Document operations (GET for reading, POST for write operations)
  • /api/mcp/detect-paths - Path validation and normalization
  • /api/auth/mcp-tokens - MCP token management (GET to list, POST to create)
  • /api/auth/mcp-tokens/[tokenId] - Revoke MCP token (DELETE)

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