IDE

TokRepo for Cursor

Cursor reads .cursor/rules/*.mdc as workspace rules and ~/.cursor/mcp.json for MCP servers.

官方文档: https://docs.cursor.com/context/model-context-protocol

60 秒接入

Cursor 最短路径

  1. 01
    npx -y tokrepo@latest init-agent --target cursor
  2. 02
    Add tokrepo to ~/.cursor/mcp.json (see snippet below).
  3. 03
    Open Composer; ask "find me a tokrepo discover skill" — agent calls tokrepo_discover.
项目规则文件
.cursor/rules/tokrepo.mdc
安装位置
.cursor/rules/
MCP 客户端
~/.cursor/mcp.json
MCP 安装命令
{"mcpServers":{"tokrepo":{"command":"npx","args":["-y","tokrepo-mcp-server"]}}}
六条强制规则

每个 agent runtime 都执行

  • SESSION BOOTSTRAP — call tokrepo_session_init once per session.
  • DISCOVER BEFORE BUILD — call tokrepo_discover before writing reusable artifacts.
  • VERIFY BEFORE INSTALL — install_plan must include trust_gate; honor TOKREPO_MIN_TRUST (default 0.6).
  • DRY-RUN BEFORE APPLY — lifecycle tools default dry_run=true.
  • HANDOFF AFTER REUSABLE WORK — call tokrepo_handoff_plan.
  • PRIVATE BY DEFAULT, NEVER PUSH SECRETS.