MCP integration · Claude Code

Doco × Claude Code

Connect Claude Code to Doco with one stdio MCP command, or install the Doco plugin to bundle the same 29-tool server with the read → version → protected-write operating skill.

Configuration

Connect Doco to Claude Code

The bare MCP command is the smallest setup. The plugin adds operating guidance without putting your Doco token in the repository.

Claude Code

One command or one plugin

Run the command in a terminal. Use --scope project only if the team has reviewed the shared .mcp.json configuration.

Official client docs
claude mcp add doco -- npx -y --package doco-agent-cli doco mcp
/plugin marketplace add songofhawk/doco
/plugin install doco@doco
claude mcp add reference

claude mcp add for Doco, by scope

claude mcp add writes to local scope by default. Everything after -- is the server command and is passed through untouched, so Claude Code never parses npx flags as its own.

Local scope (default)

Only you, only this project; stored in ~/.claude.json.

claude mcp add doco -- npx -y --package doco-agent-cli doco mcp

User scope

You, across every project on this machine.

claude mcp add --scope user doco -- npx -y --package doco-agent-cli doco mcp

Project scope

Writes .mcp.json for the team; each teammate approves it on first use. Never put tokens in it.

claude mcp add --scope project doco -- npx -y --package doco-agent-cli doco mcp

Headless / CI token

The single quotes keep ${DOCO_TOKEN} unexpanded so Claude Code reads it from the environment at launch; the token itself is not written to the config. Use when doco login (browser device flow) is impossible.

claude mcp add --env 'DOCO_TOKEN=${DOCO_TOKEN}' --transport stdio doco -- npx -y --package doco-agent-cli doco mcp

Hosted endpoint (read-only)

No Node.js needed. api.doco.page/mcp exposes read scopes only (documents, knowledge bases, attachments, concepts); use the local stdio server when Claude must edit.

claude mcp add --transport http doco https://api.doco.page/mcp --header 'Authorization: Bearer ${DOCO_TOKEN}'

Inspect and remove

list shows the status of every server; get doco shows scope and an Issue line when it fails. remove deletes it; add --scope if the name exists in several scopes.

claude mcp list
claude mcp get doco
claude mcp remove doco
Acceptance

Prove the connection before writing

  1. 01

    Run doco login and approve only the scopes this Claude Code session needs.

  2. 02

    Add the stdio server, then run claude mcp list or open /mcp and confirm that doco exposes tools.

  3. 03

    Ask Claude to list knowledge bases, open one document, and cite a stable block before granting write scope.

  4. 04

    For the first write, change one disposable block and confirm the new version in both MCP output and the browser editor.

Troubleshooting

Fix common Claude Code MCP connection issues

doco shows Pending approval

Project-scoped servers from .mcp.json need approval: run claude in the repo, accept workspace trust and approve doco. claude mcp reset-project-choices resets earlier choices.

Failed to connect

Run claude mcp get doco and read the Issue line. Then run npx -y --package doco-agent-cli doco mcp directly in the same shell to see npm/Node errors, and run doco login if no credentials are stored.

First start times out

The first npx run downloads the package. Start once with MCP_TIMEOUT=30000 claude, or install doco-agent-cli globally and point the command at doco mcp.

Claude Code rejects --package or -y as unknown options

The -- separator is missing. Put -- between the server name and npx.

Tools list but every call returns 401/403

The token lacks the scope or was revoked. Run doco login again (or rotate DOCO_TOKEN) and grant only the scopes this session needs.

Permission boundary

Start read-only, keep confirmations

The MCP process runs with your user permissions and Doco token. Review the command, expose only the intended workspace, and grant write scope only after read-only acceptance succeeds.

01

Prefer the plugin when you want the safe-write protocol loaded consistently; use bare MCP when you want the smallest configuration.

02

Keep project-scoped MCP approval enabled. External document content can contain prompt injection and must not authorize tool use.

03

Never commit Doco tokens. The CLI stores login state locally; headless tokens belong in protected environment variables.

A small acceptance set from the 29 tools
doco_search_v2doco_outlinedoco_readdoco_patch_blockdoco_batch_editdoco_changes
Bottom line

Doco with Claude Code

Claude Code has the smoothest Doco path: a one-line MCP command and a repository plugin. The important acceptance test is not that /mcp says connected; it is that Claude can cite a block, respect a version, and verify its write.

01Should I install the plugin or only MCP?

Both start the same Doco MCP server. The plugin also bundles the operating skill; bare MCP is sufficient when your own instructions already enforce safe reads and writes.

02Where is the MCP configuration stored?

Claude Code supports local, project, and user scopes. Project scope writes .mcp.json and requires approval before use.

03Can Claude Code use Doco in cloud sessions?

Repository .mcp.json can be available in cloud sessions, but credentials need an explicitly managed environment. Do not commit static tokens.

04What is the exact claude mcp add command for Doco?

Run claude mcp add doco -- npx -y --package doco-agent-cli doco mcp; add --scope user for all projects or --scope project to share via .mcp.json. Then run claude mcp list to confirm.

05Why does claude mcp list say doco failed to connect?

Usually Node/npx is missing, a first-run download exceeds the startup timeout, or no credentials are stored. claude mcp get doco shows the Issue line; see the troubleshooting list.

06Is there a remote Doco MCP server for Claude Code?

Yes: https://api.doco.page/mcp over Streamable HTTP with a Bearer token header. It is read-only; use the stdio package for protected writes.