Skip to content

MCP server

A hosted Model Context Protocol endpoint so coding agents can discover models, read exact parameter schemas and prices, and generate images or video with your key. Streamable HTTP, stateless, no extra software to run.

Connect

bash — Claude Code
claude mcp add --transport http tokport https://tokport.io/api/mcp \
  --header "Authorization: Bearer $TOKPORT_API_KEY"
json — Claude Desktop / Cursor (mcp.json)
{
  "mcpServers": {
    "tokport": {
      "type": "http",
      "url": "https://tokport.io/api/mcp",
      "headers": { "Authorization": "Bearer sk-…" }
    }
  }
}

Without the header the discovery tools still work (search, schema, pricing); run and job tools answer with an error asking for a key. Jobs are visible only to the key that created them and show up in your request history.

Tools

ToolNeeds keyDoes
search_modelsnoSearch the model catalog. Returns ids, modality, tasks, pricing and links. Use before calling run_model or submit_job to pick a model id.
get_model_schemanoInput parameters (name, type, allowed values, defaults) and output shape for every task a model supports.
get_pricingnoLive price per image or per video clip for one model or all models.
run_modelyesRun a model synchronously with the caller's API key. Images return URLs; videos are queued and this waits up to 60 s before returning the queue status instead.
submit_jobyesQueue a request and return its request_id immediately. Follow with check_job / get_job_result.
check_jobyesStatus of a queued request (IN_QUEUE / IN_PROGRESS / COMPLETED / FAILED / CANCELLED) with position, logs and metrics.
get_job_resultyesResult of a completed request; waits up to `timeout` seconds (max 60) when still running.
cancel_jobyesCancel a request while it is still queued.

A typical agent flow

text
1. search_models { q: "video", available: true }        → pick "seedance-2-0"
2. get_model_schema { model: "seedance-2-0" }          → prompt, seconds ∈ {4…15}, ratio, image optional
3. submit_job { model, input: { prompt, seconds: "5" } } → request_id
4. check_job / get_job_result { model, request_id, timeout: 60 } → video.url
   (or run_model for images: returns the OpenAI-shaped response directly)

Protocol details

JSON-RPC 2.0 over HTTP POST at https://tokport.io/api/mcp; single requests and batches are accepted, notifications return 202, GET returns 405 (no server-initiated streams). Supported methods: initialize, ping, tools/list, tools/call. Tool results carry both a text block and structuredContent.

bash — raw call
curl https://tokport.io/api/mcp -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_models","arguments":{"q":"seedream"}}}'