@racehooks/mcp is a Model Context Protocol server that gives AI assistants (Claude, Cursor, Windsurf) direct access to your RaceHooks account.Ask Claude to create webhooks, analyse a race, check delivery health, or set up a fantasy scoring integration without leaving your chat window. The data tools cover Formula 1.
The MCP server runs as a local stdio process. It never binds a network port, and your credentials are sent only to the RaceHooks API to obtain an access token. It exposes 59 tools, 7 live resources, and 6 guided prompts to any MCP-compatible client. Every call uses your account's credentials, so what a tool returns depends on your plan. Token refresh is handled automatically.
Installation
bash
npm install -g @racehooks/mcp
Or run directly without installing:
bash
npx -y @racehooks/mcp
The server needs RACEHOOKS_CLIENT_ID and RACEHOOKS_CLIENT_SECRET in its environment and exits on start-up without them.RACEHOOKS_BASE_URL is optional and defaults to https://api.racehooks.io.
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the Windows equivalent:
Add --scope project to share it with your team through a project .mcp.json, or --scope user to use it in every project. To commit .mcp.json without secrets, reference environment variables:
Windsurf uses the same JSON in ~/.codeium/windsurf/mcp_config.json.
✦
Your RACEHOOKS_CLIENT_ID and RACEHOOKS_CLIENT_SECRET are on the API Keys page.
Example prompts
>Check my RaceHooks account health
>Create a events.race webhook for https://myapp.com/hook, filtering for Ferrari only
>Compare VER and NOR tyre degradation in the last race
>Show me which feeds are using the most delivery quota today
>Set up a fantasy scoring webhook for my VER, NOR, LEC team at https://scoring.myapp.com/hook
>List all my webhooks and tell me which ones are paused
Tools
All tool inputs are validated with Zod schemas that Claude uses to generate high-quality arguments. The plan line is what the API enforces for that tool.
ℹ
Simulation tools are being updated. The session-replay tools in the current release (start_simulation and related) are not working right now; replay sessions from the console until the updated tools ship.
Live
get_live_sessionCurrent session state: flag, lap, running order, intervals, tyres, and race control messages. Empty when nothing is live.All plans. Free gets the latest milestone classification instead of live timing.
list_events(year, upcoming, limit)Race weekends with session schedules and status.All plans
Post-race insights
list_insight_races(season)Races with a completed post-race analytics bundle.All plans
get_race_insights(raceId)Per-driver, per-lap model outputs (pit, safety car, overtake, undercut, tyre health, cliff risk, LTOE, win probability, expected points) plus pit stops, stints, and lap times.All plans. Free gets tyre state only; strategic predictions need Developer or higher.
get_model_metaPublic model manifest: what each model predicts, model family, calibration tier, and last trained date.All plans
get_session_analytics(sessionId)Per-lap analytics snapshot for a session.Developer or higher
get_race_summary(raceId)Post-race analytics status and aggregate telemetry metrics.All plans. Aggregates need Developer or higher.
Races
get_race(raceId)Race details with results and qualifying grid.All plans. Timing fields need Developer or higher.
get_race_qualifying(raceId)Qualifying results.All plans. Q1/Q2/Q3 times need Developer or higher.
get_race_pitstops(raceId)Pit stop records (driver, stop, lap, duration).All plans
get_race_tyres(raceId)Tyre stints (compound, lap range, tyre age).All plans
rotate_webhook_secret(webhookId)Rotate the signing secret. The old secret stops working immediately.All plans
get_subscriptionTier, plan limits, and usage snapshot.All plans
get_billing_planCurrent plan, limits, usage this period, and billing period dates.All plans
get_usageDeliveries and failures this period, and remaining monthly bucket.All plans
get_usage_by_feedDeliveries broken down by feed this period.All plans
get_usage_latencyDelivery latency percentiles by feed.All plans
get_usage_hourlyHourly deliveries for the last 24 hours.All plans
get_usage_historyDelivery history across past periods.All plans
Resources
Resources are read-only named contexts the assistant loads into its context window without you having to ask. They stay fresh because they are fetched live on each request.
racehooks://feedsRaceHooks feed catalog with tier requirements, loaded into context automatically.
racehooks://liveCurrent live session: flag status, lap counter, full driver standings with tyre compounds.
racehooks://webhooksAll active webhook subscriptions including filter configurations.
racehooks://usageCurrent delivery usage: total this month, failure count, monthly limit, remaining capacity.
racehooks://driversCurrent-season driver roster with car numbers and three-letter codes.
racehooks://circuitsCircuits with location and country.
racehooks://seasonsAvailable seasons with race counts.
Guided prompts
Prompts are workflows that work like slash commands in supporting clients (Claude Desktop, Claude Code). They accept parameters and generate a complete conversational setup sequence.
setup_race_event_webhookGuided workflow: create a events.race webhook with optional driver, constructor, or position filters. Claude collects your endpoint URL and preferences, then creates and tests the webhook.
setup_fantasy_scoring_webhookGuided workflow: create a webhook for a fantasy scoring engine. Accepts your driver list (TLAs) and registers a events.race webhook filtered to those drivers.
check_account_healthFull account health summary: calls get_subscription, get_usage_by_feed, list_webhooks, and get_live_session in parallel, then summarises tier, delivery budget, webhook status, and live session state.
analyze_race_strategyPit strategy, tyre management, and model predictions for one race, optionally focused on one driver. Uses get_race_insights, get_race_laps, get_race_pitstops, and get_race_tyres (lap times need Developer or higher).
compare_driversTwo drivers head-to-head across a race: pace delta, tyre degradation, strategy, and model outputs.
explain_ml_predictionsWhat the models predicted versus what happened in the most recent race with analytics, including each model's calibration tier.
Security
ℹ
The MCP server runs as a local stdio process. It never binds a network port. Your credentials are passed via environment variables and are never included in tool call arguments or resource URIs. All diagnostic output goes to stderr to avoid corrupting the JSON-RPC channel.