> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coingecko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Add the CoinGecko MCP server to Cursor and load SDK prompt rules so the in-editor assistant writes correct API code.

[Cursor](https://cursor.com) is an AI-first code editor with a built-in chat and agent mode. The setup below gets live CoinGecko data and correct SDK patterns into every session.

## 1. Add the MCP Server

Cursor supports MCP natively. Open **Settings → MCP → Add new MCP server** and paste the config below, or edit `~/.cursor/mcp.json` directly.

<CodeGroup>
  ```json Keyless theme={null}
  {
    "mcpServers": {
      "coingecko_mcp": {
        "command": "npx",
        "args": ["mcp-remote", "https://mcp.api.coingecko.com/mcp"]
      }
    }
  }
  ```

  ```json Authenticated (BYOK) theme={null}
  {
    "mcpServers": {
      "coingecko_mcp": {
        "command": "npx",
        "args": ["mcp-remote", "https://mcp.pro-api.coingecko.com/mcp"]
      }
    }
  }
  ```
</CodeGroup>

After saving, restart Cursor. You'll see `coingecko_mcp` under **Available Tools** in the chat sidebar.

Full instructions: [MCP Server docs](/docs/ai-agent-hub/mcp-server).

## 2. Add AI prompt rules

Cursor lets you project-scope rules via `.cursor/rules/*.mdc` (or the legacy `.cursorrules` file). Paste our SDK prompt into a rule file so every generation follows the right patterns.

* [Python rules](/docs/ai-agent-hub/python-ai-prompts)
* [TypeScript rules](/docs/ai-agent-hub/typescript-ai-prompts)

<Tip>
  Name the rule file something like `coingecko-sdk.mdc` and set `alwaysApply: true` in the frontmatter so it's loaded on every request.
</Tip>

## What to try next

Try prompting Cursor's agent mode with:

> *"Using the CoinGecko MCP tool, fetch the current BTC and ETH prices and build a React widget that displays them with live updates."*

> *"Write a TypeScript script that pulls the top 50 coins by market cap and exports them to a CSV."*

***

Have feedback or need help? Reach out to `eason.lim@coingecko[dot]com`.
