Upload and share from Claude Code, Cursor and Claude Desktop: ten tools over stdio or HTTP
The official @pagedrop/mcp server exposes the v1 REST API as ten tools for Claude Code, Cursor, Claude Desktop and custom clients built with the MCP SDK. Use stdio for local clients or streamable HTTP for your own remote deployment.
Available tools
| Tool | API |
|---|---|
pagedrop_upload(name, content, kind, folderId?, share?) | POST /v1/files (multipart; a share block is deferred, not created — see below) |
pagedrop_share({ fileId, ...policy }) | POST /v1/shares (file must have cleared its scan) |
pagedrop_revoke(shareId) | DELETE /v1/shares/:id |
pagedrop_list_shares(fileId?) | GET /v1/shares (how to find the share id pagedrop_revoke needs) |
pagedrop_delete_file(fileId) | DELETE /v1/files/:id (soft delete; revokes that file's share links) |
pagedrop_get(fileId) | GET /v1/files/:id |
pagedrop_list_versions(fileId) | GET /v1/files/:id/versions — the version ids a share can be pinned to with lockedVersionId |
pagedrop_list(folderId?) | GET /v1/files |
pagedrop_me() | GET /v1/me (the token's folder scope; call it after a 403 FORBIDDEN) |
pagedrop_validate(content, kind) | POST /v1/validate |
API failures return MCP isError: true with { code, status, message } in the content. Handle codes such as RATE_LIMITED, INFECTED and SLUG_TAKEN explicitly.
⚠️ Uploading is not sharing: wait for the scan
The step agents get wrong most often. The workflow is always three calls:
pagedrop_uploadreturns a file id withscanStatus: PENDING. Even if you pass ashareblock, no share is created — the file cannot have cleared its security scan yet. The response reportsshareDeferred: truewith nourl.pagedrop_getin a loop untilscanStatusisCLEAN.pagedrop_sharenow creates the link and returns its URL.
Calling pagedrop_share too early fails with SCAN_PENDING (425, retryable). SCAN_ERROR (scan service down) does not block sharing, but the file was never actually scanned — tell the user so.
Overwriting an already-shared file sends it back to PENDING: until the new version
passes, every share link on that file returns 425.
stdio: Claude Code, Cursor and Claude Desktop
Install
npm install -g https://pagedrop.space/downloads/pagedrop-mcp-0.2.0.tgz
Alternatively run npx -y https://pagedrop.space/downloads/pagedrop-mcp-0.2.0.tgz without a global install.
The npm name is reserved as @pagedrop/mcp; once published, npm i -g @pagedrop/mcp replaces the tarball URL. Note that an unrelated pagedrop-mcp package exists on npm (someone else’s HTML deployment tool) — this project only uses the scoped name.
Configure
For Claude Code, use a project .mcp.json (keep credentials out of Git) or claude mcp add --scope user:
{
"mcpServers": {
"pagedrop": {
"command": "pagedrop-mcp",
"env": {
"PAGEDROP_API_URL": "https://pagedrop.space",
"PAGEDROP_API_KEY": "pd_XXXXXXXX_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
}
}
}
}
Cursor uses ~/.cursor/mcp.json. Claude Desktop on macOS uses ~/Library/Application Support/Claude/claude_desktop_config.json. Use the same JSON structure and the corresponding configuration path on other platforms. Restart your client; all seven pagedrop_* tools should appear.
Get a token
Open API tokens, create a token and copy it into PAGEDROP_API_KEY. The plaintext token is shown only once.
Streamable HTTP: your own remote deployment
PAGEDROP_API_URL=https://pagedrop.space PAGEDROP_API_KEY=pd_xxx_yyy PORT=7180 HOST=0.0.0.0 pagedrop-mcp-http
Client configuration:
{
"mcpServers": {
"pagedrop": {
"url": "http://your-host:7180/mcp",
"transport": "streamable-http"
}
}
}
The server is single-tenant: one process uses one PAGEDROP_API_KEY. Protect a production HTTP deployment with TLS and authenticated reverse proxy access. The default HOST=127.0.0.1 binds only locally. PageDrop does not offer a public unauthenticated MCP endpoint.
Health check: GET /healthz returns { ok: true, server: '@pagedrop/mcp', mode: 'streamable-http' }.
Prompt-to-upload example
Turn these notes into a clean Markdown summary, upload it to PageDrop and create a link valid for seven days: pricing increases by 5%; operations move to GMT; no hiring before Q4.
Expected sequence:
- Draft the Markdown.
- Call
pagedrop_validate({ content, kind: 'MARKDOWN' })to check line endings and code fences. - Call
pagedrop_upload({ name: 'notes.md', kind: 'MARKDOWN', content })and keep thefileId— there is no link yet, the response reportsshareDeferred: true. - Poll
pagedrop_get({ fileId })untilscanStatusisCLEAN. - Call
pagedrop_share({ fileId, expiresInDays: 7 }). - Return the API's
urland explain the applied access and expiration settings.
Source and package downloads
- Packages: https://pagedrop.space/downloads
- Source:
packages/mcp/src/in the PageDrop repository - Tool schemas:
packages/mcp/src/tools.ts