Modes, rules files, MCP config, and shortcuts for the Cursor editor. The Agent panel is the chat surface: it searches the repo, edits files, and runs the terminal. A comparison with two other coding agents is in Claude Code vs Copilot vs Cursor.
Modes
Open the panel with Cmd+I (macOS) or Ctrl+I (Windows and Linux). Shift+Tab cycles modes. Cmd+. or Ctrl+. opens the mode menu. A switch starts a fresh context window. Copilot’s agent mode is a different product.
| Mode | What it does | Example |
|---|---|---|
| Agent | Edits files, searches, and runs the terminal. | “Add a login form with email and password.” |
| Ask | Read-only. Answers without editing files. | “Where is the database connection configured?” |
| Plan | Writes a plan you edit before the build. | A change across several packages |
| Debug | Uses logs and runtime evidence, then applies a targeted fix. | Paste a stack trace, then Return |
Plan saves the plan in your home directory. Save to workspace moves it into the project. See spec-driven development. While Agent works, Enter queues the next note. On macOS, Cmd+Enter sends it now. Restore Checkpoint rolls files back and keeps the transcript.
Tab and the old inline-edit shortcut
Tab completes from recent edits, nearby code, and linter errors, shown as gray text. It can change several lines, add an import, or jump to another file (a portal appears at the bottom of the editor). Tab again, after an accept, moves to the next predicted edit. Rules do not affect Tab. Snooze or disable it from the Tab indicator at the bottom right.
The old inline-edit help page now describes Agent. With code selected, Cmd+K or Ctrl+K opens Agent with those lines. Cmd+L and Ctrl+L do the same. The docs say Cmd+K used to open inline edit and that this has been replaced. The same keys toggle the sidepanel when they are not bound to a mode. In the Agents Window, Cmd+K or Ctrl+K opens the command palette for past transcripts. Cmd+F or Ctrl+F searches the open conversation.
@ mentions
Type @ and keep typing to filter. Skip it when you do not know the file. Agent will search. Repeat @ to attach more than one item. / runs a skill for one message. Option+Enter (macOS) or Alt+Enter (Windows) keeps that skill as a Custom Mode.
| Mention | What it does | Example |
|---|---|---|
| File or folder | Attaches that path. Type / after a folder to go deeper. |
@auth.ts or @src/components/ |
@Terminals |
Attaches terminal output | After a failed test run |
@Chats |
Pulls in another conversation | A decision from an older thread |
| Git diff | Uncommitted changes, or the branch against main | @Commit (Diff of Working State) |
@Browser |
Built-in browser context | After Agent opened the page |
| A rule | Applies a manual project rule | @my-rule |
Agent can search the web with its Web tool. That is not an @ mention. Current mention docs do not list @Docs or @Web.
Rules and AGENTS.md
Rules are instructions at the start of the model context. Project, user, and team rules apply in Agent, Ask, Plan, and Debug. They do not apply to Tab, and .cursor/rules is not what Bugbot reads.
Project rules are .mdc files in .cursor/rules, including subfolders. A .md file there is ignored. Commit the folder. Create one with New Cursor Rule in the command palette (Cmd+Shift+P or Ctrl+Shift+P), from Customize, or with /create-rule.
| Rule type | What it does | Example |
|---|---|---|
| Always Apply | Every chat. Globs and description are ignored. | alwaysApply: true |
| Apply Intelligently | Agent pulls it in when the description fits the task. | alwaysApply: false plus description |
| Apply to Specific Files | Attaches when a matching file is in context. | globs: src/**/*.tsx and alwaysApply: false |
| Apply Manually | Only when you @-mention the rule. |
alwaysApply: false, no description, no globs |
Separate globs with commas. Keep a rule under 500 lines. A path such as @service-template.ts points Agent at a file. The file is not inlined, so anything that must always be present goes in the rule body.
---
description: How this repo runs tests
alwaysApply: false
---
- Run tests with `npm test` from the repository root
- Do not edit anything under `dist/` or `build/`
AGENTS.md is plain Markdown, at the root or in a subdirectory. Nested files apply under that directory, combine with parents, and the closer file wins. Cursor reads CLAUDE.md the same way and always applies it, ignoring alwaysApply. That overlaps with Claude Code.
User rules in Customize, Rules, sync with your account. Files in ~/.cursor/rules (on Windows, %USERPROFILE%\.cursor\rules) stay on that machine. Team Rules come from the dashboard on Team and Enterprise plans. On a conflict the order is Team, then Project, then User.
.cursorrules in the project root is legacy and will be deprecated. Paste it into an Always Apply rule and delete the old file.
MCP
MCP connects Agent to external tools. Setup that is not Cursor-specific is in MCP servers explained. Cursor supports local stdio, SSE, and Streamable HTTP. Agent calls a tool when it is relevant, including in Plan Mode, and asks first unless Run Mode allows the call. Toggle servers in Customize. Logs are under MCP Logs in the Output panel (Cmd+Shift+U on macOS).
| File | What it does | Example |
|---|---|---|
.cursor/mcp.json |
Servers for this repo. Commit it if the team shares them. | The issue tracker this repo uses |
~/.cursor/mcp.json |
Servers for every project on this machine | A personal notes server |
A local entry sets command, args, and env. A remote entry sets url and optional headers. Only stdio accepts envFile. Values can use ${env:NAME} and ${workspaceFolder}. The CLI reads the same file. Tool loops are the pattern in agentic AI.
{
"mcpServers": {
"repo-tools": {
"command": "npx",
"args": ["-y", "mcp-server"],
"env": {
"API_KEY": "${env:API_KEY}"
}
}
}
}
Cloud Agents and Bugbot
Cloud Agents were called Background Agents. They run in an isolated VM and can open a pull request. Start from Cloud under the agent input, from cursor.com/agents, or with @cursor in Slack, Linear, GitHub, or Bitbucket. In the CLI, prefix the message with &. As of October 2026, the docs require Premium or higher, Teams, Enterprise, or a legacy paid plan. Free and Plus do not include them. Tab does not run in the cloud.
Bugbot comments on pull-request diffs, on each update or after cursor review or bugbot run. A bot account or GitHub App posting them is ignored. .cursor/rules does not apply. Put review notes in .cursor/BUGBOT.md. The root file is always included. A nested file applies when changed paths sit under it. Optional settings live in .cursor/config/bugbot.yaml on the base branch.
/review and /review-bugbot, in Cursor 3.7+, on cursor.com/agents, and in the CLI, review the branch diff against the default base, including uncommitted edits.
CLI
The documented command is agent.
| Command | What it does | Example |
|---|---|---|
| Install, macOS, Linux, WSL | Downloads the CLI | curl https://cursor.com/install -fsS \| bash |
| Install, Windows PowerShell | Native Windows install | irm 'https://cursor.com/install?win32=true' \| iex |
agent |
Interactive session | agent "refactor auth to use JWT" |
agent -p |
One prompt, then exit | agent -p "list failing tests" --output-format text |
--mode=ask |
Starts in Ask. /ask switches later. |
agent --mode=ask |
--plan |
Starts in Plan. /plan and --mode=plan match. |
agent --plan |
| Shift+Tab | Rotates Agent, Plan, and Ask | Shift+Tab |
agent resume |
Latest chat. Also --continue, /resume, and agent ls. |
agent resume |
& |
Sends the message to a Cloud Agent | & refactor auth and add tests |
agent --version and agent update check and upgrade the CLI. On macOS, Linux, or WSL, add ~/.local/bin to PATH if agent is missing. /summarize shrinks context (/compress is an alias). Ctrl+J inserts a newline. Ctrl+D exits on the second press. The CLI loads .cursor/rules plus root AGENTS.md and CLAUDE.md. Debug is editor-only.
Models and Privacy Mode
Cmd+/ or Ctrl+/ cycles models. On macOS, Cmd+Option+/ toggles the model. The choice sticks until you change it. Auto uses Cursor Router and can change model between turns.
As of October 2026, Free and Plus include Grok 4.7, Grok 4.6, Grok 4.5, and Composer 2.5. Premium and above, Teams, Enterprise, and legacy Pro, Pro+, and Ultra unlock third-party models.
Privacy Mode keeps code out of training by Cursor and by model providers. Turn it on under General in settings (Cmd+Shift+J or Ctrl+Shift+J). Enterprise teams have it on by default, and an admin can lock it. Your own API keys follow the provider’s policy. Models that require provider data retention stay off until an admin approves them.
Keyboard shortcuts
Open the full map with Cmd+R then Cmd+S, or Ctrl+R then Ctrl+S. Windows chords below are only those a help page states.
| Shortcut | What it does | Example |
|---|---|---|
| Cmd+I / Ctrl+I | Opens the Agent panel | Start a task |
| Cmd+L or Cmd+K / Ctrl+L or Ctrl+K | Toggles the sidepanel. With a selection, opens Agent on those lines. | Select a function, then Ctrl+L |
| Cmd+. / Ctrl+. | Mode menu | Switch to Ask |
| Shift+Tab | Cycles modes. In the CLI the cycle is Agent, Plan, Ask. | Stop on Plan |
| Cmd+/ / Ctrl+/ | Cycles models | Leave Auto for this chat |
| Tab | Accepts a completion, or cycles chat messages when the field is focused | Take the gray text |
| Cmd+Right / Ctrl+Right | Next word of a Tab suggestion | One symbol |
| Escape | Dismisses a suggestion or leaves the chat field | Reject a bad completion |
| Cmd+Shift+J / Ctrl+Shift+J | Cursor settings | General, then Privacy Mode |
| Cmd+Shift+P / Ctrl+Shift+P | Command palette | New Cursor Rule |
Patterns you’ll reuse
Shift+Tab to Ask when the answer must not touch files
Shift+Tab to Plan, edit the plan, then build
Select the failing test, press Ctrl+L, and name the fix
Tab accepts, Escape skips, Ctrl+Right takes one word
Put repeated instructions in .cursor/rules/*.mdc and tokens in ${env:API_KEY}
agent --mode=ask -p "list failing tests and their files"
Prefix & when the run should continue after the laptop closes
Name the file and what done looks like. The same habit is in the ChatGPT prompting cheat sheet. A failing test before the edit is the loop in AI-assisted TDD.
FAQ
Is Chat a separate mode from Agent in Cursor?
The current docs describe one Agent panel, also called Agent Chat, and four modes inside it: Agent, Ask, Plan, and Debug. There is no separate Chat mode in that list. Open the panel with Cmd+I or Ctrl+I, then switch with Shift+Tab or the mode picker. Switching modes starts a fresh context window.
Where do Cursor project rules live, and what should I do with .cursorrules?
Project rules are .mdc files in .cursor/rules. A plain .md file in that folder is ignored. User rules live in Customize, Rules, and sync with your account; files under ~/.cursor/rules stay on that machine. .cursorrules in the repo root is legacy. Copy it into an Always Apply rule, then delete the old file.
What does Cmd+K or Ctrl+K do in Cursor now?
With code selected, Cmd+K or Ctrl+K opens Agent with those lines in the input. Cmd+L and Ctrl+L do the same. The help docs say Cmd+K used to open inline edit and that this workflow has been replaced. The same keys also toggle the sidepanel when they are not bound to a mode.
How do I add an MCP server in Cursor?
Put a repo server in .cursor/mcp.json or a personal server in ~/.cursor/mcp.json. A local server sets command, args, and env. A remote server sets url and optional headers. The CLI reads the same mcp.json. Turn servers on or off from Customize.
How do I run Cursor Agent from the terminal?
Install the official script, then run agent. Shift+Tab rotates Agent, Plan, and Ask. /plan and /ask switch modes, and agent -p runs one prompt and exits. Prefix a message with & to hand that task to a Cloud Agent and pick it up at cursor.com/agents.
How this guide was verified
Written by hand from the official documentation, every command re-checked, and reviewed a second time before publishing. Last reviewed on .
Official sources read for this article
- cursor.com/docs/agent/overview
- cursor.com/docs/agent/plan-mode
- cursor.com/docs/agent/prompting
- cursor.com/help/ai-features/agent
- cursor.com/help/ai-features/ask-mode
- cursor.com/help/ai-features/debug-mode
- cursor.com/help/ai-features/tab
- cursor.com/docs/configuration/kbd
- cursor.com/help/customization/keyboard-shortcuts
- cursor.com/help/customization/context
- cursor.com/docs/rules
- cursor.com/help/customization/rules
- cursor.com/docs/mcp
- cursor.com/docs/cli/overview
- cursor.com/docs/cli/installation
- cursor.com/docs/cli/using
- cursor.com/docs/cloud-agent
- cursor.com/help/ai-features/background-agents
- cursor.com/docs/bugbot
- cursor.com/help/models-and-usage/available-models
- cursor.com/help/security-and-privacy/privacy

