OAuth
The OAuth path is what most graphical clients use — Claude.ai, Claude Desktop, Cursor, Windsurf, VS Code. The user clicks a button, signs in to Flex through a browser, and approves the connection.- Endpoint:
https://mcp.withflex.com/api/mcp/oauth - Sign-in identity: Your Flex Dashboard user (the same one you sign in to dashboard.withflex.com with).
- Scope: Same access as that user has in the Flex Dashboard, across the partner they belong to.
- Tokens: Short-lived; clients refresh transparently. No secrets to copy or paste.
API key
The API key path is for headless agents — Claude Code, CI jobs, scripts — where popping a browser is awkward. You generate a key once in the Flex Dashboard and paste it into your client’s MCP config as anAuthorization: Bearer header.
- Endpoint:
https://mcp.withflex.com/api/mcp - Header:
Authorization: Bearer fsk_…(live) orAuthorization: Bearer fsk_test_…(test) - Generate keys: dashboard.withflex.com/apikeys
- Scope: Whatever scopes you assigned the key (e.g.
payment_intents:read,refunds:write). A key with no scopes has full partner access.
Test mode
Flex separates test data from live data. The two MCP paths handle this differently — important to understand before you connect a production account.API key path
The key prefix encodes the mode:
The mode is fixed for the lifetime of the key — there’s no per-call override. To switch, install a different key. This is atomic and hard to get wrong, which is why we recommend it for Claude Code.
OAuth path
OAuth tokens don’t encode test vs. live, because the same Flex user has access to both. Instead, every tool the MCP exposes takes anapi_test_mode parameter:
- Read tools — Defaults to
false(live data) if you don’t specify. Passtrueto query test data. - Write tools — The MCP requires you (or the LLM) to set
api_test_modeexplicitly. Mutating live data without saying so is blocked.
Use test mode (api_test_mode: true) for every Flex tool call in this conversation. Don’t touch live data unless I explicitly say so.
Then flip to live only once you’re comfortable.
Identifying which endpoint to use
The Flex MCP landing page generates the exact install snippet for either path.