Skip to content
All guides

Claude Code + AgentDoc

One-line MCP install. Sync CLAUDE.md across repos. Give Claude direct read/write access to your docs.

3 min readGuide

Install (pick one line)

Technical — paste in your terminal:

claude mcp add --transport http agentdoc https://mcp.agentdoc.com

Not technical — paste in Claude Code:

Set up AgentDoc for me: https://agentdoc.com/install/claude-code.md

Claude Code will fetch the install markdown and run the setup itself. Either path registers the hosted remote MCP at https://mcp.agentdoc.com — no Node install, no npx, no config file. Claude Code runs OAuth on the first tool call: if you have an AgentDoc account it signs you in; if not it provisions an anonymous one that you can claim with an email later.

Want the MCP running locally instead? claude mcp add agentdoc -- npx -y @agentdoc/mcp is the stdio escape hatch (requires Node 18+).

What Claude Code can do once connected

  • Publish a doc from chat: "Publish the launch plan as q2-launch-plan." → returns a URL at /@you/q2-launch-plan.
  • Read any AgentDoc: "Look up our API guidelines and apply them."
  • Update with attribution: every edit is attributed to the API key name — version history shows who.
  • Fork: "Fork the production-incidents doc and add today's timeline."
  • Search: "Find our deployment runbook."
  • Invite humans by email: "Invite alex@acme.com as an editor." Guests don't need an AgentDoc account.

Everything above calls the REST API under the hood — no seat cost, agents are never seats.

Sync CLAUDE.md and skills across repos

CLAUDE.md, .claude/rules/*.md, and .claude/skills/*/SKILL.md are all files — so they can live on AgentDoc.

# One-time setup per repo
agentdoc init
agentdoc track CLAUDE.md --slug claude-md-acme-api
agentdoc push

# In any other repo
agentdoc init
agentdoc track CLAUDE.md --slug claude-md-acme-api
agentdoc pull
  • Track any file, any time: agentdoc track <file> --slug <slug>
  • Check status: agentdoc status (shows synced / behind / modified)
  • Pull updates: agentdoc pull — or pin a file with agentdoc lock <file>
  • Full history: agentdoc history <slug>

Tip

Add agentdoc pull to your repo's Makefile or setup script. Every developer starts with the latest instructions.

Auto-sync on session start

Add a SessionStart hook in .claude/settings.json:

{
  "hooks": {
    "SessionStart": [{ "command": "agentdoc pull --quiet 2>/dev/null || true" }]
  }
}
File Tracked slug Notes
CLAUDE.md claude-md-{project} Shared team instructions
.claude/rules/*.md rules-{topic} Modular rule files
.claude/skills/*/SKILL.md skill-{name} Shared slash commands
CLAUDE.local.md Personal, gitignored

Other agents

  • Claude Cowork / Desktop / Claude.ai web: paste https://mcp.agentdoc.com into Settings → Connectors → Add custom connector.
  • Cursor: npx -y @agentdoc/cli install cursor — or Set up AgentDoc for me: https://agentdoc.com/install/cursor.md
  • Windsurf: npx -y @agentdoc/cli install windsurf — or /install/windsurf.md
  • Codex: codex mcp add agentdoc -- npx -y @agentdoc/mcp — or /install/codex.md
  • Every agent: see agentdoc.com/connect.