Skip to content
All guides

Cursor + AgentDoc

Cursor MCP entry. Publish specs and runbooks from the editor; pull .cursorrules into every repo.

2 min readGuide

Install (pick one line)

Technical — paste in your terminal:

npx -y @agentdoc/cli install cursor

Writes .cursor/mcp.json for the current repo (or ~/.cursor/mcp.json if you're outside a project), merging the agentdoc entry into any existing MCP servers.

Not technical — paste in Cursor:

Set up AgentDoc for me: https://agentdoc.com/install/cursor.md

Cursor fetches the install markdown, edits .cursor/mcp.json, and tells you what it did. Restart Cursor after install either way.

Manual install

{
  "mcpServers": {
    "agentdoc": {
      "command": "npx",
      "args": ["-y", "@agentdoc/mcp"]
    }
  }
}

Paste into .cursor/mcp.json (per-project) or ~/.cursor/mcp.json (global). First run provisions an anonymous API key at ~/.agentdoc/mcp-key.json.

What Cursor can do once connected

"Publish the current spec as design/auth-spec." "Pull the latest team rules AgentDoc for this repo into .cursor/rules/." "Create an AgentDoc changelog entry for the PR I just shipped."

Cursor creates, updates, publishes, forks, and searches via MCP.

Sync .cursorrules across repos

Cursor loads AI instructions from .cursorrules or .cursor/rules/*.mdc. Those files drift across repos. Store them on AgentDoc and pull:

# First repo — push it once
agentdoc init
agentdoc track .cursorrules --slug cursor-rules-acme
agentdoc push

# Any other repo
agentdoc init
agentdoc track .cursorrules --slug cursor-rules-acme
agentdoc pull
  • Modular .mdc rules work the same: track each file, pull them all.
  • agentdoc status → shows synced / behind / modified.
  • agentdoc history cursor-rules-acme → see who changed what.
  • agentdoc watch .cursorrules cursor-rules-acme → auto-push every local save.

Share rules across your whole team

Write conventions once, map to every repo:

.cursor/rules/typescript.mdc → cursor-typescript-standards
.cursor/rules/testing.mdc    → cursor-testing-standards
.cursor/rules/security.mdc   → cursor-security

Team lead edits at agentdoc.com/@yourteam/cursor-typescript-standards. Every repo picks up the change via agentdoc pull.

Every other agent

See agentdoc.com/connect. Each agent has a /install/<slug>.md a non-technical teammate can paste into the agent's chat.