docs

MCP server

Drive your own Fleeex account from an MCP client such as Claude Code: apps, API keys, the webhook, and a read-only view of your wallet.

Fleeex runs a remote MCP server at https://api.fleeex.dev/mcp. Connect an MCP client to it, sign in once in the Fleeex dashboard, and the client can manage your account for you: register an app, mint a sandbox key, point the webhook at your receiver, check what your wallet spent this month.

This is a different surface from @fleeex/sdk. The SDK is what your app uses to call models on behalf of its users, with an API key. The MCP server is for you, the account owner, and it acts with your dashboard identity.

What it can do

The server exposes twelve tools in four groups:

  • Apps. List the apps you own and register a new one.
  • API keys. List an app's keys, issue a new one (live or sandbox), and revoke one. See Sandbox for what a test key does.
  • Webhook. Read an app's subscription, create or replace it, and rotate its signing secret. See Webhooks for the events.
  • Wallet, read only. Your balance, your month-to-date spend, and the apps authorized to spend your wallet. Plus each owned app's usage by its end users.

Each tool runs the same check as the matching dashboard action: you only ever see and change apps you own.

What it cannot do

Some things stay in the dashboard on purpose:

  • No tool moves money. No top-up, no checkout, no account deletion.
  • No spend caps. Setting or changing an app's cap on your wallet, or disconnecting an app, is a dashboard action.
  • No admin. The MCP server never carries admin rights, whatever your account is.

Security model

You never paste a token or an API key into the client. The connection uses OAuth 2.1 with PKCE:

  1. The client registers itself with Fleeex and opens your browser.
  2. Sign-in and consent happen in the Fleeex dashboard, at https://app.fleeex.dev/connect, with your usual email code or Google sign-in. If you are already signed in to the dashboard, you only approve.
  3. Fleeex sends the authorization back to the client on your own machine. Only loopback redirect addresses (localhost, 127.0.0.1, [::1]) are accepted, so a code can't land anywhere else.
  4. The client receives two tokens and keeps them itself.
TokenLifetimeWhat it opens
Access token15 minutesThe /mcp endpoint only
Refresh tokenRotated on every use, 30 days at mostA new access token for the same client

An MCP access token is bound to /mcp. It is never accepted by the rest of the Fleeex API: it can't call a model, and it can't act on the dashboard routes. Reusing an already-rotated refresh token more than 60 seconds after its rotation revokes the whole session. If your account is disabled or deleted, the next refresh fails, so access ends within 15 minutes.

When the 30 days are up, the client sends you through the dashboard again.

Next