PageSpace speaks the Model Context Protocol (MCP) — an open standard for giving AI tools access to external data and actions. The pagespace CLI runs pagespace mcp, a local MCP server that lets tools like Claude Desktop, Claude Code, and Cursor read and write your PageSpace workspace.
AI tool (MCP client) → pagespace mcp (MCP server) → PageSpace API
↓
Your workspace
Every operation runs with the permissions of whoever (or whatever) authenticated — always a scoped credential naming specific drives, never your full personal account: pagespace mcp refuses to start on nothing but a bare pagespace login, by design (see below).
npm install -g @pagespace/cli
pagespace login
(The full command reference lives in the PageSpace CLI docs.)
pagespace login opens a browser, completes an OAuth login, and stores a credential locally — but that credential is scoped to key management only, with zero content access of its own. It's for you, personally, to create/list/edit/revoke your own scoped keys; pagespace mcp won't run on it alone.
Mint the drive-scoped key pagespace mcp actually needs with the guided wizard:
pagespace keys
Or, flag-driven (same thing, no interactive wizard prompts — for scripting the setup step itself, run once by a human):
pagespace keys create --drive <driveId> --role member --name agent
Either way opens a browser for a one-time consent screen (minting is always a deliberate, human-approved step, never a silent agent-runnable call) and stores the result locally under the key name you chose. Need a portable mcp_... token for a different machine, CI, or a service account? Add --show-token to the mint — it prints the token exactly once (never again; only a SHA3-256 hash is stored server-side) — or mint one from Settings > MCP in the app. Either way, scoping to specific drives joins those drives as an app on the member list, governed by the role you give it there; scoped credentials cannot create new drives.
Minted a key with the CLI on this machine? Point the config at it by name with PAGESPACE_KEY — no secret ever appears in the config file:
{
"mcpServers": {
"pagespace": {
"command": "pagespace",
"args": ["mcp"],
"env": {
"PAGESPACE_KEY": "agent"
}
}
}
}
Using a portable token instead (minted from Settings > MCP, for a different machine, CI, headless):
{
"mcpServers": {
"pagespace": {
"command": "pagespace",
"args": ["mcp"],
"env": {
"PAGESPACE_TOKEN": "mcp_your_token_here"
}
}
}
}
PAGESPACE_API_URL overrides the default https://pagespace.ai host for self-hosted instances.
Edit claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\\Claude\\claude_desktop_config.jsonclaude mcp add pagespace -- pagespace mcp
Settings > MCP Servers → add the mcpServers block above.
pagespace mcp generates its tool list mechanically from the same operation registry that powers the pagespace CLI and @pagespace/sdk, so the tool surface can't drift from what the CLI itself supports.
At a minimum the server covers:
read, replace, insert, delete, edit-cells).TASK_LIST pages./commands that invoke pages as executable skills.Every tool respects the caller's permissions. If you cannot view a page in the web UI, the MCP server cannot see it either.
Any token also unlocks an OpenAI-compatible API, so any tool that speaks the OpenAI Chat Completions format can talk to one of your PageSpace agents as if it were a model.
https://pagespace.ai/api/v1mcp_...)ps-agent://<pageId>, the id of the AI Chat page you want to run. Copy it from the agent's settings tab.curl https://pagespace.ai/api/v1/chat/completions \
-H "Authorization: Bearer mcp_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"model": "ps-agent://<pageId>",
"stream": true,
"messages": [{ "role": "user", "content": "Summarize the latest notes in this drive." }]
}'
The agent replies with its own system prompt and tools, and runs those tools server-side under the same permissions you'd have in the app — it can search the drive, read pages, and write back, all within the token's scope. Responses are streamed, so set stream: true (non-streaming requests are rejected). Pass an optional conversation_id to continue a thread across calls, and GET /api/v1/models lists the agents a token can reach.
pagespace keys or pagespace keys create --drive <id>) or Settings > MCP.pagespace keys revoke <tokenId>, or revoke from Settings > MCP, cuts a key off immediately.Token rejected: confirm it hasn't been revoked (pagespace keys list or Settings > MCP) and that it starts with mcp_.
Connection refused: check PAGESPACE_API_URL (or --host) is correct and reachable from the machine running pagespace mcp.
Permission denied: MCP inherits the caller's permissions. If you lost access to a drive, the key or token stops seeing it too.
Server fails to start: pagespace mcp refuses to start unless the invocation names an explicit credential — PAGESPACE_KEY/--key (a key minted by pagespace keys) or PAGESPACE_TOKEN/--token (a portable token). A bare pagespace login is never enough, and the machine's active key (pagespace keys use) deliberately does not apply to MCP configs — name the credential explicitly so the config is portable and self-describing. Run pagespace whoami to confirm you're authenticated, and pagespace --version to confirm the CLI installed correctly.
pagespace-mcp package?pagespace-mcp still works — it now prints a one-line deprecation notice to stderr pointing at the migration guide in the @pagespace/cli repository. Move to @pagespace/cli on your own schedule; the tool surface is unchanged, only how you install and authenticate it is.
Search docs, blog posts, and more.