MLB stats · web + terminal + AI

The whole ballgame, in your browser and your terminal.

Diamond turns the public MLB Stats API into a fast web app and a beautiful terminal app — both backed by DiamondGPT, an assistant that pulls live data to answer questions in plain English. No API key required for stats.

Free · open source · not affiliated with MLB

diamondapp.xavidop.me
Diamond web app — today's MLB scoreboard dashboard

What's inside

Every box score, standing, and stat — one tap away.

The same data set, shaped for two places you actually work: a rich web app and a fast terminal UI.

Live

Scoreboard

Today's games with auto-refresh, linescores, boxscores, and probable pitchers.

Game

Game detail

Linescore, play-by-play with win probability, head-to-head series, recent form, and every highlight clip.

Video

Highlights

Condensed game, written recap, and every highlight clip — right on the game page.

Statcast

Statcast & sabermetrics

Percentile sliders, expected stats (xBA/xSLG/xwOBA), WAR & wRC+, exit velo, barrel%, and hot/cold zone heat maps.

Profiles

Player profiles

Career & year-by-year stats, splits, fielding, ZiPS projections, honors, and a percentile-ranked Statcast breakdown.

Clubs

Team hub

Record, division rank & streak up top — then game log, leaders, depth chart, roster, farm system, coaching, and news.

Head to head

Compare

Line up to four players or two teams side by side — rate & counting-stat charts plus a full career table.

Pipeline

Minors & prospects

Browse AAA→Rookie, a club’s full farm system, and a player’s climb from Rookie ball to the majors.

Races

Standings

Division and wild-card standings by league — MLB down through the minors — for any season.

Stats

Leaders

League and per-team hitting & pitching leaders for any season and category.

AI

DiamondGPT

Ask in plain English — the assistant calls 18 live MLB tools to answer with real data.

Raw

API Explorer

Call every MLB Stats API endpoint from a dynamic UI with a raw JSON viewer.


The web app

A full front office in the browser.

Built with React, Tailwind, and Recharts for a fast, responsive experience — from the live scoreboard to deep player profiles with year-by-year trend charts.

  • Scoreboard, standings, teams, and player profiles
  • Statcast: percentile sliders, expected stats, WAR/wRC+, hot/cold zones
  • Game detail with play-by-play, highlights, condensed game & recap
  • Minors & prospects — farm system, and a player’s climb to the majors
  • Stat leaders, streaks, comparisons, and an API Explorer
Open the web app →
Diamond web app — division standings

Go deeper

Every team, player, and game — down to the last detail.

Beyond the scoreboard, Diamond drills all the way in: club hubs, percentile-ranked Statcast, walk-off game pages, and side-by-side comparisons.


DiamondGPT ✨

Ask baseball anything.

DiamondGPT answers in plain English by calling 18 live MLB tools — schedules, standings, leaders, player and team stats, splits, game logs, awards, the draft, win probability, and more. Real numbers, not guesses.

  • 18 live data tools wired to the MLB Stats API
  • In the web app and the terminal alike
  • Bring your own key, or use the server's
  • Switch providers mid-conversation
Google GeminiAnthropic ClaudeOpenAI
DiamondGPT answering a question about MLB home run leaders with live data

The terminal app

Same stats, no browser. Just diamond.

A Go CLI built with Bubble Tea. Run diamond for the interactive TUI, or jump straight to a view with a subcommand. Includes DiamondGPT and an MCP server.

Homebrew
brew install xavidop/tap/diamond
diamond
Docker
docker run --rm -it ghcr.io/xavidop/diamond:latest
# or a specific view:
docker run --rm -it ghcr.io/xavidop/diamond scores
Go install
go install github.com/xavidop/diamond/cli@latest
From source
cd cli && go build -o diamond .
./diamond

Live alerts

Box-score alerts, in the background.

Press n on any game in the scoreboard and Diamond watches it for you — native desktop notifications when a run scores or the game goes final, even while you're in another view or another app.

  • Desktop notifications on every run and the final
  • Polls live scores every 30 seconds in the background
  • Toggle per game with n — fires from any view
Run Scored
Blue Jays 3, Yankees 2
Diamond
Game Over
Final: Dodgers 5, Padres 4
Diamond

Model Context Protocol

Plug MLB into any AI client.

diamond mcp runs a Model Context Protocol server over stdio, exposing the same 18 live MLB tools DiamondGPT uses. Point Claude Desktop, your IDE, or any MCP client at it and your assistant can pull real baseball data — scores, standings, stats, and more.

  • The same 18 live MLB tools as DiamondGPT
  • stdio transport — works with Claude Desktop, Cursor, and friends
  • One command, no extra setup
Start the server
diamond mcp
Client config
{
  "mcpServers": {
    "diamond": {
      "command": "diamond",
      "args": ["mcp"]
    }
  }
}