docs

Tools

The twelve tools of the Fleeex MCP server: what each does, its arguments, its result, and the error shape.

At a glance

ToolWhat it doesKind
list_appsLists the apps you own.Read only
create_appRegisters a new app and returns its first live API key.Write
list_api_keysLists an app's API keys, never the keys themselves.Read only
create_api_keyIssues a new live or sandbox key for an app.Write
revoke_api_keyRevokes a key at once. Cannot be undone.Destructive
get_app_usageOne month of an app's usage by its end users.Read only
get_webhookReads an app's webhook subscription.Read only
set_webhookCreates or replaces an app's webhook subscription.Write
rotate_webhook_secretReplaces the webhook signing secret. The old one stops at once.Destructive
get_wallet_balanceYour wallet balance.Read only
get_wallet_usageYour month-to-date spend, last month, and a daily series.Read only
list_wallet_appsThe apps authorized to spend your wallet, with spend and cap.Read only

The kind is sent to the client as an MCP annotation (readOnlyHint, destructiveHint), so a client can, for example, ask you before it runs a destructive tool. revoke_api_key and set_webhook are also marked idempotent: running them twice with the same arguments leaves the same state.

Amounts are in EUR micro-units: 1 EUR = 1,000,000. Ids are the ones the other tools return: appId from list_apps or create_app, keyId from list_api_keys.

Apps and API keys

list_apps

No arguments. Returns the apps you own, each with appId, name, and createdAt.

create_app

ArgumentTypeRequiredRules
namestringyes1 to 100 characters. A human-readable app name.
redirectUrisstring[]noUp to 10 absolute http(s) URLs Fleeex may send your users back to after onboarding (exact match).

Returns appId, name, keyId, and apiKey: the app's first live key, shown once. For a test key, call create_api_key with mode: "sandbox" next.

list_api_keys

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.

Returns each key's keyId, mode (live or sandbox), status (active or revoked), createdAt, and revokedAt once revoked. Never the key itself.

create_api_key

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.
mode"live" | "sandbox"no"live" by default.

Existing keys stay valid until you revoke them, so you can rotate without downtime. A live key spends real wallet money on real models. A sandbox key (flx_test_…) calls no model and spends a fake balance: see Sandbox. Returns appId, keyId, apiKey (shown once), and mode.

revoke_api_key

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.
keyIdstringyesThe key id from list_api_keys, not the key.

Every call made with the key is refused from then on. Returns { "revoked": true, "appId": "…", "keyId": "…" }.

get_app_usage

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.
periodstringnoA month, "yyyy-mm". The current UTC month by default.

Returns the app's totals for the month, its active users, a daily series, and its top users by spend.

Webhook

See Webhooks for the events and how to verify a delivery.

get_webhook

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.

Returns endpointUrl, events, lowBalanceThresholdMicros when set, status (enabled or disabled), secretFingerprint, and timestamps. Never the signing secret. An app with no subscription answers NOT_FOUND.

set_webhook

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.
endpointUrlstringyesA public https URL, up to 2,048 characters. Fleeex POSTs events to it.
eventsstring[]yesAt least one of balance.low, topup.completed, connection.created.
lowBalanceThresholdMicrosintegerno1 to 1,000,000,000. Required with balance.low, refused without it.

The arguments are the complete desired state: a field you leave out is cleared. Returns the subscription as get_webhook does, plus signingSecret only when this call created it. Store it right away.

rotate_webhook_secret

ArgumentTypeRequiredRules
appIdstringyesAn app id you own.

Returns appId, the new signingSecret (shown once), secretFingerprint, and secretCreatedAt. The previous secret stops verifying at once, so update your receiver.

Wallet (read only)

None of these tools takes an argument. Funding, caps, and disconnecting an app happen in the Fleeex dashboard.

get_wallet_balance

Your wallet balance, in EUR micro-units.

get_wallet_usage

Your month-to-date AI spend across every app billed to your wallet, the previous month, and a daily series.

list_wallet_apps

The apps authorized to spend your wallet, each with its month-to-date spend and its cap. These are the apps connected to your wallet, not the apps you own: for those, use list_apps.

Results

A successful call returns one text content holding the result as indented JSON:

{
  "revoked": true,
  "appId": "3f6c…",
  "keyId": "9a21…"
}

Errors

A failed call is an MCP tool result with isError: true and one text content holding:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "…",
    "status": 404
  }
}
codeWhen
VALIDATION_FAILEDAn argument broke a rule. message lists the failed constraints.
NOT_FOUNDThe app (or its webhook subscription) doesn't exist.
FORBIDDENThe app exists but isn't yours.
BAD_REQUEST, CONFLICT, …Any other refusal, named after its HTTP status.
A specific code (ACTIVE_KEY_LIMIT_REACHED, APP_SUSPENDED, ACCOUNT_UNAVAILABLE, …)The same refusal the dashboard would get for that action.
UNAUTHORIZEDThe call reached the tool without an identity. Reconnect the client.
INTERNAL_ERRORSomething failed on the Fleeex side. The error also carries a correlationId: quote it to support.

Before any of that, the server checks the arguments against the tool's declared schema, the one the client sees. A call that doesn't match it (a missing appId, a mode that isn't live or sandbox) comes back as an error result with the schema message, and nothing runs. Unknown arguments are dropped.

A webhook endpointUrl pointing at a non-public address is refused with BAD_REQUEST.