# Live Underdog data in Claude Code.

> Connect Claude Code to Underdog player props with MCP. Environment-based API keys, working configuration, first tool calls and credit-aware troubleshooting. Underdog API (https://underdogapi.com) is an independent Underdog Fantasy pick'em data API: Higher/Lower lines with separate payout multipliers per side, line history, changes and graded results as JSON, CSV, MCP and streams.

Canonical page: https://underdogapi.com/use-with-claude

## Free offer

**Free API key, no card: 100 credits a month** on the live board, every league, separate Higher/Lower prices, and the last 24 hours of line history. Sign up: https://underdogapi.com/sign-up?ref=ai-claudebot

## Quickstart

1. Get a free key at https://underdogapi.com/sign-up?ref=ai-claudebot (no card), or let your agent request one: `POST https://underdogapi.com/api/v1/agent/signup` with `data_wanted` and `use_case`, then show your user the returned approval_url.
2. Export it: `export UNDERDOG_API_KEY=ud_...`
3. First call with curl:

```bash
curl --fail-with-body 'https://underdogapi.com/api/v1/projections?league=NBA&view=compact&limit=5' \
  -H "Authorization: Bearer $UNDERDOG_API_KEY" \
  -H 'X-User-Request: NBA dashboard integration check'
```

4. Same call in Python:

```python
import os, requests

r = requests.get(
    "https://underdogapi.com/api/v1/projections",
    params={"league": "NBA", "view": "compact", "limit": 5},
    headers={"Authorization": f"Bearer {os.environ['UNDERDOG_API_KEY']}"},
)
r.raise_for_status()
for line in r.json()["data"]:
    print(line["player"]["name"], line["market"]["stat"], line["line"])
```

## Use it from Claude (MCP)

Claude Code, one command:

```bash
claude mcp add --transport http underdog https://underdogapi.com/api/mcp --header "Authorization: Bearer $UNDERDOG_API_KEY"
```

Or add this server to your Claude MCP configuration (the key stays in the environment):

```json
{
  "mcpServers": {
    "underdog": {
      "type": "http",
      "url": "https://underdogapi.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${UNDERDOG_API_KEY}"
      }
    }
  }
}
```

Guide: https://underdogapi.com/use-with-claude

## Pricing

| Plan | Price | Credits / month | Notes |
| --- | --- | --- | --- |
| Free | $0 | 100 | No card. Live feed 5 minutes behind; last 24 hours of line history |
| Developer | $49/month | 10,000 | For models that need full training pages and loaded game-log seasons. Live feed, no added plan delay |
| Production | $149/month | 50,000 | For apps with real users and push delivery. Everything in Developer, signed webhooks for every change |
| Scale | $499/month | 250,000 | For apps whose traffic has outgrown Production. Everything in Production, 15 live-feed connections at once |

Full pricing: https://underdogapi.com/pricing

## On this page

Claude Code integration



Connect Claude Code to player props, labeled discounted and boosted tiers, recorded line movements and results through MCP. Use source timestamps to ground answers and keep credentials in your environment.

Short answer: Add the underdog server to your project's .mcp.json with type http, url https://underdogapi.com/api/mcp and an Authorization header of Bearer ${UNDERDOG_API_KEY}, then check it with /mcp in Claude Code.

## Connect the MCP server

1. [Create an account](https://underdogapi.com/sign-up) and get a key from [API keys](https://underdogapi.com/dashboard/keys). Set `UNDERDOG_API_KEY` in the environment used to launch Claude Code.
2. Merge the configuration below into your project's `.mcp.json`. Keep any existing server entries. The placeholder reads the environment variable; do not replace it with a committed secret.
3. Start Claude Code in the project, review the server approval prompt, then run `/mcp` to inspect the connection and available tools.

.mcp.json · Claude Code

```
{
  "mcpServers": {
    "underdog": {
      "type": "http",
      "url": "https://underdogapi.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${UNDERDOG_API_KEY}"
      }
    }
  }
}
```

The endpoint is `https://underdogapi.com/api/mcp`, using Streamable HTTP and Bearer authentication. This setup is for Claude Code; web-chat connector support is a separate client capability.

## Verify a small live read

First task to give Claude Code

```
Use the Underdog MCP tools for my NBA dashboard integration. Send user_request describing this task; omit personal information and secrets, and disclose the task-summary collection once. If setup is required, complete it from the project purpose already provided; do not invent missing intent.
Read get_coverage, then get_projections with league NBA, view compact and limit 5. Report the actual rows, observed_at and source status. If the board is empty or delayed, say so. Never substitute demo rows for live data. Do not recommend picks or claim predicted profits.
```

Check that the response describes real returned rows and their `observed_at` values. An empty result can reflect the current board or source health; it should not produce invented lines. Public [service status](https://underdogapi.com/status) and [coverage documentation](https://underdogapi.com/docs#coverage) help interpret the result.

## Choose the right tool

| Task | Tool | Verify |
| --- | --- | --- |
| Current player props | `get_projections` | League, market, tier and observation time |
| Recorded line movement | `get_line_history` | Actual retained dates for the projection |
| Model-training rows | `get_training_set` | Graded coverage and chronological split |
| Sportsbook comparison | `compare_lines` | Matching selection, period, line and timestamps |

History starts with the first retained observation; no earlier line archive is promised. Older game logs are a different dataset. Inspect the [history sample and coverage calendar](https://underdogapi.com/data/history-sample) before choosing a backtest window. Inspect each Higher/Lower price and unavailable side separately.

## Check authentication, context and cost

If the server cannot authenticate, confirm that the launching process has the key and the key is active. MCP data tools ask for `user_request`, a short task summary; REST calls use `X-User-Request`. Both are optional and never block a call. Summaries are retained for 35 days; exclude secrets and personal information and disclose the collection once.

Use the [credit calculator](https://underdogapi.com/credits) to budget reads. Full payloads, comparison calls and historical work have different costs. See [current plans](https://underdogapi.com/pricing) and the usage unit returned by your account.

Verify REST independently of MCP

```
curl --fail-with-body 'https://underdogapi.com/api/v1/projections?league=NBA&view=compact&limit=5' \
  -H "Authorization: Bearer $UNDERDOG_API_KEY" \
  -H 'X-User-Request: NBA dashboard integration check'
```

## Questions

Can Claude Code read live Underdog props?

Yes. Connect the UnderdogAPI MCP endpoint with a Bearer API key, then use get_coverage and get_projections. Results include observation timestamps and source health. UnderdogAPI is an independent service, not an official Underdog API.

Can I try the tools without an API key?

Public search, fetch and fictional demo data are available without a key. Authenticated live data tools require an account and key. Demo rows are labeled and must not be treated as live lines.

Does this configuration also apply to the Claude website?

This guide is for Claude Code. Connection and authentication capabilities vary between Claude clients. For a web chat, share a public player page or paste a board exported from your workspace; never paste your API key into the conversation.

How much does the data cost?

New accounts start with 100 free credits per month. Developer is $49 per month with 10,000 credits; Production is $149 with 50,000; Scale is $499 with 250,000. Calls have different credit costs. Existing accounts may retain their previous request contract.

[Runnable example **Build a comparison dashboard**](https://underdogapi.com/docs/league-workflows) [Integration **Use Gemini CLI**](https://underdogapi.com/use-with-gemini) [Reference **API endpoints and schemas**](https://underdogapi.com/docs) [Get started **Create your free account**](https://underdogapi.com/sign-up)

## References

- [Anthropic: MCP configuration and environment variables in Claude Code](https://code.claude.com/docs/en/mcp)
- [UnderdogAPI: machine-readable API contract](https://underdogapi.com/openapi.json)

## FAQ

### Is there a free Underdog API?

Yes. The Free plan is a real API key on the live board, not a sample: 100 credits a month, every league, separate Higher/Lower prices and the last 24 hours of line history. No card is needed.

### Is this the official Underdog Fantasy API?

No. Underdog API is an independent data service. It is not affiliated with, endorsed by or sponsored by Underdog Fantasy or Underdog Sports.

### What data does it return?

Underdog Higher/Lower lines with separate payout multipliers and availability for each side, stable market ids through line moves, alternate rungs, recorded line history, changes, graded results and coverage/status endpoints.

### How do I use it from Claude or another AI agent?

Connect the MCP server at https://underdogapi.com/api/mcp with a bearer key, or call the REST API. Agents can request a key for their user with POST /api/v1/agent/signup.

### How much does it cost after the free tier?

Developer is $49/month for 10,000 credits, Production $149/month for 50,000, Scale $499/month for 250,000. Errors and unchanged 304 responses cost zero credits.

### How fresh is the data?

Each row carries its observation time. Check /api/v1/status and /api/v1/coverage before relying on a sport or window; missing collection is reported as unavailable, never filled in.

### Does it place entries or give picks?

No. It is data only: no entries, account operations, guaranteed outcomes or betting advice.

---
Independent data service, not affiliated with Underdog Fantasy or Underdog Sports. Docs: https://underdogapi.com/docs · OpenAPI: https://underdogapi.com/openapi.json · llms.txt: https://underdogapi.com/llms.txt
