> For the complete documentation index, see [llms.txt](https://docs.sportmonks.com/v3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportmonks.com/v3/sportmonks-ai-docs/mcp-server-beta/setup/claude-code.md).

# Claude Code

### Prerequisites

* [Node.js 18+](https://nodejs.org)
* A Sportmonks API token from [my.sportmonks.com](https://my.sportmonks.com/subscriptions)
* [Claude Code](https://claude.ai/code) installed

### Install

**1. Register the MCP server**

```bash
claude mcp add sportmonks-football \
  --env SPORTMONKS_API_TOKEN="your_token" \
  -- npx -y sportmonks-football-mcp-server
```

**2. Verify**

```bash
claude mcp list
```

You should see `sportmonks-football` with status `Connected`.

### Environment variables

| Variable                | Required | Description                                                                                   |
| ----------------------- | -------- | --------------------------------------------------------------------------------------------- |
| `SPORTMONKS_API_TOKEN`  | Yes      | Your Sportmonks API token                                                                     |
| `SPORTMONKS_LOG_FILE`   | No       | Path for the local tool-call log. Set to `off` to disable. Defaults to your OS temp directory |
| `SPORTMONKS_DEBUG_URLS` | No       | Set to `1` or `true` to log outbound API URLs to stderr (token redacted). Off by default      |

### Test it

Open Claude Code and ask:

```
Search for "Liverpool" and show me their current squad
```

### Updating

The server runs via `npx`, so you always get the latest published version automatically. No manual update steps needed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportmonks.com/v3/sportmonks-ai-docs/mcp-server-beta/setup/claude-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
