Skip to main content
Glama
Odds De-vig MCP Server

Odds De-vig MCP Server

by Mavline

Odds De-vig MCP 服务器

用于从 The Odds API 获取体育赔率并去除博彩公司水钱(vig)的 MCP 服务器。

✅ 最新改进(v1.1.0)

  • API 使用跟踪:所有响应现在都包含剩余 API 调用次数

  • 重试逻辑:连接问题时自动重试(3 次尝试)

  • 更好的错误处理:改进的网络错误处理

  • 响应格式:带有 summary 和 apiUsage 的结构化响应

Related MCP server: betbetter-mcp

功能

工具(Tools)

  1. get_sports - 获取支持的体育项目列表(无需 API 请求)

  2. get_today_mlb - 获取今日 MLB 比赛及处理后的赔率(节省请求)

  3. get_upcoming_odds - 获取原始赔率(默认:今日 MLB 比赛)

  4. get_processed_odds - 获取去除水钱后的处理赔率

  5. get_event_consensus - 获取特定事件的共识盘口

  6. get_api_usage - 获取 API 使用统计(消耗 1 次 API 请求)

资源(Resources)

  • odds://sports - 支持的体育项目列表(无需 API 请求)

  • odds://today-mlb - 今日 MLB 比赛及处理后的赔率

  • odds://processed - 去除水钱后的处理赔率(默认:今日 MLB)

去除水钱的方法

1. Proportional(比例法)- 默认

最简单且常用的方法:

fair_probability = implied_probability / total_implied_probability

2. Power(幂法/Shin)

更复杂的方法,考虑结果数量:

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

3. Additive(加法法)

将水钱均匀分配到所有结果中:

fair_probability = implied_probability - (total_vig / number_of_outcomes)

安装与运行

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

# Сборка
npm run build

# Запуск
npm start

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

配置

设置环境变量 ODDS_API_KEY 或使用默认密钥:

export ODDS_API_KEY=your_api_key_here

⚠️ API 限制

重要: The Odds API 免费计划每月限制 500 次请求!

节省请求的优化措施:

  • 默认仅请求今日 MLB 比赛

  • get_sports 返回硬编码列表,无需 API 请求

  • get_today_mlb 是获取数据最节省的方式

  • 所有请求都会记录 API 使用情况

建议:

  • 使用 get_today_mlb 进行测试

  • 测试时每天限制 20 次请求

  • 通过 get_api_usage 监控使用情况

使用方法

获取体育项目列表(无需 API 请求)

{
  "tool": "get_sports"
}

获取今日 MLB 比赛(节省请求)

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

获取处理后的赔率

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

获取共识盘口

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

数据结构

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 限制

关键: 每月 500 次请求限制!

当前优化:

  • 专注于 MLB(每天都有比赛)

  • 仅请求今日比赛

  • 硬编码体育项目列表

  • 记录每次请求

监控:

{
  "tool": "get_api_usage"
}

返回:

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

后续计划

  1. Polymarket CLOB API 服务器 - 用于从 Polymarket 获取数据

  2. 比较服务器 - 用于比较盘口并寻找套利机会

  3. 新闻/SERP 服务器 - 用于获取新闻和上下文

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
    ResponsivenessNo recent community issues

    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.
      83 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.
      74 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      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