> ## Documentation index
> Fetch the complete documentation index at: https://contextrepo.com/docs/llms.txt
> Use it to find every page before exploring further.

# Cursor Setup

> Connect Context Repo to Cursor and access your prompts, documents, and collections directly from your editor. Setup takes about 60 seconds.

Connect Context Repo to Cursor and access your prompts, documents, and collections directly from your editor. Setup takes about 60 seconds.

> **Before you start:** You'll need a [Context Repo](https://contextrepo.com) account and [Cursor](https://cursor.com) installed (version 0.40 or later).

### Install with one click

The fastest way to connect is Cursor's deep link installer. Click the link below or paste it into your browser:

```
cursor://anysphere.cursor-deeplink/mcp/install?name=context-repo&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNvbnRleHQtcmVwby1tY3AiXSwiZW52Ijp7IkNPTlRFWFRSRVBPX0FQSV9LRVkiOiIifX0=
```

Cursor will automatically configure the Context Repo MCP Server. When prompted, sign in with your Context Repo account to authorize access.

If the deep link doesn't work (or you prefer manual setup), continue to the next step.

### Or configure manually

Open your Cursor MCP configuration file and add the `context-repo` server:

```json title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "context-repo": {
      "command": "npx",
      "args": ["-y", "context-repo-mcp"],
      "env": {
        "CONTEXTREPO_API_KEY": "gm_your_api_key_here"
      }
    }
  }
}
```

Replace `gm_your_api_key_here` with your actual API key. You can generate one from **Dashboard > Settings > API Keys** — select the `prompts.read` and `documents.read` permissions.

> **Note:** If you already have other MCP servers configured, add the `"context-repo"` entry inside the existing `"mcpServers"` object.

### Verify the connection

Restart Cursor to load the new configuration. Open a new AI chat and ask:

```
List my prompts
```

You should see your Context Repo prompts listed in the response. If you haven't created any prompts yet, the assistant will tell you the list is empty — that still means it's working.

## What you can do

With Context Repo connected, you can ask your AI assistant to:

- **List and search** your prompts, documents, and collections
- **Create new content** directly from the conversation
- **Use prompt templates** with variables filled in contextually
- **Search your knowledge base** using semantic or keyword queries
- **Explore documents** chunk by chunk with Deep Search
- **Manage versions** — view history and restore previous versions

See the [MCP Tools Reference](https://contextrepo.com/docs/mcp/tools-reference) for all 29 available tools.

## Troubleshooting

### Server not starting

Make sure you have Node.js 18 or later installed. Run `node --version` to check. The `npx` command needs a working Node.js installation to download and run the MCP server package.

```bash
node --version
# Should print v18.x.x or higher
```

If you're using nvm, switch to a supported version with `nvm use 18`.

### Authentication errors

Double-check that your API key is correct and hasn't been revoked. You can generate a new key from **Dashboard > Settings > API Keys**. Make sure there are no extra spaces or line breaks in the `CONTEXTREPO_API_KEY` value.

If you used the one-click deep link, try re-authorizing by removing the server from Cursor's MCP settings and clicking the link again.

### Tools don't appear in chat

Restart Cursor after editing the config file. Cursor caches the MCP server list on startup, so changes won't take effect until you restart. You can verify the server is loaded by checking Cursor's MCP settings panel — Context Repo should appear in the list of connected servers.

- [Claude Desktop Setup](https://contextrepo.com/docs/mcp/setup-guides/claude-desktop): Set up Context Repo with Claude Desktop.
- [MCP Tools Reference](https://contextrepo.com/docs/mcp/tools-reference): See the current tools available through the hosted MCP Server.
- [MCP Server Overview](https://contextrepo.com/docs/mcp): Learn about the Model Context Protocol and how it connects your workspace to AI assistants.
