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

# MCP Server

> Connect apinn to your AI assistant (Claude, Cursor…) via the MCP server.

apinn exposes an **MCP server** (Model Context Protocol): your AI assistant can **search the documentation** and **call the API** (list sports, fetch a match's odds, history, specials…) directly in natural language.

<Info>
  MCP server URL: **`https://docs.apinn.io/mcp`** (streamable HTTP transport).
</Info>

## Connecting the server

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http apinn https://docs.apinn.io/mcp
    ```

    Then in a session: "list the live soccer matches", "give me the odds for event 1632003656".
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (or *Settings → MCP → Add*):

    ```json theme={null}
    {
      "mcpServers": {
        "apinn": {
          "url": "https://docs.apinn.io/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    In `claude_desktop_config.json` (Settings → Developer → Edit Config):

    ```json theme={null}
    {
      "mcpServers": {
        "apinn": {
          "command": "npx",
          "args": ["-y", "mcp-remote", "https://docs.apinn.io/mcp"]
        }
      }
    }
    ```

    Restart Claude Desktop; the `apinn` server appears in the tools list.
  </Tab>

  <Tab title="Other MCP client">
    Any MCP-compatible client (**streamable HTTP** transport) can connect to:

    ```
    https://docs.apinn.io/mcp
    ```
  </Tab>
</Tabs>

## Authentication

* The **documentation search** tools work without a key.
* The tools that **call the API** use your **apinn key** (`X-API-Key`). Provide it to the assistant / in the MCP client configuration when it asks for it. Each call counts toward your [hourly quota](/en/rate-limits).

<Warning>
  Never paste your key into a public repository or a screen share. Treat it as a secret.
</Warning>

## What the assistant can do

* "What sports are available?" → `/api/sports`
* "Give me the live soccer matches" → `/api/fixtures?sport_id=29&live=1`
* "Current odds for event 1632003656" → `/api/odds`
* "Complete odds history for this match" → `/api/odds?full_history=1`
* "Champions League winner: favorites' odds" → `/api/specials/outrights`

All the [API reference endpoints](/en/api-reference/introduction) are exposed as MCP tools (read-only).
