Skip to main content

An MCP server to interact with a the the odds-api API.

Project description

mcp-odds-api

A mimimalist Model Context Protocol MCP server to interact with the OddsAPI.

Features

  • Uses environmental variables to limit the queries to some regions and a single sport.

It supports both SSE and STDIO transports.

Tools

The server implements the following tools to interact with the OddsAPI:

  • get_events:

    • Get in-play and forthcoming events (matches).
  • get_odds:

    • Get odds for all forthcoming events (matches) for selected betting markets.
  • get_event_odds:

    • Get odds for a specific event (match) for selected betting markets.

Configuration

  1. Create _or edit the Claude Desktop configuration file located at:

    • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the following:

{
  "mcpServers": {
    "mcp-bauplan": {
      "command": "/path/to/uvx",
      "args": ["mcp-odds-api"],
      "env": {
        "ODDS_API_KEY": "<your-api-odds-key>",
        "ODDS_API_REGIONS": "<region1>", "<region2>",
        "ODDS_API_SPORT": "<selected-sport-key>",
      }
    }
  }
}
  1. Replace /path/to/uvx with the absolute path to the uvx executable. Find the path with which uvx command in a terminal. This ensures that the correct version of uvx is used when starting the server.

  2. Restart Claude Desktop to apply the changes.

Run the stand-alone SSE server

Create a .env file from .env.example and then execute the following command:

$ uvx --env-file /path/to/.env mcp-odds-api --transport sse --port 9090

Note the use of nvx and not uvx will fetch mcp-bauplan from the default registry https://pypi.org.

Development

Setup

  1. Prerequisites:

  2. Clone the Repository:

git clone https://github.com/marcoeg/mcp-odds-api
cd mcp-nvd
  1. Set Environment Variables:
    • Create a .env file in the project root:
    ODDS_API_KEY="" ODDS_API_REGIONS="", "" ODDS_API_SPORT=""
    
    
  2. Install Dependencies:
uv sync
uv pip install -e .

Start the server with SSE transport

$ uv run mcp-odds-api --transport sse --port 9090
python-dotenv could not parse statement starting at line 2
2025-04-30 19:35:34 - dotenv.main - WARNING - python-dotenv could not parse statement starting at line 2
INFO:     Started server process [68314]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:9090 (Press CTRL+C to quit)

Run the Inspector:

$ CLIENT_PORT=8077 TARGET_PORT=9090 \
npx @modelcontextprotocol/inspector run

Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:8077 🚀

Then open the browser to the URL indicated by the MCP Inspector. Select SSE Transport Type.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_odds_api-0.1.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_odds_api-0.1.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_odds_api-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_odds_api-0.1.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mcp_odds_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64290e26ee40162144c61d498f2b8c6df8facdd4ee5c96933688d3ea6ebc6d3d
MD5 eddb1fb3bb9abb54751762e3ae070547
BLAKE2b-256 d8bfe09a94ff95e1d2a35346eda11f748fab758f9c4d6de0f471ce0fe10312f4

See more details on using hashes here.

File details

Details for the file mcp_odds_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_odds_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mcp_odds_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7c911054e592b792eaa937c1e85e4dfc9c574cf4984d0cc191f55cbd4cf9b39
MD5 02cf8b22b67f409af8deac9c8320df8f
BLAKE2b-256 f6f237a7d3fc5e9a6d5006049bd25ff73d432c0f3e7e39e1d77a068a8c70af12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page