Agent Onboarding (MCP)

AI agents can onboard with no browser at all. The gateway exposes an MCP (Model Context Protocol) server at POST https://tokpum.com/mcp - stateless JSON-RPC 2.0 over HTTP. It wraps the same account, funds, key, and routing operations the console offers, so an agent can go from nothing to calling /v1 on its own.

Inference is NOT served over MCP. MCP is for onboarding and account management; the agent then calls /v1/chat/completions or /v1/messages natively with the key it obtained (streaming, tool calls, and long outputs stay on the data plane).

Onboarding flow

  1. Call the get_login_challenge tool with a wallet address; the server returns a SIWE sign-in message.
  2. Sign that message with the wallet key.
  3. Call complete_login with the signature. The server creates the account if new, mints an API key named mcp-agent, and returns the raw sk- key once.
  4. Reconnect to /mcp with Authorization: Bearer sk-... for all authenticated tools - and use the same key for /v1.

Tool catalog (19)

  • Onboarding (anonymous): get_login_challenge, complete_login, get_gateway_config (base URLs, key format, ready-to-use curl snippets).
  • Account and funds: whoami, get_balance, get_deposit_info, list_deposits, create_withdrawal_challenge, submit_withdrawal, list_withdrawals, get_withdrawal, cancel_withdrawal.
  • API keys: list_api_keys, create_api_key, delete_api_key.
  • Models and routing: list_models, get_strategies, set_strategy, list_channels.

As with the console, every withdrawal requires a per-request wallet signature - the API key alone can never move funds.

Quick probe

curl -s https://tokpum.com/mcp -X POST -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Full input schemas and semantics: the MCP section of https://tokpum.com/llms.txt.