连接器指南阅读约 3 分钟15 个 MCP 工具7 种语言

如何通过 MCP 将 MLB Stats API 连接到 Claude

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

HC作者:HelpCode 团队更新于 3 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

MLB Stats API

MLB Stats API

Official MLB Stats API data, no API key: schedules and live games, box scores, line scores, play by play, teams, rosters, standings, players, stats, league leaders and transactions for MLB and the minor leagues. Personal, non-commercial use under MLB's terms.

个工具

15

区域

INTL

类别

体育

身份验证

Public API

在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 MLB Stats API,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

AnythingMCP 已收录在 Claude 的连接器目录中:一键添加到 Claude (在新标签页中打开),然后登录并选择 Claude 可以使用哪些 MCP 服务器。

摘要

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

试试这样问

MLB Stats API 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

MLB Stats API · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → MLB Stats API、直接安装 (无需密钥)、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

MLB Stats API + Claude

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

(无:公开数据,无需 API 密钥)

步骤 1 — 设置连接器

公开数据,无需密钥:设置不到一分钟。连接器读取 MLB Stats API,也就是 MLB.com 和 MLB 应用背后的公开数据源。不需要 MLB 账号、API 密钥或登录。

  1. 在连接器商店中选择 MLB Stats API 并安装。无需填写任何内容,也没有 Authorize with Provider 步骤。
  2. 用 mlb_list_teams 检查:它会列出 MLB 各球队的 ID、联盟、分区和主场。

仅限个人非商业用途:数据归 MLB Advanced Media 所有,每次返回都附有 MLB 的版权声明。MLB 的条款只允许个人、非商业、非批量的使用。不要基于这个连接器开发商业产品或进行批量导出:那种情况请向 MLB 或体育数据提供商获取数据授权。

网络:通过连接器代理:MLB 的服务器会以 HTTP 406 Not Acceptable 拒绝许多来自数据中心地址的请求,而同样的请求从家庭或办公网络发出却能成功。因此所有工具都通过实例的连接器代理访问。在 AnythingMCP Cloud 上,代理已经配置好,每个工作区每小时有调用上限。部署在数据中心的自托管实例需要设置 CONNECTOR_PROXY_URL;在家庭或办公网络中运行则不需要。406 表示被该网络屏蔽,而不是参数错误。

可读取的内容:某一天或某个日期范围的赛程,包括状态、比分和预计先发投手;实时比赛,包括所有得分打席和当前打席;技术统计、每局比分和逐球记录;球队、名单(26 人现役名单、40 人名单、整季名单和深度图)以及含外卡排名的排名榜;球员资料和统计(单季、生涯、逐年、逐场、分项、对特定球队);球队统计;联盟排行榜;交易、签约、伤病名单变动等球员变动;以及一个赛季的关键日期。除 MLB 外,还涵盖 3A、2A、高级 A、1A、新秀联盟和冬季联盟。

ID:比赛用 mlb_get_schedule 返回的 game_pk,球队用 mlb_list_teams 返回的 team_id(147 洋基,119 道奇),球员用 mlb_search_people 或名单中的 person_id。AI 会自行把名称转换成 ID。

只读:所有工具都只读取数据,因此无需确认,安装时也没有被关闭的工具。

如何看数据:比赛时间为 UTC,AI 会换算成你的时区;官方日期是当地的比赛日期。打击率、上垒率、OPS 和防御率等数据以 .305 这样的字符串返回。实时数据量很大,所以 AI 会先读取比赛摘要,需要细节时再查看技术统计、每局比分或逐球记录。

限制:MLB 没有公布 SLA 或调用频率限制,所以 AI 会尽量少调用,不会每隔几秒就轮询正在进行的比赛。在 Cloud 上,代理每个工作区每小时有调用上限。

该连接器不会登录 MLB 账号,不会直播比赛或视频,也不提供用于商业或批量用途的数据。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 Claude 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

推荐路径:在 claude.ai web 上工作,无需触碰任何配置文件。

  1. 在 Claude 中打开 Customize → Connectors。
  2. 点击 +,然后点击 Add custom connector。
  3. 输入名称(例如 MLB Stats API)和远程 MCP 服务器 URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,然后点击 Add。
  4. 点击 Connect,登录 AnythingMCP(OAuth)并允许访问。

下面所有工具都会出现在你的聊天中,开始输入提示。

可用工具

ToolWhat it does
mlb_get_scheduleGames for a date or a date range: game id (gamePk), start time in UTC, status, teams, score, winner, records, probable pitchers, venue and…
mlb_get_gameOne game from the live feed: status, teams, venue, weather, probable pitchers, inning by inning runs with totals, the winning, losing and…
mlb_get_boxscoreBox score of a game: team batting and pitching totals, each batter's line in batting order and each pitcher's line with pitch count…
mlb_get_linescoreLine score of a game: runs, hits and errors by inning and in total, the current inning, count and outs, and while it is live the pitcher…
mlb_get_play_by_playEvery plate appearance of a game in order: inning, top or bottom, batter, pitcher, result and description, RBI and the score after the play
mlb_list_teamsTeams of a level (MLB by default) with id, name, abbreviation, league, division, ballpark and first year of play
mlb_get_team_rosterRoster of a team with person id, name, jersey number, position and status. rosterType active is the 26-man roster; 40Man, fullSeason and…
mlb_get_standingsStandings by division: wins, losses, winning percentage, games back, wild card games back, division and wild card rank, run differential…
mlb_search_peopleFind players (and coaches or umpires) by name: id, position, number, current team, birth date, bats and throws, MLB debut
mlb_get_personProfile of one player: position, number, team, birth date and place, height, weight, bats and throws, debut and draft year
mlb_get_player_statsStatistics of a player. stats picks the kind: season, career, yearByYear, gameLog, lastXGames, statSplits (with sit_codes such as vl,vr for…
mlb_get_team_statsTeam statistics: season totals, statSplits by situation or byMonth for hitting, pitching or fielding
mlb_get_stat_leadersLeague leaders in one or more categories, such as homeRuns, battingAverage, onBasePlusSlugging, stolenBases, earnedRunAverage, strikeouts…
mlb_list_transactionsRoster moves in a date range: trades, signings, injured list placements and activations, call-ups, options and releases, with player, teams…
mlb_get_seasonKey dates of a season: spring training, regular season start and end, All-Star game, postseason start and end

示例提示

  • “道奇队本周什么时候比赛?预计先发投手是谁?”
  • “给我洋基队上一场比赛的技术统计,包括每位投手的用球数。”
  • “本赛季美国联盟本垒打和 OPS 排名第一的是谁?”
  • “给我看美联东区的排名和外卡争夺情况。”
  • “大都会队最近两周有哪些球员变动?”

FAQ

Claude Code 和 Claude Desktop 一样工作吗? 是的,两者都指向 https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。

下一步

这份指南对你有帮助吗?

你的 MLB Stats API 智能体只差一次点击。

安装连接器,粘贴密钥,向 Claude 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 MLB Stats API 连接到 ChatGPT

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

连接器

如何通过 MCP 将 MLB Stats API 连接到 Cursor

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

连接器

如何通过 MCP 将 MLB Stats API 连接到 Gemini

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

连接器

如何通过 MCP 将 MLB Stats API 连接到 Meta Muse

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

连接器

MLB Stats API 接入 MCP:在任意 AI 智能体中查看实时比赛、技术统计和球员数据

无需 API 密钥的官方 MLB Stats API 数据:MLB 和小联盟的赛程与实时比赛、技术统计、每局比分、逐球记录、球队、名单、排名、球员、统计数据、联盟排行榜和球员变动。依据 MLB 条款,仅限个人非商业用途。

连接器

如何通过 MCP 将 Avito 连接到 Claude

让你的 AI 使用你的 Avito 企业账户:列出广告并修改价格,读取浏览、联系和来电统计,检查自动上传 (autoload) 的上传记录及其错误、Feed 格式和钱包,并读取 Avito Messenger 聊天。发送消息和修改自动上传设置为可选功能,默认关闭。