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

# Cursor

> Connect Leeroopedia MCP to Cursor

## Prerequisites

* A Leeroopedia API key. Get one at [app.leeroopedia.com](https://app.leeroopedia.com)

## Quick Install (Remote Server)

Add to your Cursor settings at `.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "leeroopedia": {
      "url": "https://mcp.leeroopedia.com/mcp?token=kpsk_your_key_here"
    }
  }
}
```

Replace `kpsk_your_key_here` with your actual API key. Open the MCP panel in Cursor settings and confirm the **leeroopedia** server shows a green status.

## Alternative: Run Locally

If you prefer to run the MCP server on your own machine, use `uvx` or `pip`.

<Steps>
  <Step title="Add MCP config">
    Add to your Cursor settings at `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "leeroopedia": {
          "command": "uvx",
          "args": ["leeroopedia-mcp"],
          "env": {
            "LEEROOPEDIA_API_KEY": "kpsk_your_key_here"
          }
        }
      }
    }
    ```

    <Note>
      `uvx` auto-downloads and runs the package. No `pip install` needed. It also auto-updates to the latest version.
    </Note>

    <Warning>
      **Getting `spawn uvx ENOENT`?** Cursor can't find `uvx` in its PATH (GUI apps don't inherit your shell's PATH). Find the full path by running `which uvx` (or `where uvx` on Windows) in your terminal, then replace `"uvx"` with the full path:

      ```json theme={null}
      "command": "/home/username/.local/bin/uvx"
      ```

      Common locations: `~/.local/bin/uvx` (Linux), `~/.local/bin/uvx` (macOS curl install), `/opt/homebrew/bin/uvx` (macOS Homebrew).
    </Warning>

    If you don't have `uv`, install manually first:

    ```bash theme={null}
    pip install leeroopedia-mcp
    ```

    Then use `leeroopedia-mcp` as the command (without `args`):

    ```json theme={null}
    {
      "mcpServers": {
        "leeroopedia": {
          "command": "leeroopedia-mcp",
          "env": {
            "LEEROOPEDIA_API_KEY": "kpsk_your_key_here"
          }
        }
      }
    }
    ```
  </Step>

  <Step title="Verify the connection">
    Open the MCP panel in Cursor settings and confirm the **leeroopedia** server shows a green status.
  </Step>
</Steps>

## Try It Out

Ask Cursor something like:

> "Use leeroopedia to search for best practices for QLoRA fine-tuning."

The agent will call `search_knowledge` and return a synthesized answer with `[PageID]` citations.

You can then follow up with:

> "Get the full page for \[PageID] that was cited."

## Optional: Add the Agent Skill File

You can add an optional skill file that teaches Cursor's agent **when and how** to pick the right Leeroopedia tool. This improves tool selection, encourages parallel searches, and provides canonical workflows for common tasks.

Download [`SKILL.md`](https://raw.githubusercontent.com/Leeroo-AI/leeroopedia-mcp/main/SKILL.md) and place it at `.cursor/rules/leeroopedia.md` in your project (or add it as an Agent Skill). Cursor reads rule files automatically during agent sessions.

<Note>
  This step is optional. The MCP tools work without the skill file. The skill file just helps the agent make better tool choices automatically.
</Note>

## Next Steps

<CardGroup cols={2}>
  <Card title="Tools Overview" icon="wrench" href="/docs/tools/overview">
    Learn about all 8 available tools
  </Card>

  <Card title="Environment Variables" icon="gear" href="/docs/environment-variables">
    Configuration reference
  </Card>
</CardGroup>
