---
title: "MCP errors, limits and sandbox"
description: "What a failed MCP tool call looks like on Flowie's servers, rate limits for the App and Exchange API servers, testing on the sandbox, and fixes for the problems people hit when connecting an AI client."
canonical: "https://docs.get-flowie.com/mcp/errors"
source: "https://docs.get-flowie.com/mcp/errors.html"
---

# MCP errors, limits and sandbox

MCP

# Errors, limits & sandbox

An MCP call fails in one of two places: before any tool runs (the connection or the token), or inside a tool (the API refused the request). They look different, and the fix is different.

For
    Anyone running an agent on Flowie

Updated
    1 Dec 2026

## Errors

### Before a tool runs

A missing, expired or wrong token is answered with HTTP `401` and a JSON-RPC error. Your client usually reacts by opening the sign-in page again.
[code] 
    {
      "jsonrpc": "2.0", "id": null,
      "error": {
        "code": -32001,
        "message": "Unauthorized: this endpoint requires a Bearer token.",
        "data": { "resource_metadata": "https://back.p2p-flowie.com/exchange/.well-known/oauth-protected-resource/mcp", … }
      }
    }
[/code]

### Inside a tool

When the API refuses a request, the call still succeeds at the MCP level: the tool result is marked `isError: true` and its text carries the HTTP status and the API's error body, the same one the [error reference](<../reference/errors.html>) documents.
[code] 
    Error calling update_lifecycle. Status code: 400. Response: {"type": "invalid_request",
    "code": "REASON_CODE_REQUIRED", "message": "…", "requestId": "req_…"}
[/code]

A capable agent reads the code and fixes its call: adds the missing `reasonCode`, picks a status from `allowedTransitions`, or asks you. Quote the `requestId` to support. The most common ones:

Status| Usually means| Fix  
---|---|---  
`400`| A rule of the operation was broken: an illegal lifecycle transition, a missing payment field or reason code| Read `code` and `message`; the tool description lists each case  
`403`| The document or company belongs to another organization, or the key lacks a scope| Use a token of the right organization, or a key with the scope  
`404`| Wrong id| Find it first with `list_documents` or `search_documents`  
`422`| The arguments don't match the schema| Follow the tool's `inputSchema` exactly  
`429`| Rate limit reached| Wait, then retry; see below  
`502` / `503`| A network or tax platform didn't answer| Retry later; a resend of the same document doesn't create a duplicate  
  
**Unknown tool** : the name doesn't exist on this server. Workflow, task, budget and purchase-request tools are on the App server (`/agent-hub/mcp`), not on `/exchange/mcp`.

## Rate limits

  * **Exchange API server** : one tool call is one API request, counted against the same budget as REST: 120 to 2,400 requests a minute by plan. For volume, use `batch_send`.
  * **App server** : 60 requests a minute per user, a person's pace. Over it, the answer is `429` with `Retry-After`, and names the Exchange API server as the way to go faster.



## Sandbox

Connect to `https://back.flowie.ink/exchange/mcp` with an `flw_test_…` key ([get one](<../sandbox/keys.html>)) or a staging login. Documents stay on test networks, and nothing reaches a tax administration.

  * The sandbox tools (reset, test clock, rate-limit drill) are tools of the Exchange API server like any other; see the [Sandbox group](<tools.html#tools-sandbox>).
  * REST-only test switches sent as headers, such as `X-Sandbox-Force-Error`, can't be set over MCP: the server forwards only `Authorization`. Test those over REST.
  * The [sandbox guide](<../sandbox/index.html>) lists the test identifiers.



## Troubleshooting

  * **`401` on every call.** The client hasn't finished signing in. In Claude Code run `/mcp`, pick the server, **Authenticate** ; elsewhere click **Connect** on the server.
  * **An API key is rejected on`/agent-hub/mcp`.** Expected: the App server is sign-in only. Use `/exchange/mcp` for keys.
  * **A key is rejected on one host.** `flw_live_…` keys work on `back.p2p-flowie.com`, `flw_test_…` keys on `back.flowie.ink`.
  * **"Server not found" from`claude.ai/api/…/mcp/start-auth/mcpsrv_…`.** The claude.ai connector was removed or re-added while Claude Code was running. Restart Claude Code, or add the server directly with `claude mcp add`.
  * **`406 Not Acceptable` from a hand-written client.** Send `Accept: application/json, text/event-stream` on every request.
  * **A tool you expected is missing.** Your client may cap the list (Amazon Quick keeps 100), or still shows an old list: refresh or sync the connector.
  * **The agent acts in the wrong organization.** On the App server, ask it to call `list_my_organizations` and pass `organization_id`. On the Exchange API server, connect with a key or login of that organization.
