# Using Claude in Cursor

#### You:
how to use claude code in cursor

#### ChatGPT:
You can use Claude in Cursor in two different ways:

1. **Use Claude models inside Cursor’s built-in AI**
2. **Run full Claude Code inside Cursor** (Anthropic’s own coding agent)

Most people confuse these, but they’re different workflows. ([DataCamp](https://www.datacamp.com/de/tutorial/claude-code-in-cursor?utm_source=chatgpt.com), [haihai.ai](https://www.haihai.ai/cursor-vs-claude-code/?utm_source=chatgpt.com))

## Option 1 - Use Claude models inside Cursor (easiest)

This is the simplest setup.

### Steps

1. Install Cursor from [Cursor official site](https://cursor.com/?utm_source=chatgpt.com)
2. Open Cursor
3. Go to:
   - **Settings → Models**
4. Enable Claude models like:
   - Claude Sonnet
   - Claude Opus (if available)
5. Add your API key if needed:
   - Anthropic API key from [Anthropic Console](https://console.anthropic.com/?utm_source=chatgpt.com)

Then you can:

- Chat with your codebase
- Generate files
- Refactor code
- Use Cmd/Ctrl + K for inline edits
- Use Agent mode

This uses Cursor’s interface with Claude as the backend model.

---

## Option 2 - Run full Claude Code inside Cursor (recommended for advanced workflows)

This gives you Anthropic’s actual “Claude Code” agent experience *inside* Cursor. ([DataCamp](https://www.datacamp.com/de/tutorial/claude-code-in-cursor?utm_source=chatgpt.com), [Claude Code](https://code.claude.com/docs/en/vs-code?utm_source=chatgpt.com))

### Prerequisites

You need:

- Cursor installed
- Node.js installed
- A paid Claude plan or Anthropic API access ([DataCamp](https://www.datacamp.com/de/tutorial/claude-code-in-cursor?utm_source=chatgpt.com))

---

## Method A - Install the Claude Code extension

### Step 1: Open Extensions

In Cursor:

- Press:
  - Mac: `Cmd + Shift + X`
  - Windows/Linux: `Ctrl + Shift + X`

### Step 2: Search for:

```text
Claude Code
```

Install:

```text
anthropic.claude-code
```

([DataCamp](https://www.datacamp.com/de/tutorial/claude-code-in-cursor?utm_source=chatgpt.com), [Claude Code](https://code.claude.com/docs/en/vs-code?utm_source=chatgpt.com))

---

## Method B - Install from terminal (often easiest)

Open Cursor terminal and run:

```bash
npm install -g @anthropic-ai/claude-code
```

Then start it:

```bash
claude
```

Cursor often detects this automatically and integrates the extension. ([Medium](https://dimillian.medium.com/building-ios-apps-with-cursor-and-claude-code-ee7635edde24?utm_source=chatgpt.com), [builder.io](https://www.builder.io/blog/claude-code?utm_source=chatgpt.com))

---

## Typical workflow

A lot of developers now use this combo:

- Cursor for:
  - autocomplete
  - tab completion
  - quick edits
  - navigation

- Claude Code for:
  - large refactors
  - architecture changes
  - multi-file edits
  - autonomous coding tasks

([builder.io](https://www.builder.io/blog/claude-code?utm_source=chatgpt.com), [Business Insider](https://www.businessinsider.com/inside-startups-claude-has-already-won-the-ai-coding-wars-2026-5?utm_source=chatgpt.com))

---

## Useful shortcuts

Once installed:

- Open Claude panel:
  - `Cmd + Esc` (Mac)
  - `Ctrl + Esc` (Windows/Linux)

- Ask project-wide questions:

```text
Explain this architecture
```

```text
Refactor authentication into middleware
```

```text
Add tests for all API routes
```

---

## Recommended setup

For best results:

### In Cursor settings

Enable:

- Auto-run terminal commands cautiously
- Codebase indexing
- Semantic search

### In your repo

Create:

```text
CLAUDE.md
```

This acts like persistent project memory for Claude Code. ([DataCamp](https://www.datacamp.com/de/tutorial/claude-code-in-cursor?utm_source=chatgpt.com), [arXiv](https://arxiv.org/abs/2602.14690?utm_source=chatgpt.com))

Example:

```md
# Project Rules

- Use TypeScript
- Prefer functional React components
- Use Tailwind
- Never modify generated files
```

---

## Common issue

If the extension does not appear in Cursor:

1. Update Cursor
2. Ensure VS Code engine ≥ 1.98
3. Run `claude` once in Cursor terminal
4. Restart Cursor

Some users report marketplace detection bugs. ([Cursor - Community Forum](https://forum.cursor.com/t/claude-code-integration/115003?utm_source=chatgpt.com), [Gist](https://gist.github.com/sotayamashita/3da81de9d6f2c307d15bf83c9e6e1af6?utm_source=chatgpt.com))

---

## Which should you use?

| Setup                      | Best for                             |
| -------------------------- | ------------------------------------ |
| Claude model in Cursor     | Simpler everyday coding              |
| Full Claude Code in Cursor | Agentic workflows and large projects |

If you want, I can also show you:

- the **best Cursor + Claude settings**
- a **cheap API setup**
- a **power-user workflow**
- how to use **Claude Code + GitHub + terminal together**
- how to avoid burning through Claude tokens quickly
