Claude Code
Add Papermark as an MCP server in the Claude Code CLI.
Claude Code (Anthropic's CLI for terminal-based coding sessions) talks to MCP servers via the same JSON-config pattern as Claude Desktop. Setup is one command.
1. Get a Papermark token
Mint one in the dashboard at Settings → API Tokens. Read-only scopes are a good default; add write scopes if you want the agent to create links, datarooms, or upload documents.
2. Register the MCP server
claude mcp add papermark \
--command npx \
--args "-y" "@papermark/mcp-server" \
--env PAPERMARK_TOKEN=pm_live_…That's the entire setup. The next time you start a session, Claude Code spawns the MCP server and registers all 18 tools.
You can also edit ~/.config/claude-code/config.json (or wherever
Claude Code stores its config — claude config path will tell you)
directly:
{
"mcpServers": {
"papermark": {
"command": "npx",
"args": ["-y", "@papermark/mcp-server"],
"env": {
"PAPERMARK_TOKEN": "pm_live_…"
}
}
}
}3. Verify
Start a Claude Code session and run:
/mcpYou should see papermark in the list of connected servers, with
its tool count. Then ask:
List my Papermark documents.
When to reach for it
Claude Code is at its best when MCP usage interleaves with shell commands and file edits — exactly what Papermark workflows look like:
- "Pull the latest investor memo from Papermark, save it to
~/Documents/, and open it." (get_document→ file write →openshell command) - "Find every link to the Q4 deck created in the last 30 days, dump
the view counts to a CSV." (
list_links→list_link_views→ shellcsvformatting) - "Sync our
AcmeDrive folder into the matching Papermark dataroom." (filesystem walk →upload_documentper file →list_dataroom_documentsto verify)
Because Claude Code can read and write files, the
upload_document tool — stdio-only — is genuinely useful here in a
way it isn't from a browser-hosted client.
Per-project setup
If you want different tokens per project (e.g., production token in
your prod-ops repo, test token in your sandbox repo), put the config
in the project's local .claude/config.json instead of the global
config file. Claude Code merges the two, with project-level
overriding global.
Troubleshooting
Same playbook as Claude Desktop:
- Empty tool list → JSON syntax error
No API token configured→ missingPAPERMARK_TOKENinenv401→ token revoked or wrong environment403on a write tool → mint a token with the missing scope
claude mcp logs papermark shows the server's stderr if Claude Code
exposes that command in your version; otherwise the server's logs
are wherever Claude Code stores MCP server logs (check
claude --help for the path).