floprouter-mcp gives an AI agent the floprouter API as tools: it can list models and miners, send paid chat requests to GPU miners on FLOP Network, and check generations, sessions, balance and grant state. It runs on your machine over stdio and is on npm, so every client starts it the same way:
fr_...). Create the key with your wallet on the account page, or run npx floprouter login. Without a key, the read-only tools still work.
The commands below read the key from your shell. Run export FLOPROUTER_API_KEY=fr_... first, or put the key in place of $FLOPROUTER_API_KEY.
Add it to your client
Tools
The server describes these tools to the agent and tells it that each
chat call spends FLOP, so it should not loop on it. Many clients also ask you before a tool runs.
Your key
The server reads the key fromFLOPROUTER_API_KEY. If that is not set, it reads the file npx floprouter login writes (~/.config/floprouter/config.json), so one login serves the CLI and the MCP server. With neither, the read-only tools work and account says that no key is set.
The server never sees a wallet key or seed. Creating an API key, signing a grant, depositing and withdrawing to the chain happen in your wallet on the account page, or with the CLI on your machine. A key in a client’s config file stays on your machine; do not commit it.
Who pays
Each key has a payer mode. Ingrant mode (the default) your wallet is the payer on chain, through a grant you sign once. In credit mode the router’s wallet opens the channel and takes the cost from your prepaid balance. chat can override the mode per request with payer. See payer modes and grants.
Timing
A verified reply usually takes 15 to 50 s on devnet.chat waits up to 50 s, below the 60 s at which many clients stop a tool call. If the reply is not verified by then, chat returns pending: true with a generation_id; the request carries on, and generation returns it a minute later. Settlement on chain follows 2 to 4 minutes after the reply: check it with session_status.
Local HTTP transport
The package also serves streamable HTTP, for clients that connect to a URL instead of starting a process:Authorization: Bearer fr_...; otherwise the server uses its configured key. It listens on 127.0.0.1 by default. Bind it to another address only if everyone who can reach it may use that key. There is no hosted floprouter MCP server: the server runs on your machine.
Troubleshooting
The server does not start
The server does not start
Run
node --version: the server needs 18.17 or later. A client started from the dock or Start menu may find a different node than your terminal; put the full path to npx in command (for example /usr/local/bin/npx, or the output of which npx). Run npx -y floprouter-mcp --version in a terminal: it prints 0.1.0 when the package installs and runs.An old version keeps running
An old version keeps running
npx caches packages. Run npx -y floprouter-mcp@latest --version once to fetch the newest release, or pin a version in args, for example "floprouter-mcp@0.1.0".The key is not set
The key is not set
account returns no API key configured and chat fails with 401. Check the env block in your client’s config, or run npx floprouter login. Restart the client after a change. In Gemini CLI, pass the key with -e; in Continue, put it in a .env file.402 insufficient balance or grant
402 insufficient balance or grant
insufficient_balance: your prepaid balance does not cover the escrow and fee. Deposit FLOP (npx floprouter deposit 1) or lower max_tokens. grant_required, grant_expired and similar: in grant mode your grant cannot pay. Sign one with npx floprouter grant or on the account page, or pass payer: "credit". insufficient_funds: your wallet cannot cover the escrow.503 no miner ready
503 no miner ready
no_miner_available: no ready miner serves that model right now. Call list_models with only_available: true and pick one, or give fallback_models. all_attempts_failed: every miner tried failed before any output; wait for the retry time in the message and try again. If an attempt locked escrow, it comes back to the payer when that channel closes; session_status shows it.chat returns pending
chat returns pending
The reply took longer than 50 s. Call
generation with the generation_id a minute later. Raising FLOPROUTER_TOOL_BUDGET_MS helps only if your client allows tool calls longer than 60 s.