Build a sports betting AI agent

Drop ParlayAPI into Claude Desktop, Cursor, or Claude Code in 30 seconds with our MCP server, or wire any other LLM to the REST API through the OpenAPI spec. Through MCP your agent gets 22 typed tools: live odds, player props, best line, consensus, bet verdicts, parlay grading, best-bets discovery, arbitrage, +EV and middles. CLV grading and SGP pricing are available over REST at /v1/clv and /v1/sgp/price.

Get a free API key Read the recipes

Three ways to plug in (pick one)

Cursor MCP

Drop parlayapi-mcp into Cursor's settings. All 22 tools become callable from inside your editor.

pip install parlayapi-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 22 tools, available in every Claude Desktop conversation once configured.

{
  "mcpServers": {
    "parlay-api": {
      "command": "parlayapi-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_... \
  -- parlayapi-mcp
Claude Code setup →

What the agent can do once connected

The MCP server exposes 22 curated endpoints as typed tools, chosen so the whole set fits comfortably in a model's context. 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 and MIT-licensed, published at pypi.org/project/parlayapi-mcp.

Get a free API key →