Skip to main content
Glama
Mavline

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

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

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mavline/odds-devig-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server