MCP Server

DuelAPI MCP Server

Give Claude, ChatGPT and any MCP client live access to crash, castle roulette, casino bets, players and sportsbook odds — through a single read-only Streamable HTTP endpoint.

Endpoint: https://api.duelapi.com/mcp

Overview

The server exposes 39 read-only tools generated from the same catalogue as the REST API. Each tool call is forwarded to the corresponding REST route with your API key, so credits, rate limits and key logs behave exactly as they do for a direct API request. No write or delete operations are available.

Authentication: a DuelAPI read key, sent as X-API-Key, Authorization: Bearer, or ?apiKey= on the server URL. Get a free key at the pricing page.

Install in your app

Enter your read key once, then choose a client. The button copies the right URL or config and opens that client's settings page. Your key stays in this browser — it is never sent to DuelAPI by this page.

Privacy note: ChatGPT custom plugins cannot send custom headers. For ChatGPT the button copies a URL containing your key (?apiKey=...) — treat that URL like a password and do not share it. Every other client uses the header form.

Configuration

{
  "mcpServers": {
    "duelapi": {
      "type": "http",
      "url": "https://api.duelapi.com/mcp",
      "headers": { "X-API-Key": "cr_your_read_key_here" }
    }
  }
}

CLI equivalent: claude mcp add --transport http duelapi https://api.duelapi.com/mcp --header "X-API-Key: cr_your_read_key_here"

Tip: call duelapi_help first, and account to see your remaining credits. sport_odds costs 5 credits per event, so pass a small limit.

Getting started

DuelAPI Help duelapi_help

Free

Start here: explains how to use these tools, lists the expensive calls to avoid, and links to the full reference. Costs no credits.

Local helper — no HTTP request.

ParameterType / rulesDescription
No parameters.

Health health

Free (IP rate limited, 60/min)

API status and live uptime/counter summary. Free (no credits), but rate limited to 60 requests/minute per IP.

GET /health

ParameterType / rulesDescription
No parameters.

Account account

Free

The authenticated key's plan, credit balance, refill date and rate limit. Costs no credits.

GET /account

ParameterType / rulesDescription
No parameters.

All Time Totals all_time_totals

Free

All-time round totals by game (crash, roulette, castle and others), used by the homepage counter. Free.

GET /api/all-time-totals

ParameterType / rulesDescription
No parameters.

Crash

Crash Recent crash_recent

1 credit per 100 rows

Most recent crash rounds with multiplier, timestamp and state. Page through with limit/page instead of requesting the full history.

GET /crash/recent

ParameterType / rulesDescription
limitnumber · required · default: 10 · min 1, max 10000
pagenumber · required · default: 0 · min 0

Crash Last crash_last

1 credit

The most recent crash round.

GET /crash/last

ParameterType / rulesDescription
No parameters.

Crash Stats crash_stats

5 credits

Aggregate crash statistics: count, average/min/max multiplier and multiplier distribution. Costs 5 credits.

GET /crash/stats

ParameterType / rulesDescription
No parameters.

Crash Round crash_round

2 credits

One crash round with its bust multiplier, every bet placed on it, and round totals. Bets are kept for about a day. Costs 2 credits.

GET /crash/rounds/:round

ParameterType / rulesDescription
roundstring · required · min 1Crash round number.

Crash Bets crash_bets

1 credit per 100 rows

Latest crash bets, newest first. Each bet includes extra.round.

GET /crash/bets

ParameterType / rulesDescription
limitnumber · required · default: 50 · min 1, max 1000
pagenumber · required · default: 0 · min 0

Castle roulette

Roulette Recent roulette_recent

1 credit per 100 rows

Most recent castle roulette spins with winning coin, multiplier and provably-fair data.

GET /roulette/recent

ParameterType / rulesDescription
limitnumber · required · default: 10 · min 1, max 10000
pagenumber · required · default: 0 · min 0

Roulette Last roulette_last

1 credit

The most recent castle roulette spin.

GET /roulette/last

ParameterType / rulesDescription
No parameters.

Roulette Stats roulette_stats

5 credits

Coin hit counts and observed vs expected rates over the last N rounds. Costs 5 credits.

GET /roulette/stats

ParameterType / rulesDescription
roundsnumber · required · default: 1000 · min 10, max 100000

Roulette Round roulette_round

2 credits

One castle roulette round: winning coin, rolls, seed, all bets and amount wagered per coin. Costs 2 credits.

GET /roulette/rounds/:round

ParameterType / rulesDescription
roundstring · required · min 1Roulette round number.

Roulette Bets roulette_bets

1 credit per 100 rows

Latest castle roulette bets, newest first. Each bet includes extra.coin and extra.round.

GET /roulette/bets

ParameterType / rulesDescription
limitnumber · required · default: 50 · min 1, max 1000
pagenumber · required · default: 0 · min 0

Bets, players & chat

Bets Recent bets_recent

1 credit per 100 rows

Latest casino bets across all games, newest first.

GET /bets/recent

ParameterType / rulesDescription
limitnumber · required · default: 50 · min 1, max 1000
pagenumber · required · default: 0 · min 0
gamestring · optional · min 1
playerstring · optional · min 1
min_usdnumber · optional · min 0
feedenum: highrollers · optional
sourceenum: upstream · optional
fromstring · optional · min 1

Bets Stats bets_stats

5 credits

Totals for a recent time window: bet count, unique players, wagered, paid out, house profit, RTP, biggest win and per-game breakdown. Costs 5 credits.

GET /bets/stats

ParameterType / rulesDescription
minutesnumber · required · default: 60 · min 1, max 1440
gamestring · optional · min 1

Bets Games bets_games

1 credit

Every game on the bet feed with stored bet count, last-hour count and latest bet time, busiest first.

GET /bets/games

ParameterType / rulesDescription
No parameters.

Players players

1 credit per 100 rows

Duel.com public high-score leaderboard (~63k players) with lifetime wagered, profit, deposits and withdrawals.

GET /players

ParameterType / rulesDescription
sortenum: profit | wagered · required · default: "profit"
orderenum: desc | asc · required · default: "desc"
limitnumber · required · default: 50 · min 1, max 200
offsetnumber · required · default: 0 · min 0

Player player

1 credit

One player's lifetime stats, last 50 bets and a summary of those bets.

GET /players/:username

ParameterType / rulesDescription
usernamestring · required · min 1Duel username.

Chat Recent chat_recent

1 credit per 100 rows

Duel.com public chat messages, newest first. Messages are passed through unedited.

GET /chat/recent

ParameterType / rulesDescription
limitnumber · required · default: 50 · min 1, max 1000
pagenumber · required · default: 0 · min 0
roomstring · optional · min 1
userstring · optional · min 1

Rps Recent rps_recent

1 credit per 100 rows

Recent rock-paper-scissors rounds with match details. winner_id is null for a draw.

GET /rps/recent

ParameterType / rulesDescription
limitnumber · required · default: 50 · min 1, max 1000
pagenumber · required · default: 0 · min 0

Analytics Overview analytics_overview

5 credits

Dashboard summary: crash distribution, castle coin frequencies, last hour of betting, chat activity and feed health. Costs 5 credits.

GET /analytics/overview

ParameterType / rulesDescription
roundsnumber · required · default: 1000 · min 10, max 100000

Data Status data_status

1 credit

Health of the data feed: source reachability, last arrival time and stored counts.

GET /data/status

ParameterType / rulesDescription
No parameters.

Sports odds

Sports sports

2 credits

Every sport currently offered, with event and live-event counts. Costs 2 credits.

GET /v4/sports

ParameterType / rulesDescription
No parameters.

Sport Events sport_events

5 credits

Events for a sport, without odds. Live events first, then upcoming by kickoff. Costs 5 credits.

GET /v4/sports/:sport/events

ParameterType / rulesDescription
sportstring · required · min 1Sport key, e.g. soccer. Get keys from the sports tool.
liveenum: 0 | 1 · optional

Sport Odds sport_odds

5 credits PER EVENT (default 25 events = 125 credits)

Events with full market books (every market, outcome and price). IMPORTANT: costs 5 credits per event, charged on limit — the default 25 events costs 125 credits. Use a small limit.

GET /v4/sports/:sport/odds

ParameterType / rulesDescription
sportstring · required · min 1Sport key, e.g. soccer.
liveenum: 0 | 1 · optional
limitnumber · required · default: 25 · min 1, max 100
offsetnumber · required · default: 0 · min 0

Sport Scores sport_scores

5 credits

Live events for a sport with current status and score. Costs 5 credits.

GET /v4/sports/:sport/scores

ParameterType / rulesDescription
sportstring · required · min 1Sport key, e.g. tennis.

Event event

10 credits

One event's full market book. Costs 10 credits.

GET /v4/events/:eventId

ParameterType / rulesDescription
eventIdstring · required · min 1Event id.

Event History event_history

25 credits

Every recorded price change for one event, oldest first. Kept for 3 days. Costs 25 credits.

GET /v4/events/:eventId/history

ParameterType / rulesDescription
eventIdstring · required · min 1Event id.
limitnumber · required · default: 500 · min 1, max 1000
fromstring · optional · min 1
tostring · optional · min 1
afterstring · optional · min 1

PvP Arena

Arena Games arena_games

1 credit, paid plan required

All 12 Duel Arena games with metadata. Requires a paid plan or purchased top-up credits. Costs 1 credit.

GET /api/arena/games

ParameterType / rulesDescription
No parameters.

Arena Resolve arena_resolve

1 credit, paid plan required

Parse a Duel Arena join link or six-character code into session and game metadata. Provide url OR code (plus optional slug). Requires a paid plan.

GET /api/arena/resolve

ParameterType / rulesDescription
urlstring · optional · min 1
codestring · optional · min 1
slugstring · optional · min 1

Arena Lobbies arena_lobbies

1 credit per 100 rows, paid plan required

Live arena lobbies. A waiting lobby can be full — check player_count < max_players. Requires a paid plan.

GET /api/arena/lobbies

ParameterType / rulesDescription
gamestring · optional · min 1
statusenum: live | all | waiting | active | completed | expired | cancelled · optional
sortenum: recent | high | low · optional
limitnumber · required · default: 100 · min 1, max 500

Arena Session arena_session

1 credit, paid plan required

One arena session by six-character code. Requires a paid plan.

GET /api/arena/session

ParameterType / rulesDescription
codestring · required · min 1Six-character session code.

Arena Game arena_game

1 credit, paid plan required

Metadata for one arena game. Requires a paid plan.

GET /api/arena/game

ParameterType / rulesDescription
slugstring · required · min 1Game slug, e.g. 8ball.

Arena History arena_history

1 credit per 100 rows, paid plan required

Tracked arena lobby history. Requires a paid plan.

GET /api/arena/history

ParameterType / rulesDescription
gamestring · optional · min 1
playerstring · optional · min 1
statusenum: live | all | waiting | active | completed | expired | cancelled · optional
limitnumber · required · default: 100 · min 1, max 500
offsetnumber · required · default: 0 · min 0

Arena Players arena_players

1 credit per 100 rows, paid plan required

Tracked arena player statistics. Requires a paid plan.

GET /api/arena/players

ParameterType / rulesDescription
sortenum: games | wins | winrate | wagered · optional
qstring · optional · min 1
limitnumber · required · default: 100 · min 1, max 500
offsetnumber · required · default: 0 · min 0
min_gamesnumber · optional · min 0

Arena Player arena_player

1 credit, paid plan required

One arena player's stats, per-game totals, last 40 games and best-effort cross-game data. Requires a paid plan.

GET /api/arena/player

ParameterType / rulesDescription
namestring · required · min 1Duel username.

Arena Stats arena_stats

1 credit, paid plan required

Tracked/scored lobby totals, players seen and tracking start time. Requires a paid plan.

GET /api/arena/stats

ParameterType / rulesDescription
No parameters.

Arena Watched arena_watched

1 credit, paid plan required

Upstream tracked lobbies (shared feed, not account-specific). Requires a paid plan.

GET /api/arena/watched

ParameterType / rulesDescription
No parameters.

Frequently asked questions

How do I authenticate?

Send your DuelAPI read key on every MCP request as X-API-Key (or Authorization: Bearer). Clients that cannot set custom headers can append ?apiKey=your_key to the server URL.

Does the MCP server cost extra?

No. Tool calls run against the same REST endpoints and charge the same credits. Use the account tool to check your balance.

Is it read-only?

Yes. Every tool is marked readOnlyHint and maps to a GET endpoint. No write or delete operations are exposed.

Which clients are supported?

Any client that speaks Streamable HTTP: Claude, ChatGPT, Claude Code, Cursor, VS Code, OpenAI Codex and the MCP Inspector.

Why did ChatGPT ask me to choose an authentication mode?

ChatGPT custom plugins support OAuth or no authentication, not custom headers. Choose no authentication and paste the URL with your key in the query string. Treat that URL as a secret.