Resources / Developers

MCP setup guide: Claude Code, Cursor, Windsurf

Connect your coding agent to withConflux step by step: the key, the config for each client, scopes, spend caps, test and live keys, and what to do when something does not work.

DeveloperswithConflux Team · Nov 21, 2026 · 5 min read

This guide takes you from no key to a working agent with withConflux tools, in Claude Code, Cursor or Windsurf. It also covers the settings worth a minute before you let an agent run: scopes, spend caps, and test and live keys.

What you need

  • A withConflux account. Accounts are approved by our team; request access if you don't have one yet.
  • Claude Code, Cursor, Windsurf or another MCP client that supports HTTP servers.
  • About five minutes.

Step 1: create a key

  1. In your dashboard, open Tools › Connect your agent.
  2. Give the key a name you will recognise later, for example "Claude Code, laptop".
  3. Pick test or live (see step 4). Start with test.
  4. Pick the scopes the key needs (see step 3). Leave them all ticked if you're not sure yet.
  5. Create it and copy the key. It is shown only once.

Put the key in an environment variable, not in a file in your repository:

export WITHCONFLUX_KEY=cflx_test_...

Add that line to your shell profile if you want it in every terminal.

Step 2: add the server to your client

The server URL is https://withconflux.com/mcp. It takes your key in an Authorization: Bearer header.

Claude Code

claude mcp add --transport http withconflux https://withconflux.com/mcp \
  --header "Authorization: Bearer $WITHCONFLUX_KEY"

Run claude mcp list to check it is there, then start a new session.

Cursor

Edit ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "withconflux": {
      "url": "https://withconflux.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WITHCONFLUX_KEY"
      }
    }
  }
}

Open Cursor's MCP settings and check that withconflux shows as connected.

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json. Windsurf uses serverUrl:

{
  "mcpServers": {
    "withconflux": {
      "serverUrl": "https://withconflux.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WITHCONFLUX_KEY"
      }
    }
  }
}

Any other MCP client

{
  "mcpServers": {
    "withconflux": {
      "type": "http",
      "url": "https://withconflux.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_WITHCONFLUX_KEY"
      }
    }
  }
}

Replace YOUR_WITHCONFLUX_KEY with your key in the JSON configs. If a config file lives inside a project, keep it out of version control.

i

Shortcut: paste set up withConflux - https://withconflux.com/llms.txt into your agent. It reads the same steps, asks you for the key and adds the server itself.

Step 3: choose the scopes

Scopes decide which tools a key can call, and so which tools your agent sees at all.

ScopeTools
detectdetect_image
musicmusic_check, riffhold_match (Riffhold needed on the account)
visibilityvisibility_ai_check
llmllm_chat, llm_models

A key with no scopes set can use everything. One key per job is a good habit: a key for an upload-review agent needs detect and music, not llm. You can change a key's scopes later on the same page; the change applies to the next call.

Step 4: test keys and live keys

  • Test keys start with cflx_test_ and are never billed. Calls priced up to €0.01 return the real result. Calls priced above that return sample data marked "sample": true, so you can build without spending credits.
  • Live keys start with cflx_live_. They return real results and are billed from your prepaid credits.

Switch to a live key when the flow works. Only the key changes; the config stays the same.

Step 5: set a spend cap

Set a monthly spend cap in your dashboard under the LLM gateway's limits. It covers tool calls and LLM calls together, because both use the same credits. Every paid call is priced before it runs. If it would take the month past the cap, or your balance can't cover it, it is refused and nothing is charged. Over MCP the refusal is JSON-RPC error -32002 with a message the agent can show you.

Step 6: check it works

Ask your agent "Which withConflux tools can you use?". It should list the tools your scopes allow, each with its price. Then try one call with your test key:

Use detect_image on https://example.com/photo.jpg and tell me the verdict.

Every result ends with a line like Cost: €0.0040 (1 per image) · provider Sightengine · 640 ms. Once you use a live key, calls also show in Tools › Tools & usage under Agents (MCP).

Troubleshooting

What you seeWhat to do
The server does not connect, or says unauthorizedCheck the header is exactly Authorization: Bearer cflx_..., that the variable is set in the shell that started the client, and that the key is not paused or revoked.
The agent sees no tools, or fewer than you expectCheck the key's scopes. Only tools that are switched on appear.
"This tool needs Riffhold on your account"riffhold_match checks files against your own Riffhold catalog, so the account needs Riffhold. Contact us to add it.
"This key does not have the … scope"Add that scope to the key, or use a key that has it.
Not enough credits, or spend cap reached (-32002)Top up credits or raise the cap in your dashboard. Nothing was charged for the refused call.
Results say "sample": trueYou are on a test key and the call is priced above €0.01. Use a live key for real results.
"We couldn't download that file"The URL must be public. For audio and video, the file must be under 15 MB. You were not charged.
Too many requestsCalls are rate limited per key. Wait a moment, or spread a large batch over time.

What we keep

For each call we record which key made it, the tool, the cost, the time it took, whether it worked and the IP address it came from, so it shows in your usage and we can keep the service secure. What your agent sends to a tool, such as a file URL or a domain, is passed to the provider that runs that tool, as for every withConflux check. The details are in our privacy policy.


Ready? Create a key and connect your agent. No account yet: request access. Trial credits come after approval.

Ready to try it?
One key, one bill, every content-AI vendor.
Read the docsCreate a key and connect
We use a single analytics cookie to understand traffic to this site. Nothing loads until you choose. See our Privacy Policy.