MCP connection and examples
Server URL: https://apifleet.dev/mcp. Transport: stateless Streamable HTTP, JSON responses over POST. Every request needs the workspace Bearer key. No session ID is required. Versions 2025-03-26, 2025-06-18 and 2025-11-25 are supported; newer protocol revisions must negotiate a supported version. Browser requests must use the APIFleet origin. The server does not allow arbitrary cross-origin browser access.
Tools use the same handlers as REST, including resource ownership, input validation, assistant lifecycle events and runtime billing gates. Their readOnlyHint, destructiveHint, idempotentHint and openWorldHint annotations describe their effects. A read can still disclose private workspace data. Ask the user before changing live routing, deleting resources, managing credentials/access, placing calls or starting paid tests. Paid MCP calls/runs additionally require confirm: true; that flag is a caller acknowledgment, not a payment authorization or a replacement for user approval.
Provider secret entry, owner checkout and binary audio workflows are explicitly marked REST/dashboard-only in the operation catalog. MCP cannot bypass those controls. There is no MCP OAuth flow or verified marketplace listing at present.
Codex
In ~/.codex/config.toml:
[mcp_servers.apifleet]
url = "https://apifleet.dev/mcp"
bearer_token_env_var = "APIFLEET_API_KEY"
Set APIFLEET_API_KEY in the environment from which Codex starts. This setting sends the value as a Bearer token; it is not a provider key. Connection options: official Codex MCP documentation.
Claude Code
claude mcp add --transport http --scope user apifleet https://apifleet.dev/mcp \
--header "Authorization: Bearer $APIFLEET_API_KEY"
The shell expands the variable when this command runs; the saved client configuration contains the key. Keep that configuration private. Use /mcp to inspect the connection. Official Claude Code setup.
Cursor
In ~/.cursor/mcp.json:
{
"mcpServers": {
"apifleet": {
"url": "https://apifleet.dev/mcp",
"headers": {
"Authorization": "Bearer ${env:APIFLEET_API_KEY}"
}
}
}
}
Launch Cursor with APIFLEET_API_KEY available in its environment. A desktop app launched separately may not inherit terminal environment variables. Official Cursor MCP documentation.
ChatGPT, Claude hosted connectors and Grok Bot
Use https://apifleet.dev/mcp only if the client supports supplying an APIFleet Bearer key. If it requires OAuth, this server cannot currently complete that flow. Do not select an unauthenticated connection for private workspace data. These hosted integrations are not claimed as tested or registered APIFleet apps. ChatGPT's custom-MCP setup is documented in OpenAI's connection guide; account/workspace controls and supported authentication apply. Use one of the key-capable clients above for the documented configuration today.
Initialize and discover tools
curl https://apifleet.dev/mcp \
-H "Authorization: Bearer $APIFLEET_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"example-client","version":"1.0.0"}}}'
An MCP client sends notifications/initialized after initialization (a notification has no id; the server returns HTTP 202), then tools/list:
curl https://apifleet.dev/mcp \
-H "Authorization: Bearer $APIFLEET_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
Check prepaid access
curl https://apifleet.dev/mcp \
-H "Authorization: Bearer $APIFLEET_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"check_entitlements","arguments":{}}}'
This returns billing_model, platform_usd_per_minute, minimum_funding_usd, provider_and_carrier_costs_additional, selected policy fields, wallet and funding_url. It never starts checkout. For every operation below, the MCP example uses the same tools/call envelope and the exact listed arguments.
Tool result format
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"content": [
{
"type": "text",
"text": "[{\"id\":\"ASSISTANT_ID\",\"name\":\"Example receptionist\"}]"
}
],
"structuredContent": {
"status": 200,
"data": [
{
"id": "ASSISTANT_ID",
"name": "Example receptionist"
}
]
},
"isError": false
}
}
The result above is a shortened illustrative list response; native assistant results include additional configuration fields. A successful DELETE has data: null and status: 204. Parse structuredContent.data, or JSON.parse(content[0].text). Assistant reads/updates can include an etag in structuredContent for revision checks.
## Billing and action costs
APIFleet charges USD 0.03 per connected AI minute, billed per second, on top of AI provider and carrier usage. Minimum prepaid top-up is USD 10. No monthly subscription, free trial or free credits. Usage paid directly through customer-owned provider credentials is not charged a second time by APIFleet. Internal exempt workspaces have their own actual billing policy; consumers cannot opt into that exception.
Read get_wallet / GET /billing/wallet for balance_microusd, reserved_microusd, available_microusd, spending_blocked, funding_required, collection_enabled and runtime_enforcement_enabled. Divide micro-USD amounts by 1,000,000. check_entitlements combines selected wallet/policy fields; its output is not a guarantee that a provider, number or call is ready.
Owners fund at https://apifleet.dev/app/billing. Workspace API keys cannot open the owner-only checkout flow. The MCP tools cannot change a tariff, credit a wallet or mark an unpaid payment as paid. Calls can hold funds while they run; billing is finalized from recorded usage, and held funds are distinct from available funds. Payment records and the ledger are better evidence than a model's estimate.