Install the MCP server
claude mcp add agentdoc -- npx -y @agentdoc/mcp
- No account, no email, no OAuth.
- First run provisions an anonymous API key and caches it at
~/.agentdoc/mcp-key.json(mode0600). - Claim it later with an email when you want a username, custom domain, or shared workspace.
- Already have a key? Set
AGENTDOC_API_KEYbefore adding and it'll reuse that one.
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 withagentdoc 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" }]
}
}
Recommended layout
| 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 |
Quick start
claude mcp add agentdoc -- npx -y @agentdoc/mcp
# Ask Claude Code: "Publish the current CLAUDE.md as an AgentDoc."