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
- In your dashboard, open Tools › Connect your agent.
- Give the key a name you will recognise later, for example "Claude Code, laptop".
- Pick test or live (see step 4). Start with test.
- Pick the scopes the key needs (see step 3). Leave them all ticked if you're not sure yet.
- 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.
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.
| Scope | Tools |
|---|---|
| detect | detect_image |
| music | music_check, riffhold_match (Riffhold needed on the account) |
| visibility | visibility_ai_check |
| llm | llm_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 see | What to do |
|---|---|
| The server does not connect, or says unauthorized | Check 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 expect | Check 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": true | You 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 requests | Calls 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.