# ResultsZA MCP server

> Lets AI assistants look up South African lottery results, check winning numbers, view number statistics, and access horse racing data.

- Repository: https://github.com/Stef1986/resultsza-sdk
- Page: https://hostedmcp.org/servers/stef1986/mcp
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.1.1

## Install

### Claude Code

```sh
claude mcp add --env 'RESULTSZA_API_KEY=<YOUR_RESULTSZA_API_KEY>' mcp -- npx -y resultsza-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "resultsza-mcp"
      ],
      "env": {
        "RESULTSZA_API_KEY": "<YOUR_RESULTSZA_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "resultsza-mcp"
      ],
      "env": {
        "RESULTSZA_API_KEY": "<YOUR_RESULTSZA_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","resultsza-mcp"],"env":{"RESULTSZA_API_KEY":"<YOUR_RESULTSZA_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "resultsza-mcp"
      ],
      "env": {
        "RESULTSZA_API_KEY": "<YOUR_RESULTSZA_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp --env 'RESULTSZA_API_KEY=<YOUR_RESULTSZA_API_KEY>' -- npx -y resultsza-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "resultsza-mcp"]

[mcp_servers.mcp.env]
RESULTSZA_API_KEY = "<YOUR_RESULTSZA_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'RESULTSZA_API_KEY=<YOUR_RESULTSZA_API_KEY>' mcp npx -- -y resultsza-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "resultsza-mcp"
      ],
      "env": {
        "RESULTSZA_API_KEY": "<YOUR_RESULTSZA_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `RESULTSZA_API_KEY` | yes | yes | Your ResultsZA API key (create an account at https://resultsza.co.za/signup) |

## Tools (10)

- `check_balance`: Show the user's ResultsZA plan, calls used this month and calls left, and the subscription end date. Free: does not use any API calls. (read-only)
- `get_lottery_results`: Official draw results for one game: South African National Lottery games (with prize divisions, winners and jackpot), UK 49's, EuroMillions, Irish Lotto, US Powerball, Mega Millions, Kenya, Nigeria, Ghana and Gosloto. Omit date for the latest draw. Gosloto and Kenya with a date return every draw that day. Uses 1 API call from your ResultsZA plan. (read-only)
- `check_lottery_numbers`: Check up to 10 lines of numbers against one South African National Lottery draw. Returns matches and the prize division per line for that draw. Uses 1 API call per request (up to 10 lines). (read-only)
- `bulk_check_lottery_numbers`: Check up to 500 lines against one South African National Lottery draw. Returns matches and the prize division per line for that draw. Uses 1 API call PER LINE (up to 500). Only use this when the user explicitly has more than 10 lines; otherwise use check_lottery_numbers, which costs 1 call for up to 10 lines. (read-only)
- `get_horse_racing_meetings`: South African horse racing meetings (date, venue, number of races) in a date range of at most 7 days. Defaults to the last 7 days. Use it to find the venue name for the other racing tools. Uses 1 API call from your ResultsZA plan. (read-only)
- `get_horse_racing_card`: All races at one South African meeting with the top three finishers and tote dividends. Uses 1 API call from your ResultsZA plan. (read-only)
- `get_horse_race`: The full runner table for one race at a South African meeting. Uses 1 API call from your ResultsZA plan. (read-only)
- `generate_lottery_numbers`: Random lines for a game using its correct number ranges. Uses 1 API call from your ResultsZA plan (regardless of the number of lines). Unknown games are rejected without using a call. (read-only)
- `lucky_numbers_from_text`: Personalised numbers for a game derived from a name, date or phrase (the same text always gives the same numbers). For fun only. Uses 1 API call from your ResultsZA plan. (read-only)
- `get_number_statistics`: Historical number statistics for a game: hot and cold numbers, how often each number was drawn, or the most common pairs. Products include the South African games, "UK49s" (all four draws combined), "EuroMillions", "US Powerball", "Kenya Lotto" and "Gosloto 6/45". Unknown products are rejected without using a call. Uses 1 API call from your ResultsZA plan. (read-only)

## FAQ

### What kind of lottery results can I access?

You can access South African games, UK 49's, EuroMillions, Irish Lotto, US Powerball, Mega Millions, Kenya, Nigeria, Ghana, and Gosloto.

### Can I check if my specific numbers won?

Yes, you can check up to 10 lines against a South African draw or use bulk checking for up to 500 lines.

### Does the server provide horse racing information?

Yes, it provides South African race meetings, race cards with dividends, and full runner tables for specific races.

### How is my API key handled?

Your API key stays on your machine and is only sent to the official ResultsZA website; it is never written to logs or returned in tool results.
