The Flex MCP supports two authentication modes. Pick the one that matches your client; both scope access to your partner account and tag every request with the calling identity for audit purposes.Documentation Index
Fetch the complete documentation index at: https://docs.withflex.com/llms.txt
Use this file to discover all available pages before exploring further.
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:| Prefix | What it does |
|---|---|
fsk_test_… | All calls hit test data. Safe for experimentation. |
fsk_… | All calls hit live data. Real refunds, real customers. |
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
| If your client… | Use this endpoint |
|---|---|
| …can open a browser for sign-in (Claude.ai, Claude Desktop, Cursor, Windsurf, VS Code) | https://mcp.withflex.com/api/mcp/oauth |
| …is headless or you prefer scoped keys (Claude Code, scripts, CI) | https://mcp.withflex.com/api/mcp |