Skip to Content
f1owdocs

Authentication

How to authenticate to the f1ow MCP server and API — OAuth 2.1 for Claude and ChatGPT, API keys for code and editors, and x402 pay-per-call for autonomous agents.

Every tool is reachable four ways. Pick the one that fits your client:

MethodBest forAccount
OAuth 2.1Claude, ChatGPT, MCP clients with a sign-in flowyes
API keyCursor, VS Code, your own code, botsyes
Key in pathClients that cannot send headersyes
x402Autonomous agents with a walletno

OAuth and API keys draw on the same account, subscription and call balance.

OAuth

f1ow is an OAuth 2.1 authorization server for the MCP endpoint https://mcp.f1ow.com/mcp. A client that supports MCP authorization needs only that URL. It will:

  1. receive a 401 with protected-resource metadata (RFC 9728) pointing at https://www.f1ow.com,
  2. read the authorization-server metadata (RFC 8414) and register itself (dynamic client registration, RFC 7591),
  3. send you through sign-in and consent (authorization code with PKCE S256),
  4. receive a short-lived access token and a rotating refresh token.

You sign in with any method the site supports. Every token maps to the same account. Revoke a client at any time under Connected apps in the dashboard.

MetadataURL
Protected resourcehttps://mcp.f1ow.com/.well-known/oauth-protected-resource
Authorization serverhttps://www.f1ow.com/.well-known/oauth-authorization-server
JWKShttps://www.f1ow.com/.well-known/jwks.json

API keys

Create keys in the dashboard. A key is shown once; only a hash is stored. Send it as a bearer token:

Authorization: Bearer <your-key>

The same header works on the MCP endpoint https://mcp.f1ow.com/, the REST API and the WebSocket handshake. An OAuth access token works in its place on all three.

Use one key per client or bot, so each has its own usage history and you can revoke one without touching the others.

Key in path

Some clients can only take a URL. Put the key in the path instead:

https://mcp.f1ow.com/key/<your-key>          MCP
https://mcp.f1ow.com/key/<your-key>/v1       REST
wss://mcp.f1ow.com/key/<your-key>/v1/ws      WebSocket

The URL is now a credential. Don't paste it anywhere you wouldn't paste the key.

x402

x402 lets an agent pay per call over HTTP, with no account, key or subscription. f1ow accepts USDC on Base.

The payment exchange depends on the transport:

  • REST: call a priced resource under https://mcp.f1ow.com/x402/v1. The server answers HTTP 402 Payment Required with a base64 PAYMENT-REQUIRED header describing the price, asset and pay-to address. Sign the payment and retry with a PAYMENT-SIGNATURE header. A successful paid response includes a base64 PAYMENT-RESPONSE receipt header.
  • MCP: call a priced tool at https://mcp.f1ow.com/x402. The server answers HTTP 200 with a JSON-RPC tool result whose isError is true; the payment challenge is in structuredContent and JSON text in content. Sign the payment and retry the tool call with the payment object in params._meta["x402/payment"]. A successful paid result carries its receipt in result._meta["x402/payment-response"]. The MCP endpoint also supports the same payment headers as REST.

The server runs the tool before settling and does not settle a failed tool call. Use an x402 client that supports your chosen transport to automate the exchange. Prices per call:

ToolPrice per call
UTC Anchorutc_time · free
Fear & Greedsentiment_fear_greed · $0.005
Trendingmarket_trending · $0.005
Candlesmarket_candles · $0.01
Coin Detailsmarket_coin_details · $0.01
Crypto Calendarcatalysts_calendar · $0.01
ETF Flowscatalysts_etf_flows · $0.01
Exchange Listingscatalysts_exchange_listings · $0.01
Fundingfunding_current · $0.01
Implied Volatilityoptions_volatility · $0.01
Macro Calendarcatalysts_economic_calendar · $0.01
Market Overviewmarket_overview · $0.01
On-Chain Metricsonchain_metrics · $0.01
Open Interestderivatives_open_interest · $0.01
Options Chainoptions_chain · $0.01
Options-Implied Oddsoptions_probability · $0.01
Order Bookflow_orderbook · $0.01
Perp Flowderivatives_flow · $0.01
Prediction Oddsevents_prediction_odds · $0.01
Regulatory Filingsfilings_search · $0.01
Social Sentimentsentiment_social · $0.01
Spot & Perp Quotesmarket_quotes · $0.01
Top Moversmarket_top_movers · $0.01
Coin Universemarket_coins · $0.01
Bulk Historymarket_history · $0.02
Liquidation Historyderivatives_liquidations · $0.02
Options Positioningoptions_positioning · $0.02
Technicalsta_technicals · $0.02
Whale Contextflow_whale_context · $0.02
Whale Positionsflow_whale_positions · $0.02
Gamma & Hedge Scenariosoptions_gamma · $0.03
Perp Price Levelsflow_levels · $0.03
Market Regimeresearch_regime · $0.05
Newsnews_search · $0.05
Opportunity Scanresearch_opportunities · $0.05
Positioningresearch_positioning · $0.05
Trade Plan Reviewresearch_trade_plan · $0.05
Token Dossierresearch_token_view · $0.07
Tweet Searchsentiment_twitter · $0.10

WebSocket is not available over x402. For sustained use, a subscription is far cheaper per call. See pricing & limits.

Errors

StatusMeaning
401No credential, or an unknown one. MCP clients start OAuth from here.
402REST: x402 payment required, or the metered account's period or call balance is used up. A metered denial links to the dashboard.
403The credential was rejected.

REST errors are RFC 9457 problem details. MCP payment challenges and metered-usage denials are HTTP 200 tool results with isError: true, not HTTP 402 responses.

For agents: this page as Markdown · all docs

On this page