Extensions & Integrations

45 min advanced Lesson 9

Learning Outcomes

  • Install and use VS Code extensions that are compatible with Cursor
  • Leverage Cursor's AI-enhanced Git integration for commits, diffs, and history
  • Use terminal integration for AI-powered error interpretation and command suggestions
  • Connect external tools and services to extend Cursor's capabilities
  • Understand MCP (Model Context Protocol) support for advanced integrations

Lesson Plan

Segment Duration Topic
Intro 4 min Why integrations multiply Cursor's value
Demo 1 8 min Installing and managing VS Code extensions in Cursor
Demo 2 10 min Git integration — AI-powered commits, diffs, and history
Demo 3 8 min Terminal integration — error interpretation and command help
Demo 4 8 min External tools and MCP connections
Explain 4 min Building your personalised toolchain
Wrap-up 3 min Recommended setup and key takeaways

Before You Begin

Pre-work:

  • Complete Lesson 8 — Workspace Management
  • Have Git initialised in your project with at least a few commits
  • Know basic Git operations (commit, push, pull, branch)
  • Have a project with a terminal-based build or test process

Shopping List:

  • A project with Git history (at least 10+ commits for meaningful AI analysis)
  • The integrated terminal ready (Ctrl+`)
  • Access to Cursor's extension marketplace (built-in)
  • An active internet connection for extension installation

1 VS Code Extensions in Cursor

Cursor is built on VS Code's foundation, which means most VS Code extensions work seamlessly. This gives you access to a vast ecosystem of productivity tools alongside Cursor's AI features.

Installing extensions:

  1. Open Extensions panel: Cmd+Shift+X
  2. Search for the extension you want
  3. Click "Install"
  4. Some extensions require a reload — click "Reload" if prompted
  1. Open Extensions panel: Ctrl+Shift+X
  2. Search for the extension you want
  3. Click "Install"
  4. Some extensions require a reload — click "Reload" if prompted

Recommended extensions that complement Cursor's AI:

Extension Purpose Why It Pairs Well with Cursor
ESLint Linting JavaScript/TypeScript AI-generated code gets immediate lint feedback
Prettier Code formatting Auto-formats AI output to match project style
GitLens Enhanced Git features See who wrote code AI references; track changes
Error Lens Inline error display Errors are visible without hovering — easier to select for AI
Todo Tree Track TODO comments Find AI-generated TODOs that need human attention
Path Intellisense File path autocomplete Helps when typing file references for AI context
Import Cost Show package sizes Catch when AI imports heavy dependencies

Extensions to be cautious with:

  • Other AI extensions (GitHub Copilot, Tabnine, Codeium) — may conflict with Cursor's built-in AI. Disable them to avoid duplicate suggestions.
  • Heavy language servers — large extensions that consume memory may slow the editor. Monitor performance.
  • Extensions that modify the editor heavily — some may interfere with Cursor's inline diff display or AI side pane.

Managing extensions:

# Check installed extensions via terminal
code --list-extensions

# Cursor-specific: settings to disable extensions per workspace

In Settings (Cmd+, / Ctrl+,), search for extensions to find:

  • Auto-update settings
  • Per-workspace enable/disable
  • Extension recommendations for your project

Recommending extensions to your team:

Create a .vscode/extensions.json file in your project:

{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "eamodio.gitlens",
    "usernamehw.errorlens",
    "Gruntfuggly.todo-tree"
  ]
}

When team members open the project, Cursor will suggest installing these extensions.

TIP
Tip
If you previously used VS Code, you can import your extensions into Cursor. Check Cursor's documentation for migration tools, or manually install your favourites from the Extensions panel.
WARNING
Watch Out
Disable GitHub Copilot if you have it installed. Running two AI code assistants simultaneously causes duplicate suggestions, increased latency, and potential conflicts in the inline completion behaviour.

2 Git Integration with AI Features

Cursor enhances Git workflows with AI-powered features for commit messages, diff understanding, and history analysis.

AI-generated commit messages:

One of the most practical time-savers. Instead of writing commit messages manually:

  1. Stage your changes in the Source Control panel (Cmd+Shift+G)
  2. Look for the AI/sparkle icon near the commit message input
  3. Click it — Cursor generates a commit message based on your staged changes
  4. Edit if needed, then commit
  1. Stage your changes in the Source Control panel (Ctrl+Shift+G)
  2. Look for the AI/sparkle icon near the commit message input
  3. Click it — Cursor generates a commit message based on your staged changes
  4. Edit if needed, then commit

What the AI considers when generating commit messages:

  • The actual diff (lines added, removed, modified)
  • File names and paths changed
  • The type of change (new feature, bug fix, refactor, docs)
  • Your project's existing commit message style (if consistent)

Understanding diffs with AI:

When reviewing changes (yours or from a PR), use AI to explain complex diffs:

  1. Open the Source Control panel
  2. Click on a changed file to see the diff
  3. Select the confusing part of the diff
  4. Press Cmd+L / Ctrl+L and ask: "What does this change do and why might it have been made?"

Git history analysis:

Ask the AI about your project's Git history:

# In Chat, reference a file:
@src/components/UserForm.tsx

When was the validation logic last changed?
What was the reason for the most recent changes to this file?

With GitLens installed, you can see inline blame annotations that show who wrote each line. Select a line with its blame info and ask the AI about the history.

Branching workflow with AI:

Use Chat to plan your branching strategy:

I need to implement feature X. It touches:
- The user model (database changes)
- The API routes (new endpoints)
- The frontend form (new component)

Should I do this in one branch or split it up?
What order should I implement these in?

Conflict resolution with AI:

When you hit merge conflicts:

  1. Open the conflicted file
  2. Select the conflict markers (<<<<<<<, =======, >>>>>>>) and surrounding code
  3. Press Cmd+L / Ctrl+L: "Help me resolve this merge conflict. The incoming change is [describe], and the current change is [describe]. I want to keep both behaviours."
  4. The AI generates a merged version that preserves both intents
TIP
Tip
For better AI-generated commit messages, stage related changes together. If you mix a bug fix and a new feature in the same commit, the AI has to describe both — leading to vague messages. Keep commits focused.
NOTE
How It Works
Cursor's commit message generation reads the staged diff (not the entire codebase) and produces a concise summary. It follows conventional commit patterns if your project uses them (feat:, fix:, refactor:). You can reinforce this in .cursor/rules: 'Commit messages should follow Conventional Commits format.'

3 Terminal Integration and AI Error Interpretation

Cursor's integrated terminal is more than just a command line — it connects to the AI for error interpretation, command suggestions, and workflow automation.

Opening and managing the terminal:

Action Shortcut
Toggle terminal Ctrl+`
New terminal Ctrl+Shift+`
Split terminal Cmd+\ (in terminal)
Kill terminal Type exit or click trash icon
Clear terminal Cmd+K (when terminal is focused)
Action Shortcut
Toggle terminal Ctrl+`
New terminal Ctrl+Shift+`
Split terminal Ctrl+\ (in terminal)
Kill terminal Type exit or click trash icon
Clear terminal Ctrl+K (when terminal is focused)

AI-powered error interpretation:

When a command fails in the terminal:

  1. Select the error output (including the command that caused it)
  2. Press Cmd+L / Ctrl+L to send to Chat
  3. Ask: "What went wrong and how do I fix it?"

Common terminal errors the AI excels at explaining:

Error Type AI Value
npm/yarn install failures Resolves version conflicts, suggests overrides
Build errors (webpack, vite, tsc) Identifies misconfigured paths or missing loaders
Permission errors Suggests chmod, sudo alternatives, or ownership fixes
Port in use Identifies what's running on the port and how to resolve
Docker errors Explains container issues and suggests Dockerfile fixes
Database connection errors Identifies configuration mismatches

AI command suggestions:

When you're not sure how to accomplish a terminal task:

Chat: "How do I find all TypeScript files that import from the 'lodash' package?"

AI: You can use grep or find for this:
    grep -rl "from 'lodash'" --include="*.ts" --include="*.tsx" src/

Or with ripgrep (faster):
    rg "from 'lodash'" --type ts src/

Terminal + AI debugging workflow:

  1. Run your tests: npm test
  2. A test fails with output in the terminal
  3. Select the failure output
  4. Send to Chat: "This test is failing. Here's the test file: @src/utils/format.test.ts and the implementation: @src/utils/format.ts. What's wrong?"
  5. The AI has both the error context and the source code — it can diagnose precisely

Running AI-suggested commands safely:

When the AI suggests terminal commands:

  • Read the command before running it
  • Be especially careful with: rm, sudo, commands that modify system config
  • For unfamiliar commands, ask the AI: "What exactly does this command do, flag by flag?"
WARNING
Watch Out
Never blindly run terminal commands suggested by AI — especially anything with sudo, rm -rf, or that modifies system files. Always read and understand a command before executing it. The AI doesn't know your system state and may suggest destructive operations.
TIP
Tip
Use multiple terminal instances for different purposes: one for your dev server (running continuously), one for tests (run on demand), and one for Git and ad-hoc commands. Name them by right-clicking the terminal tab.

4 External Tool Connections

Cursor can connect to external tools and services to expand what the AI can access and accomplish.

Documentation integration (@docs):

Cursor can reference external documentation:

  1. In Chat, type @docs followed by the documentation source
  2. Ask questions that reference the documentation
  3. The AI retrieves relevant sections and uses them to answer

Example:

@docs Next.js

How do I implement middleware that redirects unauthenticated users?
What's the correct way to handle cookies in Server Components?

Web search ():

For current information beyond the AI's training data:

 What's the latest stable version of React?
 Is there a known issue with Prisma 5.x and PostgreSQL 16?

API documentation for your project:

If your team has internal API documentation, you can reference it:

  • Keep API docs as markdown files in your project (e.g., docs/api.md)
  • Reference them with @docs/api.md in Chat
  • The AI uses this as context for generating correct API calls

Database tools:

For projects with databases:

  • Use terminal commands to query your database (psql, mysql CLI)
  • Copy schema definitions into Chat for the AI to reference
  • Ask the AI to generate migrations based on your current schema

CI/CD integration:

While Cursor doesn't directly integrate with CI/CD pipelines, you can:

  • Copy CI error logs into Chat for analysis
  • Ask the AI to generate or fix configuration files (GitHub Actions, GitLab CI)
  • Use terminal to run CI-like checks locally before pushing

Linter and formatter integration:

Configure your linter/formatter to run on save:

// .vscode/settings.json (works in Cursor too)
{
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  }
}

This means AI-generated code gets automatically formatted and lint-fixed when you save — closing the gap between AI output and your project standards.

NOTE
How It Works
External integrations in Cursor work through a combination of @ commands (for context injection), terminal commands (for tool execution), and settings (for automatic formatting and linting). The AI itself doesn't 'connect' to external services — instead, you bring external context to the AI.
TIP
Tip
Create a 'context bundle' — a markdown file in your project that summarises key architecture decisions, API conventions, and external service configurations. Reference it with @ when asking the AI complex architectural questions.

5 MCP Support in Cursor

Model Context Protocol (MCP) is an open standard that allows AI tools to connect to external data sources and services. Cursor supports MCP, enabling you to give the AI access to tools, databases, and APIs beyond your local file system.

What MCP enables:

  • Connect the AI to external databases (read schemas, query data)
  • Access project management tools (Jira, Linear, GitHub Issues)
  • Read documentation from external sources
  • Execute actions in external services (create tickets, update records)
  • Access custom internal tools your team has built

How MCP works in Cursor:

  1. An MCP server runs (locally or remotely) and exposes "tools" the AI can use
  2. You configure Cursor to connect to the MCP server
  3. When the AI needs information from an external source, it calls the MCP tool
  4. The tool returns data that the AI incorporates into its response

Configuring MCP in Cursor:

MCP servers are configured in your Cursor settings or project configuration:

// .cursor/mcp.json (project-level MCP configuration)
{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-postgres", "postgresql://localhost:5432/mydb"]
    },
    "github": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Common MCP servers:

Server Purpose What It Gives the AI
Postgres/MySQL Database access Schema info, query results
GitHub Repository management Issues, PRs, code search
Filesystem Extended file access Read files outside the workspace
Brave Search Web search Current information from the internet
Memory Persistent memory Store and recall facts across sessions

Example: Database-aware coding

With the Postgres MCP server connected:

Chat: "Create a TypeScript function that fetches all orders for a given user,
including the order items and product details. Use our actual database schema."

AI: [Reads schema via MCP] I can see your schema has:
- orders (id, user_id, created_at, status)
- order_items (id, order_id, product_id, quantity, price)
- products (id, name, description, price, category)

Here's the function using your actual table and column names...

Example: GitHub Issues integration

With the GitHub MCP server:

Chat: "What are the open bugs assigned to me? Summarise the top priority ones."

AI: [Queries GitHub via MCP] You have 4 open bugs:
1. #234 - Login fails on Safari (P1, reported 2 days ago)
2. #241 - Cart total doesn't update (P1, reported today)
3. #228 - Profile image upload timeout (P2)
4. #215 - Dark mode toggle flickers (P3)

Security considerations:

  • MCP servers have access to external resources — configure with least privilege
  • Use environment variables for tokens and credentials (never hardcode)
  • Review which tools each MCP server exposes before enabling
  • Be cautious with write operations (creating/deleting resources)
WARNING
Watch Out
MCP servers can read and potentially modify external systems. Be careful what you connect. A database MCP server with write access could let the AI modify production data if misconfigured. Use read-only credentials where possible, and always use development/staging environments.
TIP
Tip
Start with read-only MCP servers (database schema viewer, GitHub issues reader) before enabling write operations. This lets you experience the value of external context without risk of accidental modifications.

6 Building Your Personalised Toolchain

The real power comes from combining extensions, integrations, and AI features into a workflow tailored to your specific needs.

Starter toolchain for web development:

Extensions:
- ESLint + Prettier (code quality on save)
- GitLens (enhanced Git context)
- Error Lens (inline errors for easy AI selection)
- REST Client (test APIs without leaving editor)

Settings:
- Format on save: enabled
- ESLint auto-fix on save: enabled
- Cursor AI model: latest available

.cursor/rules:
- Project-specific conventions

.cursorignore:
- node_modules, dist, .next, coverage

Starter toolchain for backend/API development:

Extensions:
- ESLint + Prettier
- Thunder Client or REST Client (API testing)
- Database client extension (view data without leaving editor)
- Docker extension (if using containers)

MCP Servers:
- Database server (read-only, development database)
- GitHub server (issues and PR context)

Terminal setup:
- Split terminal: server | tests | general

Starter toolchain for data/ML work:

Extensions:
- Jupyter extension (notebook support)
- Python extension (language server)
- Rainbow CSV (data file viewing)

Settings:
- Python formatter: Black or Ruff
- Linter: Ruff

.cursor/rules:
- "Use pandas for data manipulation"
- "Prefer vectorized operations over loops"
- "Always include type hints for function signatures"

Evaluating your toolchain:

Ask yourself periodically:

  • Are there manual steps I repeat daily that could be automated?
  • Do I often copy information from external tools into Chat? (Consider MCP)
  • Are there extension-provided features I never use? (Disable for performance)
  • Does AI-generated code require consistent manual fixes? (Add to .cursor/rules or lint config)

The feedback loop:

AI generates code
    → Linter catches style issues (auto-fix on save)
    → Tests catch logic issues (run in terminal)
    → You catch design issues (manual review)
    → Update .cursor/rules to prevent recurrence
    → Better AI output next time

This feedback loop is how your toolchain improves over time. Each cycle teaches the AI (via rules) and catches more issues automatically (via extensions).

TIP
Tip
Document your toolchain in a CONTRIBUTING.md or similar file in your project. New team members can set up the same extensions, MCP servers, and configurations — ensuring consistent AI behaviour across the team.
NOTE
How It Works
Your toolchain creates layers of quality control. The AI generates code (layer 1), extensions format and lint it (layer 2), tests verify it (layer 3), and your review catches what automation misses (layer 4). Each layer reduces the chance of bugs reaching production.

Questions & Answers

Q: Can I use GitHub Copilot alongside Cursor's built-in AI?
Technically yes, but it's not recommended. Both provide inline code completions and will conflict — you'll see duplicate suggestions and it becomes unclear which AI is generating what. Disable Copilot when using Cursor. Cursor's AI features are designed to work together (inline + chat + agent), and adding another AI creates confusion rather than value.
Q: Are all VS Code extensions compatible with Cursor?
Most are compatible, but not all. Extensions that rely on specific VS Code APIs or internal features may have issues. Language extensions (Python, Java, Go), formatting tools, and linters work well. Extensions that heavily modify the UI or depend on the VS Code Marketplace authentication may have limitations. If an extension doesn't work, check Cursor's community forums for known issues.
Q: How do I set up MCP if my team uses an internal tool that doesn't have a pre-built server?
You can build custom MCP servers. The Model Context Protocol is an open specification, and SDKs are available in TypeScript, Python, and other languages. A basic MCP server exposes "tools" (functions the AI can call) and "resources" (data the AI can read). If your team has an internal API, you can wrap it in an MCP server to make it accessible to the AI. Start with the MCP documentation at modelcontextprotocol.io.

Key Takeaways

  1. Most VS Code extensions work in Cursor — leverage the ecosystem for linting, formatting, and tooling
  2. AI-powered Git features save time on commit messages and help understand complex diffs
  3. Terminal errors become learning moments — select, send to Chat, get explanations
  4. MCP connects the AI to external tools — databases, APIs, project management, and more
  5. Build a layered quality system — AI generates, extensions format, tests verify, you review
  6. Disable competing AI extensions — one AI assistant per editor avoids confusion and conflicts

Next Steps: In Lesson 10 — Advanced Workflows, you'll learn how to combine everything into sophisticated workflows using Agent, complex refactoring, and team collaboration features.