MCP is a different contract from an HTTP API. The client picks a tool by name and description before it ever sees a response, so the catalogue has to be small, stable and self-describing. Here is how we mapped an OpenAI-compatible gateway with 103 models onto three tools, and what broke on the way.
One tool per model looks clean in a demo and becomes noise in production: the model list changes weekly, and a client that cached yesterday's catalogue starts calling names that no longer exist. We expose one listing tool, one chat tool and one image tool, and let the listing tool carry the model inventory as data instead of as tool names.
list_models returns ids, capability flags and per-model pricing notes, cached for a short window.chat takes a model id, messages, optional tools, and returns assistant content plus usage.generate_image wraps the video/image models that sit behind the same account balance.The trade-off: the client can no longer see per-model schemas at connect time. In exchange, adding a model upstream never requires a server release.
Humans read stack traces. Agents read the message and retry. Every failure returns a machine-readable code, a short explanation, and an explicit hint about whether retrying with a different model would help. A "429 from upstream X" that does not say "use model Y or back off 30 seconds" is a dead end for an autonomous client.
Because the MCP layer is thin, retries and seller switching stay server-side. When one upstream times out, the same request is retried against the next seller in price order before the tool returns. The client sees one answer, one usage block, and no knowledge of the three attempts behind it.
The gateway, the status board and the price table are all served from LONG AI. The MCP server itself lives at Dijinlong/longai-mcp-server, the routing and billing notes are in the previous article, and the price table logic is in Pricing 103 models across 51 sellers.