Set up the Flux tools server (MCP)

Add the Flux tools server to your agent once, over MCP, and it can read pages, make images, search the web and use every other Flux ability on the same key.

Your agent reaches models through the Flux base URL. It reaches Flux abilities, such as reading a web page or making an image, through the Flux tools server: a remote MCP (Model Context Protocol) server on the same key. Add it once and your agent sees the Flux tools next to its own. Live

Server URLhttps://api.fluxrouter.ai/mcp-tools/
TransportStreamable HTTP
AuthAuthorization: Bearer <your Flux key>
Server name we useflux-tools (any name works)

Keep the trailing slash on the URL. Without it the server answers with a redirect, which some clients do not follow.

Before you start

  • A Flux key. Copy one from your keys page. The tools server takes the same sk-flux key your agent already uses for models. It does not take provider keys, and it does not take a sign-in: set the key in a header, as below.
  • A paid, cleared plan for most tools. Page reading, images, search, transcription and speech are paid abilities. On the Free plan your agent still sees them, and a call returns a clear refusal with a link to upgrade. See Plans.
  • An agent that can add a remote MCP server with a header. Most can. If yours only runs local (stdio) servers, see Tools that need a workaround.

Add the server to your agent

Pick your agent. Each tab is copied from that agent's own docs, with the date we checked it. Restart the agent after you add the server, so it loads the tool list.

Built into Murage, which decides which abilities it uses. Nothing to set up here. See murage.ai.

The curl, Python and TypeScript tabs call the server directly, which is handy for checking a key before you touch an agent's config. The server is stateless, so one tools/call needs no handshake first, and the reply arrives as a server-sent event (a data: line holding the JSON).

Anything not listed: any OpenAI-compatible tool, any Anthropic-compatible tool or a custom endpoint. Many agents use the same mcpServers JSON shape:

json
{
  "mcpServers": {
    "flux-tools": {
      "url": "https://api.fluxrouter.ai/mcp-tools/",
      "headers": { "Authorization": "Bearer sk-YOUR-FLUX-KEY" }
    }
  }
}

Check it works

Ask your agent: "Call the Flux list_capabilities tool and tell me what it returns." The answer shows your plan (tier), whether paid abilities are unlocked on this key (premium_unlocked), and each ability you can use under enabled, with an estimate of what a call costs. list_capabilities is never billed.

Then try a real task, for example: "Read https://example.com with the Flux web_fetch tool and summarise it in one line."

If the agent cannot find the tools, see Tools server problems.

The tools

The server shows each account the tools it can use. list_capabilities is always there. Each tool calls the matching Flux API route with your key, so it behaves and bills exactly like that route.

ToolWhat it doesArgumentsStatus
list_capabilitiesLists your plan and the abilities this key can use, with cost estimates.noneLive
web_fetchReads a public web page and returns clean Markdown.urlLive
web_searchSearches the web and answers with source links.queryRolling out
image_generateMakes an image from a text prompt.promptLive
transcribeTurns speech in an audio file into text.audio_url (public https) or audio_base64 with filename; optional language, promptShipping
speakTurns text into spoken audio.text; optional voice, format (mp3 or wav), speedShipping
apps_listLists the apps connected to your Flux account.noneShipping
apps_connectReturns a sign-in link to connect an app, such as Gmail or Slack.app; optional aliasShipping
apps_find_actionsFinds the app action that can do a task, with its arguments.task; optional appShipping
apps_executeRuns one app action on a connected account.action, argumentsShipping

Some things are only in the API, not in the tools:

  • Image edits. There is no edit tool. Edit with reference images from your own code; see Make and edit images.
  • Rendered page reads. web_fetch takes a url only. To render a page's JavaScript first, call the API with render; see Read a web page.

A tool that is built but not switched on for your account answers ability_disabled, and the server tells your agent not to retry it. It starts working when the ability is switched on, with no change on your side.

Tool limits that differ from the API:

  • transcribe takes audio up to 8 MB, from a public https URL or inline as base64.
  • speak takes up to 1,000 characters per call, fewer than the API, so the audio it returns does not flood your agent's context.
  • apps_execute runs exactly one action per call.

Full schemas, return values and the route behind each tool are in the tools server reference.

What it costs

The tools server adds no charge of its own. A tool call is billed exactly like the matching API call on the same key, and lands on the same bill.

ToolBilled
web_fetchpriced per call
web_searchpriced per call, plus the model tokens that write the answer
image_generatefrom $0.01 per image
transcribe$0.10 per minute heard
speakfrom $26 per 1M characters
apps_executepriced per call
list_capabilities, apps_list, apps_connect, apps_find_actionsNot billed

Each paid tool returns its cost with the result. For how charges reach your bill, see How billing works.

When a tool says no

The server never answers with a raw error. A refused call comes back as a normal tool result with an error code, a plain-English message your agent can act on, and a retryable flag.

errorWhat it meansWhat to do
premium_lockedThe ability needs a paid, cleared plan. The result includes upgrade_url.Upgrade in Billing. After a refusal the tool drops out of your agent's tool list, so the agent stops trying it.
payment_requiredYour balance or allowance has run out, or the route asked for a paid plan.Add credit, or raise a spend cap. See Spend caps.
ability_disabledThe ability is not switched on for your account yet.Do not retry. It works once it is switched on.
auth_failedThe key on the server entry is missing, mistyped, revoked or expired.Paste the key again in the server's header.
forbiddenThis key is not allowed to use the ability.Check the key's model allowlist on your keys page.
rate_limitedToo many calls in a short time. Retryable; may include retry_after_seconds.Wait, then retry.
capability_unavailableA temporary fault. Retryable. Carries a reason instead of a message.Retry shortly.
invalid_request, too_largeThe input was refused, for example a private URL or a file over the limit.Fix the input; the same call will fail again.

Each fix is on Tools server problems. For HTTP errors across the whole API, see Errors.

The routing server

Flux runs a second MCP server at https://api.fluxrouter.ai/mcp. It does not add abilities. It lets an MCP client work with routing directly:

  • flux_route sends a prompt through Flux.
  • flux_explain shows which model answered a routed prompt and what it cost.
  • flux_models lists the models.

Connect it with the same key in the Authorization header:

json
{
  "mcpServers": {
    "flux-router": {
      "url": "https://api.fluxrouter.ai/mcp",
      "headers": { "Authorization": "Bearer sk-YOUR-FLUX-KEY" }
    }
  }
}

Most agents do not need it: they already reach every model through the base URL. Add the tools server first. The routing server's details are in the tools server reference.