Build a sports betting AI agent

Drop ParlayAPI into Claude Desktop, Cursor, Claude Code, or any LLM in 30 seconds. Your agent gets live sportsbook odds, +EV scanning, arbitrage detection, CLV grading, and SGP correlation pricing as first-class tools.

Get a free API key Read the recipes

Three ways to plug in (pick one)

Cursor MCP

Drop parlay-api-mcp into Cursor's settings. Every endpoint becomes a tool the agent can call from inside your editor.

pip install parlay-api-mcp

5 minutes from pip install to "list +EV plays on tonight's MLB slate."

Cursor setup guide →

Claude Desktop MCP

Connect to Claude Desktop via claude_desktop_config.json. Same MCP server, same tools, accessible in any chat.

{
  "mcpServers": {
    "parlay-api": {
      "command": "parlay-api-mcp",
      "env": {"PARLAY_API_KEY": "pak_live_..."}
    }
  }
}
Claude Desktop setup →

Claude Code CLI

One-line install via the Claude Code CLI. Works global or scoped to a single project.

claude mcp add parlay-api \
  --env PARLAY_API_KEY=pak_live_... \
  -- parlay-api-mcp
Claude Code setup →

What the agent can do once connected

The MCP server exposes every public ParlayAPI endpoint as a tool. The agent's reasoning loop chains them automatically. Some prompts to try right away:

PromptTools chained
"What are the top 5 +EV plays on tonight's MLB slate?"find_ev
"Are there any cross-book arbitrages on the NBA right now?"arbitrage_scan
"Find totals middles open on NFL today, sort by window width"middles_scan
"Score my bet Yankees -145 placed at 14:30 UTC against the current Pinnacle close"clv_grade
"Price a same-game parlay: Yankees ML + Over 8.5 + Aaron Judge HR"sgp_price
"Source-quality check: which books are showing degraded SLA right now?"source_quality
"For each MLB game tonight, find the +EV play and write me a Python script that places it across two books"find_ev + odds (multi-tool chain)

Don't use Claude? Use any LLM

If your stack is GPT-4, Gemini, Llama, or an OpenAI-compatible local model, you can still get the same agent shape. Two paths:

1. OpenAPI tool definitions

ParlayAPI ships a full OpenAPI 3.1 spec at /openapi.json. Most function-calling frameworks (OpenAI tools, Anthropic tools, Gemini function-calling, LangChain, LlamaIndex) can ingest OpenAPI specs directly and expose each endpoint as a callable tool to your model.

# OpenAI Python SDK example
from openai import OpenAI
import requests, json

tools = []  # auto-generate from /openapi.json or define manually
# ... your standard function-calling loop calls our endpoints ...

2. Direct REST calls

For more control, give your model the curl cookbook as context and let it construct calls directly. Works for any model that can generate JSON or curl commands.

Reference recipes (working scripts)

Daily +EV digest

Cron job that pulls top +EV plays across MLB / NBA / NFL each morning and emails a digest. ~40 LOC.

View recipe →

Arb alerter

Polls the full arb endpoint, posts to Slack when a new ML arb opens with edge ≥ 1%. ~25 LOC.

View recipe →

Automatic CLV grading

Overnight batch-grade yesterday's bets against today's morning closing lines. Idempotent. ~30 LOC.

View recipe →

SGP value finder

Combine prop legs into 2-leg SGPs, price them, flag combinations that price softer than the independent product. ~50 LOC.

View recipe →

Line-movement detector

Detect when Pinnacle moneylines move more than 5 cents from the prior snapshot. Useful for "steam move" alerts. ~25 LOC.

View recipe →

Source-quality monitor

Page on-call when any of your critical books goes "breach" or "stale". Cron every 5 minutes. No auth required. ~15 LOC.

View recipe →

Why this works well for LLM agents

Structured everywhere. Every endpoint returns predictable JSON shapes documented in the OpenAPI spec. Every error has a code, message, and request_id the agent can surface back to the user. Every list response has consistent pagination. LLMs do dramatically better on APIs that are predictable than on APIs that are clever.

What to read next

Pricing

Free tier: 1,000 requests/month, no credit card. Paid starts at $5/mo (Starter) for 20k requests, $20/mo (Pro) for 100k. Full breakdown at /pricing. The MCP server itself is free + open-source on GitHub.

Get a free API key →