-
-
Notifications
You must be signed in to change notification settings - Fork 105
Cursor Instructions
Cursor can use Second Brain through MCP and through Cursor Rules that tell the agent to recall at the start of every chat and remember important context as you work.
Add your Worker as an MCP server in Cursor Settings → MCP:
https://YOUR-WORKER-URL/mcp
Use OAuth when Cursor offers it. On first use, complete the hosted sign-in page with your owner password or team member token.
If OAuth is not available, use a bearer header in your MCP config — never put a token in the URL. See Connect to AI Clients.
Cursor has no single global instructions file like Claude Code's CLAUDE.md.
The supported approach is a project or user rule with alwaysApply: true.
Copy the rule template from the repository:
mkdir -p ~/.cursor/rules
curl -fsSL https://raw.githubusercontent.com/rahilp/second-brain-cloudflare/main/.cursor/rules/second-brain-memory.mdc \
-o ~/.cursor/rules/second-brain-memory.mdcOptional: keep the full instruction text handy for reference:
curl -fsSL https://raw.githubusercontent.com/rahilp/second-brain-cloudflare/main/AI_Instructions/CURSOR_INSTRUCTIONS.md \
-o ~/.cursor/CURSOR_INSTRUCTIONS.mdReload Cursor after copying the rule.
If you cloned second-brain-cloudflare,
the rule already lives at .cursor/rules/second-brain-memory.mdc. Cursor picks
it up for that workspace automatically.
For your own projects, copy that file into .cursor/rules/ at the project root.
Open AI_Instructions/CURSOR_INSTRUCTIONS.md and paste it into Cursor Settings → Rules → User Rules, or into a project rule with Always apply enabled.
The repository file is the canonical source — update from there when Second Brain releases new tools or team-edition behavior.
If MCP tools are missing in a session but the brain CLI
is configured, the rule tells the agent to run:
brain recall "User wants to X about Y — what should I know?"
brain remember "condensed summary" --tags work,my-projectInstall with npm install -g second-brain-cf-cli. On first run, brain prompts for your Worker URL and token.
Every session:
- Recall first — intent-framed query, not bare keywords.
-
Remember silently — user context, decisions, tasks, and important agent
conclusions (tagged
cursor-responseplus project tags). - Recall before recommending or re-asking — avoid duplicate advice.
- Never use Cursor's built-in memory for facts that belong in Second Brain.
On team brains, memory tools accept workspace: personal | company and, for
multi-team brains, a team id from list_teams. See Team Setup.
-
MCP connected but no remember/recall tools listed — Cursor may load tools
lazily. Ask the agent to run
recallonce; see Troubleshooting. -
OAuth errors in Cursor — remove the MCP entry, re-add the base
/mcpURL, authenticate again. -
Rule not applying — confirm
alwaysApply: truein the rule frontmatter and reload the window.
- Connect to AI Clients — MCP setup for Cursor and other clients
- Team Setup — layers, sharing, and workspace parameters
-
Capture from Anywhere —
brainCLI installation