> ## 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.

# Claude Code

> Connect Leeroopedia MCP to Claude Code

## Prerequisites

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

## Quick Install (Remote Server)

Copy this one-liner into your terminal:

```bash theme={null}
claude mcp add --transport http leeroopedia "https://mcp.leeroopedia.com/mcp?token=kpsk_your_key_here"
```

Replace `kpsk_your_key_here` with your actual API key.

Verify the integration by running:

```bash theme={null}
claude mcp list
```

You should see:

```
leeroopedia: https://mcp.leeroopedia.com/mcp?token=kpsk_... (HTTP) - ✓ Connected
```

## 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 `~/.claude.json` (global) or project `.mcp.json` (per-project):

    ```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>

    <Note>
      **Getting `spawn uvx ENOENT`?** Your IDE can't find `uvx` in its PATH. Run `which uvx` (or `where uvx` on Windows) in your terminal to get the full path, then replace `"uvx"` with it in your config (e.g. `"/home/username/.local/bin/uvx"`).
    </Note>

    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">
    Run `claude mcp list` in your project directory. You should see:

    ```
    leeroopedia: uvx leeroopedia-mcp - ✓ Connected
    ```
  </Step>
</Steps>

## Try It Out

Ask Claude Code 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 Claude Code **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 paste its contents into your project's `CLAUDE.md` file (create one if it doesn't exist). Claude Code reads this file automatically at the start of every session.

<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>
