Cursor Cheat Sheet: Shortcuts, Rules, MCP and CLI
Checked against Cursor Cursor docs and agent CLI as of 2026-11-28 on 28 November 2026. Each section links to the official docs it was checked against.
A quick reference for people who live in Cursor: editor shortcuts, project rules, MCP config and the agent CLI. Everything was checked against cursor.com/docs on 28 Nov 2026. Cursor doesn't print a version on these pages, so the date is the pin. Shortcuts are the Mac ones the docs list; on Windows and Linux, Cmd is usually Ctrl.
When to use what
Pick the mode by how much you want the model to touch. Ask mode is read-only and good for learning a codebase. Plan mode makes the agent lay out its approach and ask questions first, which saves you from reverting a large wrong diff. Agent mode is the default and edits freely, so use it once you know what you want.
For rules, use the narrowest trigger that works. alwaysApply: true costs context in every chat, so keep it for a handful of short, truly global rules. Rules for one stack (say, your React conventions) should use globs so they only load when those files are in play. A good description lets the agent pull in a rule when it judges it relevant, and manual rules you @-mention are right for rare procedures like a release checklist. If you also use other agents, an AGENTS.md in the root is the portable choice, since Copilot and others read it too.
Put MCP servers that the whole team needs in .cursor/mcp.json and commit it, with secrets pulled from ${env:NAME}. Personal servers go in ~/.cursor/mcp.json. Our MCP config generator writes the JSON and the Cursor MCP setup post walks through each step. Use the agent CLI with -p for scripted jobs; for interactive work the editor is still faster.
The docs list Mac keys only. Check your own bindings under Keyboard Shortcuts before teaching them to a Windows team.
Cmd+IToggle the agent side panel
Cmd+NStart a new chat in the agent panel
Cmd+Shift+LAdd the current selection to the chat as context
Cmd+.Open the mode menu to switch between Agent, Ask and Plan
Shift+TabRotate through agent modes while the chat input has focus
Cmd+/Cycle to the next AI model in the picker
Cmd+ReturnAccept all suggested changes from the agent
Cmd+Shift+BackspaceReject suggested changes, or cancel a generation in progress
Cmd+[ / Cmd+]Jump to the previous or next chat
TabAccept the current Tab autocomplete suggestion
Precedence is Team Rules, then Project Rules, then User Rules, and every rule that applies is merged into the prompt.
.cursor/rules/*.mdcProject rules kept in version control; subfolders are allowed
alwaysApply: trueLoad the rule in every chat; globs and description are then ignored
globs: src/**/*.ts, src/**/*.tsxAttach the rule automatically when matching files are in context (comma-separated)
description: ...Summary the agent reads to decide whether the rule is relevant
@my-rulePull a manual rule into the current chat by mentioning it
/create-ruleAsk the agent to write a new rule file into .cursor/rules
AGENTS.mdPlain markdown instructions with no frontmatter; nested files win over the root one
Customize > RulesWhere personal User Rules live and where Add Rule creates a project rule
Hosted Cloud Agents don't read ~/.cursor/mcp.json; configure their servers at cursor.com/agents instead. MCP logs are in the Output panel (Cmd+Shift+U, then "MCP Logs").
.cursor/mcp.jsonProject MCP servers, best committed so the team shares them
~/.cursor/mcp.jsonGlobal MCP servers available in every project you open
{"mcpServers": {"name": {...}}}Root key Cursor expects; each server is a named entry under it
"type": "stdio", "command", "args"Fields for a local server that Cursor starts as a process
"envFile": ".env"Load env vars for a stdio server from a file (not for remote servers)
"url", "headers"Fields for a remote HTTP or SSE server, with optional auth headers
${env:NAME} / ${workspaceFolder}Interpolate an env var or the project root into command, args, env, url or headers
Install on macOS, Linux or WSL with curl https://cursor.com/install -fsS | bash. The binary is called agent.
agent "PROMPT"Start an interactive agent session with a first prompt
agent -p "PROMPT" --output-format jsonRun headless and print a JSON result (text and stream-json also work)
--model MODEL / --list-modelsChoose the model for the run, or list the ones your account can use
--mode plan|ask (or --plan)Start in Plan or read-only Ask mode instead of Agent
--resume [chatId] / --continuePick up an earlier chat by ID, or carry on from the last one
-f, --force (alias --yolo)Run commands without asking for approval each time
-w, --worktree [name]Do the work in a separate git worktree so your checkout stays clean
agent mcp listShow configured MCP servers; enable, disable and list-tools also exist
agent lsList previous chats so you can resume one
agent generate-ruleCreate a project rule from the terminal (alias: agent rule)
Worked example: Add a TypeScript rule and a project MCP server, then check both from the CLI
Goal: every agent working on src/ follows your error-handling style, and the whole team gets the same GitHub MCP server without committing a token.
# .cursor/rules/typescript-errors.mdc
---
description: Error handling conventions for TypeScript source
globs: src/**/*.ts, src/**/*.tsx
alwaysApply: false
---
Throw typed errors from src/lib/errors.ts. Never swallow an error in an empty catch.
{
"mcpServers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer ${env:GITHUB_TOKEN}" }
}
}
}
agent mcp list
agent -p "Which project rules apply when you edit src/api/user.ts?" --mode ask
The rule only loads when a TypeScript file under src/ is in context, so it costs nothing in chats about docs or CI. Because alwaysApply is false and globs is set, it behaves as an "Apply to Specific Files" rule. The JSON goes in .cursor/mcp.json and is safe to commit, since the token is read from your shell with ${env:GITHUB_TOKEN} at load time. agent mcp list should show the github server; if it doesn't, the Output panel's MCP Logs usually names the JSON error. The Ask-mode question is a cheap way to confirm the rule is matched without letting the agent edit anything. We checked the field names against the docs but didn't run this setup ourselves, and the GitHub server URL is just an example.
Common mistakes
Saving a rule as
.cursor/rules/style.mdand wondering why it never appliesProject rules must use the
.mdcextension; rename the file and add frontmatter.Setting
alwaysApply: trueon every rule so nothing gets missedThat fills every chat with context it doesn't need; use globs or a clear description and keep always-on rules short.
Pasting an API key straight into a committed
.cursor/mcp.jsonReference it with
${env:NAME}or point a stdio server at anenvFilethat git ignores.Using VS Code's
serversroot key in Cursor's mcp.jsonCursor reads
mcpServers; run the file through an MCP config validator when you copy it between clients.Expecting a Cloud Agent to see servers from
~/.cursor/mcp.jsonHosted agents ignore the global file; add those servers at cursor.com/agents or as team servers.
Running
agent -pwith--forcein a repo with uncommitted workCommit or stash first, or add
-wso the agent works in its own git worktree.
Related cheat sheets
Sources
- https://cursor.com/docs/configuration/kbd
- https://cursor.com/docs/context/rules
- https://cursor.com/docs/context/mcp
- https://cursor.com/docs/cli/reference/parameters
- https://cursor.com/docs/cli/overview
- https://cursor.com/changelog
How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.