Cookbook

AI Hub MCP server

Connect an assistant to AI Hub's MCP server for live docs and model catalogue tools.

The server is public and read-only. It needs no AI Hub key, makes no model request and reads nothing from your account. Its address is this site's /mcp, over the Streamable HTTP transport.

ToolWhat it returns
search_docsThe best-matching docs sections, with their URLs
get_docOne docs page, or one section of it, as Markdown
list_modelsCatalogue models, filtered by text, modality or supported parameter
get_modelOne model's pricing, capabilities and endpoints, by exact id

The client settings below follow each client's own documentation.

Claude Code

bash
claude mcp add --transport http tokenhub https://aihub.belive.sg/mcp

Codex CLI

In ~/.codex/config.toml:

toml
[mcp_servers.tokenhub]
url = "https://aihub.belive.sg/mcp"

Other clients

Any MCP client that supports Streamable HTTP can add the URL above. The server answers each request on its own, with no session to resume, and does not offer a server-sent event stream.

Connecting this server gives an assistant tools. To use AI Hub models in that assistant, configure it as a provider too; see Coding agents.

Prices and serving routes

list_models preserves native pricing tables; get_model also returns serving endpoints. An image can be priced per image, per request or by several token meters. Null flat pricing is not a free model. Read all row conditions, legs, per denominators, allowances, multipliers and rounding; the Cost guide explains each shape. The MCP server returns catalogue facts, not a second billing calculator or your settled request history.

Use get_doc for the selected route's input/output contract. Audio-output filtering may return speech, music and realtime models; their endpoint routes differ. A model listing is public and does not validate an inference key or prove that a restricted account can call it.