Cursor AI Code Editor Setup Guide: Install, Import VS Code, Rules, MCP and CLI (2026)
Install Cursor, import your VS Code extensions and settings, learn the shortcuts that matter, write project rules, connect MCP servers and use the Cursor CLI.
By Harsh Thummar 10–12 min read

Cursor is an AI code editor built on the same foundation as VS Code. It feels familiar, runs your existing extensions and themes, and puts AI into every part of the workflow: tab completion that predicts your next edit, chat about your codebase, and an agent that can change many files, run commands and fix errors.
This Cursor setup guide shows you how to install it, move your VS Code setup across, use the shortcuts that matter, give the agent project rules, connect MCP servers and use the Cursor CLI in your terminal.
Commands and paths come from Cursor's official documentation, checked on 22 October 2026. For a quick look at plans and alternatives, see the Cursor tool page.
Step 1: Download and Install Cursor
Download Cursor from the official site: cursor.com/downloads.
- macOS 12 or later (Apple Silicon and Intel)
- Windows 10 or later
- Linux through apt, dnf or an AppImage
Install it like any desktop app, open it and sign in. The Free plan includes limited agent and chat requests, so you can try everything before paying.
Step 2: Import Your VS Code Extensions and Settings
You don't need to rebuild your editor setup.
- Open Cursor Settings with
Ctrl+Shift+J(Cmd+Shift+Jon macOS). - Go to General, then Account.
- Under VS Code Import, click Import.
This brings over your extensions, themes, settings and keybindings. One thing to know: Cursor installs extensions from the Open VSX registry rather than the Visual Studio Marketplace, so a few Microsoft-only extensions may not be available.
To open a project from your terminal, use the cursor command (on macOS, install it from the Command Palette with Shell Command: Install 'cursor' command if it is not on your PATH):
cursor .Step 3: Learn the Shortcuts That Matter
Use Ctrl instead of Cmd on Windows and Linux.
Tab: accept an AI completion or jump to the next suggested edit.Cmd+K: inline edit. Select code, describe the change, review the diff in place.Cmd+IorCmd+L: open or close the side panel with the agent and chat.Cmd+NorCmd+R: start a new chat.Cmd+.: open the mode menu.Shift+Tabcycles through agent modes.Cmd+E: toggle the Agent layout.
A good habit: use inline edit for small, local changes and the agent for anything that touches several files or needs commands to run.
Step 4: Give the Agent Project Rules
Rules are instructions the agent reads so its code matches your project. Cursor supports two formats.
Project rules in .cursor/rules
Create Markdown files with the .mdc extension in .cursor/rules/. The extension matters: plain .md files in that folder are ignored.
.cursor/
rules/
nextjs.mdc
testing.mdcA rule file has a short header that controls when it applies, followed by the instructions:
---
description: Conventions for the Next.js app
globs: app/**/*.tsx
alwaysApply: false
---
- Use the App Router and Server Components by default
- Add "use client" only when a component needs state or effects
- Style with Tailwind CSS tokens from app/globals.css
- Every new API route needs input validationRules can apply always, automatically when relevant, only to matching files, or only when you mention them.
AGENTS.md
Cursor also reads AGENTS.md at the project root and in subfolders. If your team already uses AGENTS.md for Codex, Copilot or other agents, Cursor picks it up too.
Personal preferences that apply to every project go under User Rules in Cursor's settings.
Step 5: Connect MCP Servers
MCP (Model Context Protocol) servers give the agent extra tools, like reading your issue tracker or querying a database. Add them in a JSON file:
.cursor/mcp.jsonfor one project~/.cursor/mcp.jsonfor all projects
A local server that runs a command:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
}
}
}A remote server:
{
"mcpServers": {
"my-remote-server": {
"url": "https://example.com/mcp",
"headers": { "Authorization": "Bearer ${env:MY_SERVER_TOKEN}" }
}
}
}Keep tokens in environment variables, not in files you commit, and only add servers you trust.
Step 6: Install the Cursor CLI
Cursor also has a command-line agent for your terminal, scripts and CI.
macOS, Linux and WSL
curl https://cursor.com/install -fsS | bashWindows (PowerShell)
irm 'https://cursor.com/install?win32=true' | iexThe command is now called agent (older guides use cursor-agent):
agent --version # check the install
agent login # sign in
agent status # check your login
agent # start an interactive session in the current folder
agent -p "find unused exports in src and list them" # non-interactiveIn CI you can authenticate with a CURSOR_API_KEY environment variable instead of agent login.
A Day-to-Day Cursor Workflow
- Write a few rules first. Ten good lines in
.cursor/rulessave hours of corrections. - Use Tab completion while you type; it is the feature you will use most.
- Ask the agent questions before changes: "How does auth work in this app?"
- Give the agent one task at a time and let it run your tests.
- Review diffs before accepting them, and commit in small steps.
- Start a new chat for each new task so old context doesn't leak in.
Related Guides
- Cursor: features, pricing and alternatives →Verified plans from Free to Teams.
- Google Antigravity Setup Guide →Google's agent-first editor, CLI and rules.
- Claude Code Setup Guide →A terminal agent that also works inside Cursor.
- GitHub Copilot in VS Code Setup Guide →Stay in VS Code with Copilot.
- AI Tools for Developers →Compare AI editors, agents and app builders.
Frequently Asked Questions
Is Cursor free?
Yes. Cursor has a free plan with limited agent and chat requests. Paid plans start at $8 per month, and Teams starts at $30 per user per month.
Can I use my VS Code extensions in Cursor?
Yes. Open Cursor Settings with Ctrl+Shift+J (Cmd+Shift+J on macOS), go to General then Account, and click Import under VS Code Import. Extensions are installed from the Open VSX registry, so a few Microsoft-only extensions may be missing.
Where do Cursor rules go?
Project rules go in .cursor/rules as files with the .mdc extension. Cursor also reads AGENTS.md at the project root and in subfolders. Personal rules go under User Rules in settings.
How do I add an MCP server to Cursor?
Add it to .cursor/mcp.json in your project or ~/.cursor/mcp.json for all projects, under an mcpServers object. Use command and args for local servers, or url and headers for remote ones.
What is the Cursor CLI command called?
The Cursor CLI command is agent. Install it with curl https://cursor.com/install -fsS | bash on macOS and Linux, then run agent login and agent.
Conclusion
Setting up Cursor well takes about fifteen minutes: install it, import your VS Code setup, learn Tab, Cmd+K and the agent panel, and write a few project rules. Add MCP servers and the CLI when you need them.
Compare Cursor with other AI editors and agents in the AI tools directory.