Skip to main content
Glama
Odds De-vig MCP Server

Odds De-vig MCP Server

by Mavline

Odds De-vig MCP Server

MCP server for fetching sports odds from The Odds API and removing the bookmaker margin (vig).

✅ Latest improvements (v1.1.0)

  • API Usage Tracking: All responses now include the remaining API call allowance

  • Retry Logic: Automatic retries on connection issues (3 attempts)

  • Better Error Handling: Improved network error handling

  • Response Format: Structured responses with summary and apiUsage

Related MCP server: betbetter-mcp

Features

Tools

  1. get_sports - Get a list of supported sports (no API request)

  2. get_today_mlb - Get today's MLB games with processed odds (cost-efficient)

  3. get_upcoming_odds - Get raw odds (default: today's MLB games)

  4. get_processed_odds - Get processed odds with the margin removed

  5. get_event_consensus - Get the consensus line for a specific event

  6. get_api_usage - Get API usage statistics (makes 1 API request)

Resources

  • odds://sports - List of supported sports (no API request)

  • odds://today-mlb - Today's MLB games with processed odds

  • odds://processed - Processed odds without margin (default: today's MLB games)

Margin removal methods

1. Proportional (default)

The simplest and most commonly used method:

fair_probability = implied_probability / total_implied_probability

2. Power (Shin)

A more complex method that takes the number of outcomes into account:

fair_probability = implied_probability^n / total_implied_probability^(n-1)

3. Additive

Distributes the margin evenly across all outcomes:

fair_probability = implied_probability - (total_vig / number_of_outcomes)

Installation and setup

# Установка зависимостей
npm install

# Сборка
npm run build

# Запуск
npm start

# Разработка
npm run dev

Configuration

Set the ODDS_API_KEY environment variable or use the default key:

export ODDS_API_KEY=your_api_key_here

⚠️ API Limits

IMPORTANT: The Odds API has a limit of 500 requests per month on the free plan!

Optimizations to save requests:

  • By default, only today's MLB games are requested

  • get_sports returns a hardcoded list without an API request

  • get_today_mlb is the most cost-efficient way to get data

  • All requests log API usage

Recommendations:

  • Use get_today_mlb for testing

  • Limit yourself to 20 requests per day for tests

  • Monitor usage via get_api_usage

Usage

Getting the list of sports (no API request)

{
  "tool": "get_sports"
}

Getting today's MLB games (cost-efficient)

{
  "tool": "get_today_mlb",
  "arguments": {
    "deVigMethod": "proportional"
  }
}

Getting processed odds

{
  "tool": "get_processed_odds",
  "arguments": {
    "sport": "americanfootball_nfl",
    "deVigMethod": "proportional",
    "removeOutliers": true,
    "minBookmakers": 3
  }
}

Getting the consensus line

{
  "tool": "get_event_consensus",
  "arguments": {
    "eventId": "event_id_from_api",
    "deVigMethod": "power"
  }
}

Data structure

ProcessedEvent

interface ProcessedEvent {
  id: string;
  sportKey: string;
  sportTitle: string;
  commenceTime: string;
  homeTeam: string;
  awayTeam: string;
  bookmakers: ProcessedBookmaker[];
  consensusLine?: {
    homeTeamFairOdds: number;
    awayTeamFairOdds: number;
    averageVig: number;
  };
}

ProcessedOutcome

interface ProcessedOutcome {
  name: string;
  americanOdds: number;
  decimalOdds: number;
  impliedProbability: number;
  fairProbability: number; // После удаления маржи
}

API Limits

CRITICAL: Limit of 500 requests/month!

Current optimizations:

  • Focus on MLB (plays daily)

  • Requests only for today's games

  • Hardcoded list of sports

  • Logging of every request

Monitoring:

{
  "tool": "get_api_usage"
}

Returns:

{
  "requestsUsed": "15",
  "requestsRemaining": "485",
  "monthlyLimit": 500,
  "eventsFound": 12
}

Next steps

  1. Polymarket CLOB API Server - for fetching data from Polymarket

  2. Comparison Server - for comparing lines and finding arbitrage

  3. News/SERP Server - for fetching news and context

Available Tools

6 tools
get_api_usageA

Get current API usage statistics (makes 1 API call)

Inputs: no named parameters.

get_event_consensusA

Get consensus line for a specific event

Inputs: eventId (required), deVigMethod, minBookmakers, removeOutliers.

get_processed_oddsB

Get odds with vig removed and fair probabilities calculated

Inputs: sport, markets, regions, deVigMethod, +4 more.

get_sportsA

Get limited list of supported sports (no API call)

Inputs: no named parameters.

get_today_mlbB

Get today's MLB games with processed odds (API efficient)

Inputs: deVigMethod.

get_upcoming_oddsB

Get upcoming odds for sports events (limited to today by default)

Inputs: sport, markets, regions, commenceTimeTo, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 6 tools

    Disambiguation4/5

    The tools have mostly distinct purposes: sports list, today's games, upcoming odds, processed odds, event consensus, and API usage. However, 'get_processed_odds' and 'get_event_consensus' could overlap for agents looking for the best line on an event, though descriptions clarify that processed odds gives probabilities and consensus gives a single line.

    Naming Consistency4/5

    All tools follow the 'get_' prefix with a resource, which is consistent. The naming is clear and predictable, but some names like 'get_upcoming_odds' and 'get_processed_odds' are similar in structure, which is minor. No mixing of conventions.

    Tool Count5/5

    With 6 tools, the server is well-scoped for a specialized odds processing service. Each tool serves a distinct function, and the count is within the ideal 3-15 range, providing enough coverage without being bloated.

    Completeness4/5

    The tool surface covers listing sports, fetching today's games, upcoming events, processed odds, consensus lines, and API usage. There are minor gaps such as no ability to fetch specific historical games or detailed event details beyond consensus, but the core workflow of getting and processing odds is complete.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables fetching sportsbook odds, live scores, and event information across 70+ books and 30+ leagues, with tools to list sports, get scores, and discover events.
      297 npm
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Provides AI assistants with sports model win probabilities and fair odds across nine sports without requiring an API key.
      3
      54 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Wraps the Sports Game Odds API to provide sports game odds data through natural language queries.
      284 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Sorqen is a sports fair-value API + MCP server: it turns sportsbook odds into a versioned, no-vig consensus probability for NFL/NBA/MLB/NHL moneyline, spread, and total markets, with confidence, provenance, and freshness attached to every number instead of a black-box pick.
      MIT