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
- 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.
- 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.
- MCP turned on for the workspace. If the server answers
MCP_WORKSPACE_OFF, MCP is not available for your workspace yet.
The endpoint
| URL | https://api.stage.fungies.net/mcp |
| Transport | Streamable HTTP: JSON-RPC 2.0, one request per POST, answered with application/json. No batches, no streaming. |
| Authentication | Authorization: Bearer <key> on every request. Never in the URL. |
| Protocol versions | 2026-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
| Tool | What it answers | Scope | API v1 call |
|---|---|---|---|
whoami | Which workspace and mode this key acts in, and the scopes it holds. Call it first to learn which other tools can answer. | any | GET /v1/whoami |
find_orders | Orders 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:read | GET /v1/orders |
get_order | One order by its id: status, money, the buyer masked and, in detail, its lines. Follow with get_subscription when it names a subscription. | orders:read | GET /v1/orders/{orderId} |
explain_order | Where 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:read | GET /v1/orders/{orderId}/breakdown |
find_customer | The buyer with this exact email, masked. Use its id with list_subscriptions; orders name their buyer in get_order. | customers:read | GET /v1/customers |
list_subscriptions | Subscriptions 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:read | GET /v1/subscriptions |
get_subscription | One subscription by its id: status, price, current period and trial. Follow with list_charge_schedules for its scheduled charges. | subscriptions:read | GET /v1/subscriptions/{subscriptionId} |
get_charge | One 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:read | GET /v1/charges/{chargeId} |
list_charge_schedules | Charge schedules of the workspace, filtered by a subscription id. Use get_charge_schedule with an id for its recent runs. | charges:read | GET /v1/charge-schedules |
get_charge_schedule | One 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:read | GET /v1/charge-schedules/{scheduleId} |
list_products | Products of the catalogue, filtered by status, kind or archived. Use get_product with an id for its variants and offers. | catalogue:read | GET /v1/products |
get_product | One product by its id and, in detail, its variants and offers with their prices and stock. | catalogue:read | GET /v1/products/{productId} |
check_readiness | Whether 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:write | GET /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.code | HTTP status | Why |
|---|---|---|
KEY_INVALID | 401 | No key, or a key that is malformed, unknown, revoked or expired. |
MCP_LIVE_KEY_REFUSED | 403 | A live-mode key. MCP serves test-mode keys only for now. |
MCP_KEY_NOT_OPTED_IN | 403 | The key does not have MCP turned on. |
MCP_WORKSPACE_OFF | 403 | MCP is not turned on for the workspace yet. |
ORIGIN_REFUSED | 403 | The request carried a browser Origin header. Call from a server or a local client. |
KEY_IN_URL | 400 | The key was sent in the URL. Send it only in the Authorization header, and roll it. |
METHOD_NOT_ALLOWED | 405 | A method other than POST. Nothing is streamed. |
NOT_ACCEPTABLE | 406 | Accept does not allow application/json. |
MCP_RATE_LIMITED | 429 | Over 120 MCP calls in a minute for this key. Wait Retry-After seconds. |
RATE_LIMITED | 429 | The key's API v1 limit is spent. Tool calls count against it too. |
MCP_BUSY | 503 | The 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.