# FPLai Assistant connection guide

FPLai has two separate MCP services. Choose the service that matches the task:

## Public content MCP

`https://fplai.app/mcp` is an anonymous, read-only service for discovering
FPLai's public content. It has no account access and no write actions. Its
tools cover the site overview, public content sections, public path search, and
public pages as Markdown. See the [public MCP server
card](https://fplai.app/.well-known/mcp/server-card.json).

## Personal FPLai Assistant MCP

`https://mcp.fplai.app/mcp` is the separate account-linked service for a
person's FPLai data. A personal OAuth connection needs an existing FPLai
account. A linked FPL team is required for a fresh analysis; account and
saved-analysis reads remain account scoped, and the account tool can report
that no team is linked. Setup is:

1. A human creates an account at `https://fplai.app/register`, or signs into
   an existing account at `https://fplai.app/login`.
2. If the human wants a fresh analysis, the human links an FPL team in FPLai.
3. To try the personal connection, the human adds
   `https://mcp.fplai.app/mcp` in an assistant client with support for both
   MCP and OAuth, then follows its browser-based connection flow.
4. The client opens FPLai's browser consent flow. The human signs in to FPLai
   there and approves the requested access.

FPLai manages downstream client registration; clients cannot self-register
automatically. Setup differs by client. If a client asks for registration
details or does not reach the consent screen, contact
[FPLai support](https://fplai.app/support). Do not enter an FPL password,
manager ID, access token, or credential screenshot into an assistant.

### Connect from ChatGPT

FPLai is listed in ChatGPT's plugin directory as **FPLai Assistant** at
`https://chatgpt.com/plugins/plugin_asdk_app_6ac2568170ec8191994a6f025edf2e7b`.
Open the listing (or go to **Plugins** in ChatGPT and search for `FPLai`),
select **Install plugin**, then complete the FPLai sign-in; the consent page
shows **ChatGPT**.

### Connect from Claude

**Claude** (claude.ai, Claude Desktop and the Claude mobile apps): FPLai is
listed in Claude's connector directory at `https://claude.ai/directory/fplai`.
Open the listing (or **Customize > Connectors > Browse** and search for
`FPLai`), select **Connect**, then complete the FPLai sign-in; the consent page
shows **Claude (claude.ai)**. Alternatively, open **Customize > Connectors**,
choose **Add custom connector**, and enter the name `FPLai` and the URL
`https://mcp.fplai.app/mcp`. Leave the OAuth client ID and secret empty, select
**Connect**, and complete the same sign-in.

**Claude Code**: run
`claude mcp add --transport http fplai https://mcp.fplai.app/mcp`, then run
`/mcp` in a session and choose FPLai to sign in. The consent page shows
**Claude Code** with a `localhost` address, because Claude Code receives the
sign-in on your own computer.

**Codex**: run `codex mcp add fplai --url https://mcp.fplai.app/mcp`, then run
`codex mcp login fplai` to sign in. The consent page shows **Codex** with a
`localhost` address, because Codex receives the sign-in on your own computer.
Codex in the ChatGPT desktop app can use FPLai too, with the same consent page.

### Connect from Muse

In Meta's **Muse**, open **Settings > Connectors** and add a custom connector
with the name `FPLai` and the URL `https://mcp.fplai.app/mcp`. When Muse asks
for OAuth credentials, set the client ID to `fplai-muse` and leave the client
secret empty. Complete the FPLai sign-in; the consent page shows
**Muse (agent.meta.ai)**.

### Connect from Grok

**Grok Bot** can connect to the personal service as a custom remote MCP
server. Add a server with a name and the URL `https://mcp.fplai.app/mcp`, and
set its OAuth client ID to `https://cursor.com/oauth/mcp-client.json` (no
client secret). Then complete the FPLai browser sign-in and permission review
described above; the consent page shows **Cursor**, because Grok Bot runs on
Cursor. A Marketplace listing for FPLai is not available yet.

**Grok Chat** (grok.com): on grok.com in a desktop browser, open Connectors,
choose **New Connector** then **Custom**, and enter the name `FPLai` and the URL
`https://mcp.fplai.app/mcp`. When asked for OAuth credentials, set the client ID
to `https://grok.com/oauth/mcp-client.json` and leave the client secret empty.
Complete the FPLai sign-in; the consent page shows **Grok (grok.com)**. In a
chat, select the **Expert** model and turn FPLai on in the connectors menu;
Auto and Fast modes do not use custom connectors. The Grok iOS app cannot add
this connector, so add it on grok.com.

Connecting does not link an FPL team or run any tool. After connecting, ask
for example "Review my FPL squad". Once you invoke a tool, its result is sent
to the assistant provider and handled under that provider's privacy terms.

### Personal tool surface

The personal service exposes ten account-scoped tools:

- `get_fplai_account` — check the signed-in account and whether an FPL team is
  linked.
- `get_latest_fplai_analysis` — read the latest saved analysis for the signed-in
  account.
- `get_fplai_analysis` — read one saved analysis identified by the human.
- `compare_fplai_players` — compare current data for the requested FPL
  players.
- `run_fplai_analysis` — run a fresh analysis only after the human explicitly
  asks. It consumes analysis quota and attempts to save a result; the response
  reports `persistenceStatus`.
- `find_fpl_team` — find the person's public FPL team from the team ID, the
  official team link or the team name they give. Links nothing.
- `link_fpl_team` — link one team to the signed-in account. Call it once
  without `confirm` to preview, ask the person whether that team is theirs, and
  call it again with `confirm: true` only after they say yes. Clients without
  MCP form elicitation get `status: "link_on_website"` and a fplai.app link
  where the person confirms the team instead.
- `get_fplai_squad_status` — the linked squad for the next gameweek:
  injury, suspension and availability flags with FPL news, blank gameweeks,
  likely price rises and falls, and next fixtures; Elite Pulse (what the top
  1,000 managers captain, buy and sell) when the plan includes it.
- `get_fplai_player` — one player's profile by `playerId` or `playerName`:
  price, ownership, availability, form, points, minutes, goals and assists
  against xG and xA, set pieces, the last 5 gameweeks' points, and the next
  fixtures with difficulty, double and blank gameweeks.
- `get_fplai_fixtures` — fixture difficulty for the next 1 to 8 gameweeks:
  a ticker of all 20 clubs, or one club with its table position, results,
  goals, flagged players and top FPL assets.

`get_fplai_squad_status`, `get_fplai_player` and `get_fplai_fixtures` are
read-only, use no analysis quota, and return `structuredContent` that hosts
supporting MCP Apps (ChatGPT, Claude) render as interactive cards; other clients
read the same data as text.

The read tools (`get_fplai_account`, `get_latest_fplai_analysis`,
`get_fplai_analysis`, `compare_fplai_players`, `get_fplai_squad_status`,
`get_fplai_player`, `get_fplai_fixtures`, and `find_fpl_team`) require the
`fplai:read` scope. `run_fplai_analysis` and `link_fpl_team` require
`fplai:analyze`; a run also needs an explicit request, and a link the person's
explicit yes. `get_fplai_account` returns `teamId: null` when no FPL team is linked;
account and saved-analysis reads remain available for that account. A fresh
analysis without a linked team returns `TEAM_NOT_LINKED`. When analysis quota
is unavailable, it returns `QUOTA_DENIED`.

Tool errors are marked `isError: true` and carry a JSON text value with an
`error` object containing `code` and `message`. The gateway's current messages
for these two conditions are:

```json
{"error":{"code":"TEAM_NOT_LINKED","message":"No FPL team is linked to this account"}}
{"error":{"code":"QUOTA_DENIED","message":"Analysis quota is unavailable for this account."}}
```

The service returns the context, freshness, assumptions, and uncertainty that
it has for an account or analysis. A fresh analysis is an explicit action, not
an automatic step before a read. If its outcome is uncertain, check the latest
saved analysis before an authorized retry. Reusing the same UUID
`analysisRequestId` avoids another quota charge, but the operation is not fully
idempotent and may save another result. FPLai does not sign in to the official
FPL site or execute official FPL transfers.

### Example requests and recovery

- **“Show me my latest FPLai analysis.”** After browser consent, call
  `get_latest_fplai_analysis`. A missing team link does not block reading saved
  results. If there is no saved analysis, explain that; do not run a new one
  automatically.
- **“Compare two players for my next transfer.”** Call
  `compare_fplai_players` for the requested players. This read does not require
  a linked team and does not submit a transfer.
- **“Run a fresh analysis of my team.”** Check `get_fplai_account` for a linked
  team and explain that a fresh run uses analysis quota. Run only for an
  explicit request with `fplai:analyze` permission. Account information does
  not guarantee quota is available; handle the run's quota response.

For sign-in or an expired connection, use the client's browser OAuth flow.
If the person needs an account, hand off to [FPLai registration](https://fplai.app/register)
and resume connection setup afterward. Keep account creation and passwords in
the browser. If the client reports `INSUFFICIENT_SCOPE`, ask the person to
approve the required permission through OAuth before retrying the requested
tool. Do not escalate a read request to analysis permission.

For `TEAM_NOT_LINKED`, offer to link their team: ask for their FPL team name
or ID, call `find_fpl_team`, and link the team they confirm with
`link_fpl_team`. Linking does not run an analysis. For `QUOTA_DENIED`, stop the run and direct them
to their FPLai account to review their plan and analysis allowance. Saved
analysis reads can still be used with read permission. Do not repeat the run
or buy a subscription automatically. For a timeout or uncertain
run result, inspect the latest saved analysis and its context before asking
whether to retry with the same `analysisRequestId`.

## Try the personal connection

The personal service is account-linked, separate from the public content MCP.
Add `https://mcp.fplai.app/mcp` in your assistant client's remote MCP settings
and complete the browser consent flow. Client setup varies. If setup requires
client details or you get stuck before consent, [contact FPLai
support](https://fplai.app/support).

For the public surface, see the [FPLai Agent
Guide](https://fplai.app/.well-known/service-docs/agent-guide.md),
[auth.md](https://fplai.app/auth.md), and
[llms.txt](https://fplai.app/llms.txt). Those documents describe anonymous
content discovery and do not grant access to a personal FPLai account.
