Connect Windsurf to FineProxy MCP
Add the FineProxy MCP server to Windsurf's Cascade agent with serverUrl and an Authorization header read from an environment variable.
This page shows how to connect Cascade, the agent in Windsurf, to the FineProxy MCP server. Cascade connects directly over Streamable HTTP and sends your API key in the Authorization header.
Requirements
- Windsurf with MCP enabled for Cascade. On Teams and Enterprise plans, an admin may need to turn MCP on.
- A FineProxy API key (starts with
fb_). Create one in Settings → API keys. Start with read-only scopes.
Set up
-
In Cascade, open the MCP menu and choose Open MCP config file. This opens the file Cascade actually reads:
OS Path macOS / Linux ~/.config/devin/mcp_config.json(or$XDG_CONFIG_HOME/devin/mcp_config.jsonwhenXDG_CONFIG_HOMEis set)Windows %AppData%\devin\mcp_config.jsonNote: The editor’s own MCP discovery uses a different file,
~/.codeium/windsurf/mcp_config.json. Always edit the file that Open MCP config file opens. -
Add the
fineproxyentry undermcpServers:{ "mcpServers": { "fineproxy": { "serverUrl": "https://fineproxy.org/account_new/api/v1/mcp", "headers": { "Authorization": "Bearer ${env:FINEPROXY_API_KEY}" } } } }Remote servers need
serverUrl(urlis also accepted). PreferserverUrl: a Cursor-style entry with onlyurlmay not connect in some Windsurf builds. -
Save the file and press the refresh button in Cascade’s MCP panel.
You can also add servers from Settings → Tools → Windsurf Settings → Add Server.
Keep your key out of the config
Cascade expands ${env:NAME} in serverUrl, url and headers (as well as command, args and env). Set the variable before you start Windsurf:
export FINEPROXY_API_KEY="fb_your_api_key"
If you start Windsurf from the Dock, Start menu or a launcher, it may not see variables from your shell profile — start it from a terminal where the variable is set, or set the variable system-wide.
Warning: Never copy an
mcp_config.jsonwith a literalfb_...key into a repository or a synced dotfiles folder. Keep only the${env:FINEPROXY_API_KEY}reference.
Verify the connection
-
In Cascade’s MCP panel, press refresh:
fineproxyshould be active and list its tools. -
Ask Cascade:
What is my FineProxy balance?Cascade calls the
wallet_balancetool and answers with your balance, for example"balance_cents": 5000— money values are integer cents, so that is $50.00.
Tips
- Approve tool calls. Review each FineProxy tool call before Cascade runs it, especially order, renewal and cancellation tools, and don’t auto-run money-moving tools.
- Use a read-only key first. For exploring, a key with
customer:read,wallet:read,services:readandcatalog:readis enough. Withoutwallet:spend, the agent can’t run tools that debit your wallet. - Add
wallet:spendonly for purchases. Create a separate key withwallet:spendwhen you want Cascade to buy or renew. Purchase tools carry a price guard and an idempotency key: a wrong total is rejected without a charge, and a retry with the same key never charges twice. - Read MCP safety and the scopes reference before you give an agent spending rights.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Your changes have no effect | You edited ~/.codeium/windsurf/mcp_config.json instead of the Cascade file. Use Open MCP config file and edit that file. |
The server doesn’t connect with a url field | Rename the key to serverUrl. |
| The server doesn’t appear after saving | Press the refresh button in the MCP panel. |
401 | FINEPROXY_API_KEY isn’t visible to Windsurf, or the key is wrong. |
| Cascade offers an OAuth sign-in | The Authorization header is missing. FineProxy MCP accepts API keys only. |
429 Too Many Requests | Too many reconnects in a short time. Wait a moment and refresh once. |
For server-side errors and tool failures, see MCP troubleshooting.