MCPAI client integration

MCP (Model Context Protocol) connects external data sources to AI clients. Connect PremAnalytics and you can ask Claude or Cursor questions like “who leads the league for tackles won?” and get answers grounded in our Premier League data.

If you want to fetch data from your own code, use the Web API instead. MCP is the entry point for AI clients.

What you can read

  • league_tableLeague table (position, points, goal difference)
  • player_statsPer-player stats: goals, assists, shooting, defending, minutes — sortable into rankings
  • squad_statsClub-level aggregates for team-vs-team comparison
  • fixturesResults and fixtures, filterable by matchweek
  • match_detailA single match: score, xG, team stats, goals and cards
  • search_reportsPre-match previews (predictions) and post-match reports
  • search_newsPublished news articles
  • season_contextCurrent season, matchweeks played, data freshness

※ All tools are read-only. Pre-match previews are predictions and post-match narratives are AI-generated; the responses say so explicitly.

Plans

PlanTool callsRate
Data FanNot available
Data Supporter1,000 / month60 / min
Data UltrasUnlimited*240 / min

* “Unlimited” pauses at 20,000 calls/month as a safety check — contact us to lift it. Only actual tool calls count; the connection handshake is free. An AI typically makes 1–5 calls per question, so 1,000 calls ≈ 200–500 questions per month. Counted separately from the Web API quota.

How to connect

Server URL
https://premie-backend-lvuzwxd3aq-uc.a.run.app/mcp/

1. Sign in with your browser (claude.ai etc.)

Paste the URL above into your client’s connector screen. A sign-in and approval page appears; approve it and you are connected. No API key handling.

2. Config file (Claude Code / Cursor)

Issue an API key in Settings → Web API & MCP.

claude mcp add --transport http premanalytics https://premie-backend-lvuzwxd3aq-uc.a.run.app/mcp/ \
  --header "Authorization: Bearer pak_あなたのキー"
{
  "mcpServers": {
    "premanalytics": {
      "type": "http",
      "url": "https://premie-backend-lvuzwxd3aq-uc.a.run.app/mcp/",
      "headers": { "Authorization": "Bearer pak_あなたのキー" }
    }
  }
}

If it does not connect

  1. First check the key itself. If the following returns 200, the key is fine.
    curl -s -o /dev/null -w "%{http_code}\n" \
      -H "X-API-Key: pak_あなたのキー" \
      https://premie-backend-lvuzwxd3aq-uc.a.run.app/v1/league-table/overall
  2. Omitting the trailing slash causes one redirect. If your client dislikes redirects, include it.
  3. 401 means authentication, 403 means plan, 429 means quota. If none of these fit, please contact us.

Notes

  • All tools are read-only. An AI cannot modify our data.
  • The tool set and quotas may change as we learn how the service is used.
  • The connection stops working when you cancel or downgrade to Data Fan (it works again if you re-subscribe).
  • Data is collected and processed independently by PremAnalytics. Accuracy is not guaranteed, and analysis text includes AI-generated content.