MCP server

Let an AI assistant read your Fungies workspace through the Model Context Protocol, with a test-mode v1 key.

Fungies runs a Model Context Protocol server beside API v1. An MCP client, such as Claude or Cursor, connects to it with one of your v1 API keys and can then answer questions like "which orders failed today?" from your workspace's own data.

Every tool is read-only: none creates, changes or deletes anything. Each tool reads through one API v1 call, with the same key, scopes and workspace, so it can see no more than the key could with the API.

Before you start

  1. A test-mode v1 key. In the dashboard, open Developers › API keys and create a key in test mode, with the read scopes the tools you want need (see the table below). MCP serves test-mode keys only for now; a live key is refused.
  2. MCP turned on for the key. On the key in Developers › API keys, turn MCP on. A key without it can still call the API, but not the MCP server.
  3. MCP turned on for the workspace. If the server answers MCP_WORKSPACE_OFF, MCP is not available for your workspace yet.

The endpoint

URLhttps://api.stage.fungies.net/mcp
TransportStreamable HTTP: JSON-RPC 2.0, one request per POST, answered with application/json. No batches, no streaming.
AuthenticationAuthorization: Bearer <key> on every request. Never in the URL.
Protocol versions2026-07-28 (stateless; send Mcp-Protocol-Version and Mcp-Method) and 2025-11-25 (no version header).

The server keeps no session: every request carries the key and stands alone.

Set up a client

Keep the key out of files you share: put it in an environment variable and refer to that.

Claude Code

export FUNGIES_API_KEY=fgs_test_...
claude mcp add --transport http fungies https://api.stage.fungies.net/mcp \
  --header "Authorization: Bearer $FUNGIES_API_KEY"

A client that reads an mcpServers file (.mcp.json in Claude Code, mcp.json in Cursor):

{
  "mcpServers": {
    "fungies": {
      "type": "http",
      "url": "https://api.stage.fungies.net/mcp",
      "headers": { "Authorization": "Bearer ${FUNGIES_API_KEY}" }
    }
  }
}

Then ask the assistant to call whoami first: it says which workspace and mode the key acts in and which tools its scopes allow.

Check the connection by hand

curl -s https://api.stage.fungies.net/mcp \
  -H "Authorization: Bearer $FUNGIES_API_KEY" \
  -H "Content-Type: application/json" -H "Accept: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Tools

ToolWhat it answersScopeAPI v1 call
whoamiWhich workspace and mode this key acts in, and the scopes it holds. Call it first to learn which other tools can answer.anyGET /v1/whoami
find_ordersOrders of the workspace, newest last, filtered by status, number, currency, country, dispute or creation time. Use get_order with an id for one order in full.orders:readGET /v1/orders
get_orderOne order by its id: status, money, the buyer masked and, in detail, its lines. Follow with get_subscription when it names a subscription.orders:readGET /v1/orders/{orderId}
explain_orderWhere one order’s money went: each charge, refund, chargeback and transfer with the Fungies fee, the tax remitted and the merchant net. Use get_order first for the order itself.orders:readGET /v1/orders/{orderId}/breakdown
find_customerThe buyer with this exact email, masked. Use its id with list_subscriptions; orders name their buyer in get_order.customers:readGET /v1/customers
list_subscriptionsSubscriptions of the workspace, filtered by status or by a customer id from find_customer. Use get_subscription with an id for its periods and trial.subscriptions:readGET /v1/subscriptions
get_subscriptionOne subscription by its id: status, price, current period and trial. Follow with list_charge_schedules for its scheduled charges.subscriptions:readGET /v1/subscriptions/{subscriptionId}
get_chargeOne off-session charge by its id: status, amount, tax, the order it was booked under and, in detail, its lines. Follow with get_order for that order.charges:readGET /v1/charges/{chargeId}
list_charge_schedulesCharge schedules of the workspace, filtered by a subscription id. Use get_charge_schedule with an id for its recent runs.charges:readGET /v1/charge-schedules
get_charge_scheduleOne charge schedule by its id: status, cadence, next run and, in detail, its recent runs. Follow with get_charge for a run’s charge.charges:readGET /v1/charge-schedules/{scheduleId}
list_productsProducts of the catalogue, filtered by status, kind or archived. Use get_product with an id for its variants and offers.catalogue:readGET /v1/products
get_productOne product by its id and, in detail, its variants and offers with their prices and stock.catalogue:readGET /v1/products/{productId}
check_readinessWhether this workspace can sell now, as reason codes: activation, a payments or payouts hold, a suspension. Codes only, no reviewer text; activation codes are acted on in the dashboard.catalogue:read, catalogue:write, orders:read, orders:write, customers:read, customers:write, subscriptions:read, subscriptions:write, charges:read, charges:write, usage:read, usage:write, webhooks:read, webhooks:write, discounts:read, discounts:write, test-helpers:writeGET /v1/readiness

A list tool returns 10 rows unless asked for more, and at most 50. A result is cut at 24 KiB. A buyer's email and name are masked in every result.

Limits

  • 120 MCP calls a minute per key. Each tool call also counts against the key's API v1 rate limit.
  • A call that takes longer than 10 seconds is ended.

When a call is refused

A refusal is a JSON-RPC error with code -32001. Its data holds code, requestId and, often, a hint:

{
  "jsonrpc": "2.0",
  "id": null,
  "error": {
    "code": -32001,
    "message": "KEY_INVALID",
    "data": {
      "code": "KEY_INVALID",
      "requestId": "req_01M6QZZPAGQNK4TD8XHHAEDA0D",
      "hint": "Send a v1 key with its mcp flag on as Authorization: Bearer."
    }
  }
}
data.codeHTTP statusWhy
KEY_INVALID401No key, or a key that is malformed, unknown, revoked or expired.
MCP_LIVE_KEY_REFUSED403A live-mode key. MCP serves test-mode keys only for now.
MCP_KEY_NOT_OPTED_IN403The key does not have MCP turned on.
MCP_WORKSPACE_OFF403MCP is not turned on for the workspace yet.
ORIGIN_REFUSED403The request carried a browser Origin header. Call from a server or a local client.
KEY_IN_URL400The key was sent in the URL. Send it only in the Authorization header, and roll it.
METHOD_NOT_ALLOWED405A method other than POST. Nothing is streamed.
NOT_ACCEPTABLE406Accept does not allow application/json.
MCP_RATE_LIMITED429Over 120 MCP calls in a minute for this key. Wait Retry-After seconds.
RATE_LIMITED429The key's API v1 limit is spent. Tool calls count against it too.
MCP_BUSY503The server is at capacity. Retry after Retry-After.

A tool that runs but fails answers with the API v1 error of its call; see Errors.