Model Context Protocol

Give your agent the model catalog

Railwail runs a hosted MCP server. Connect it once and your coding agent can search the catalog, compare models on real prices, work out what a workload costs in euro and quote the API docs, instead of guessing from training data that is months out of date.

Add the server

One command. No account, no key, nothing to configure.

claude mcp add --transport http railwail https://railwail.com/api/mcp

With an API key

Optional. A key raises the rate limit from 30 to 300 requests per minute. It unlocks no extra tools, and no tool can read anything belonging to your account.

claude mcp add --transport http railwail https://railwail.com/api/mcp \
  --header "Authorization: Bearer rw_live_your_key_here"

Other clients

Anything that speaks Streamable HTTP works. The JSON config form:

{
  "mcpServers": {
    "railwail": {
      "type": "http",
      "url": "https://railwail.com/api/mcp"
    }
  }
}

Live data

Prices, context windows and rankings are read from the same catalog the website renders, with the same cost formula. A tool answer and a page can never disagree.

Read-only

No tool can start a generation, buy credits or write anything. There is no code path from an MCP call to your balance.

No user data

Only content that is public on railwail.com anyway. Accounts, jobs, invoices and e-mail addresses are out of reach by design, with or without a key.

Tools

16 tools, all public.

ToolWhat it does
search_modelsSearch the live Railwail model catalog by free text and filters (category, provider, minimum context window, maximum token price). Returns only models the API can run right now, each with its price and billing unit (per token, per image, per second of output, per 1,000 characters or per GPU-second), context window and latency. Older models carry lifecycle.successor_slug; a query naming a duplicate or removed model finds the model to use instead. Start here for any question of the form 'which model can do X' or 'what does Railwail offer for Y'.
get_modelEverything Railwail knows about one model: whether the API can run it right now, its price and billing unit, context window, max output tokens, supported formats, latency, tags, how to run it (run: the MCP tool, the key scope and the input fields, for video also the image fields the model takes), plus the deep dive where one exists (lab, architecture, training data, licence, known limitations, papers). A duplicate or removed model answers with use_instead when there is a runnable model to use, an older one names its successor. Use this before making claims about a model's licence or weaknesses instead of relying on training data.
compare_modelsCompare two to four models side by side on price and billing unit, context window, max output, latency and provider, with the concrete deltas spelled out. Models the API cannot run right now are marked available:false. Mirrors the on-site comparison pages.
estimate_costEstimate the monthly Railwail bill for a workload. Give up to ten model slugs plus the volumes that match their billing unit: tokens for text and embedding models, requests for image, video and GPU-second models (each priced as one default API call), characters for speech. Returns the cost per model in USD (*_usd fields) and credits, cheapest first. Models the API cannot run right now are listed separately and never ranked. Use this for 'what would X cost' rather than guessing from memory.
recommend_modelTurn a plain-language task description plus constraints (budget, context window, latency ceiling, modality) into a short, reasoned shortlist of Railwail models the API can run right now. Every entry carries a reason and a URL. Returns an explicit empty result (no_match: true) when nothing in the catalog fits the task. Use this when the user describes what they want to build rather than naming a model.
get_rankingsTop runnable models on one live dimension: cost-input, cost-output, context, popular, latency, newest, rating or code. Answers 'what is currently the cheapest / fastest / longest-context model' with numbers from the catalog instead of stale training knowledge. Popularity counts completed jobs of the last 30 days.
get_integration_snippetRunnable code for a concrete case: language (python, typescript, curl, go) times task (chat, image, embedding, video, tts, stt) times model slug. Returns the correct endpoint, base URL, request format and real model identifier so the user can copy it straight into their project instead of being pointed at the docs. Without a model the most used runnable model of the task is chosen.
get_migration_guideThe Railwail migration guide for one of the covered providers (openai, anthropic, azure-openai, google-ai, mistral, cohere, deepseek, groq, together-ai, fireworks, replicate, runway, stability-ai, elevenlabs, huggingface, openrouter, perplexity, xai, anyscale, deepinfra): what changes, step by step, the endpoint and model mapping checked against the live API, plus the current platform facts.
search_docsFull-text search across the Railwail developer documentation: quickstart, authentication, the SDK reference (rw.run, rw.chat, rw.image, rw.embed, rw.models, rw.job), the REST endpoints for chat, images, embeddings, models and jobs, OpenAI compatibility, rate limits, error codes and the setup of this MCP server. Use it for "how do I ..." questions about the API.
lookup_glossaryLook up an AI term in the Railwail glossary (250 entries, aliases included): short and long definition, related terms, and related models as runnable catalog slugs. Use this instead of paraphrasing a general definition when the user asks what something like MoE, quantisation or speculative decoding means.
get_pricing_and_limitsThe commercial and operational frame in one call: how prepaid credits are bought and billed (1 credit = USD 0.01), which billing unit each kind of model uses, the per-key rate limits and the limits of this MCP server, and what Railwail does not charge for. Saves scraping the pricing page and the rate-limit doc separately.
get_platform_factsFacts about Railwail itself that come up before a buying decision: what it is, where it runs, how many models the API can run right now, what the chat endpoint supports, what this MCP server can do with and without an API key, GDPR position, which providers are covered, and the official contact and policy URLs. Use this instead of guessing, and link the page that is actually binding.
chat_completionRun a chat, code or multimodal model and return its answer. Needs an API key (Authorization: Bearer rw_live_... on the MCP connection) with the 'chat' scope, and is billed like POST /api/v1/chat/completions: prepaid credits, 1 credit = USD 0.01, the hold covers the prompt plus max_tokens and the rest is refunded. The key's IP allowlist, rate limit and the account's monthly spending limit apply. max_credits caps the final price: the run is refused before anything is charged when the most it can cost (every input byte counted as a token, plus max_tokens) is higher, and always when the messages carry image, audio or file parts. Returns { text, finish_reason, usage, credits_charged, job_id }. Without an API key the call returns isError with how to create one (https://railwail.com/en/dashboard/settings/api-keys); the other tools of this server need no key.
run_modelRun an image, video, speech (text-to-speech), embedding or chat model through the same API route and billing as a direct API call. input is the request body of the model's endpoint without model: get_model lists it under run.input_fields (images: prompt, n, size ...; video: prompt, duration_sec, aspect_ratio, the image fields in run.image_fields; speech: input, voice; embeddings: input; chat: messages or prompt). Needs an API key with the scope of the model's category (images, video, audio, embeddings or chat). Credits are held before the run (1 credit = USD 0.01) and failed runs are refunded. max_credits caps the final price: a run is refused before anything is charged when the most it can cost is higher, or when that cannot be known in advance (GPU-time video and speech models). Video and other long runs return status "running" with a job_id after wait_seconds; poll get_job. A started run always returns its job_id, also when reading its status fails (poll_error): then call get_job later instead of starting it again. Returns { job_id, status, output: { url?, urls?, text?, embedding? }, credits_charged, estimated_credits }; speech audio comes as an audio content block of at most 16 MB (longer texts are refused before the run). Embedding vectors come only in the run's answer (get_job reports their count and dimensions), and lists whose vectors could exceed 16 MB are refused before the run. If reading the charge fails after a run, credits_charged is null and credits_note says so. Transcription (needs a file upload) and categories without an API route (music, 3D, robotics) cannot run here. Without an API key the call returns isError with how to create one (https://railwail.com/en/dashboard/settings/api-keys); the other tools of this server need no key.
get_jobStatus and result of a run started by run_model or chat_completion (or through the API), by job_id. Polls the provider for a job that is still running, like GET /api/v1/jobs/{id}, which books the final price or the refund. Needs an API key with the 'jobs' scope or the scope of the job's category, and only answers for jobs of the key's own account. Returns { job_id, status: completed | running | failed, output: { url?, urls?, text? }, credits_charged }. Without an API key the call returns isError with how to create one (https://railwail.com/en/dashboard/settings/api-keys); the other tools of this server need no key.
get_balanceThe prepaid credit balance of the account the API key belongs to: { credits, usd } (1 credit = USD 0.01). Needs an API key with the 'read' scope. Without an API key the call returns isError with how to create one (https://railwail.com/en/dashboard/settings/api-keys); the other tools of this server need no key.

Questions

Do I need a Railwail account to use the MCP server?
No. Every tool is public and read-only. An API key is accepted and raises the rate limit, but it does not unlock additional tools.
Can an agent spend money or change my account through MCP?
No. There is no write path. The server cannot start a generation, buy credits, submit a model or read anything tied to a user account.
Where do the prices and rankings come from?
From the same catalog the website reads. Cost is calculated with the formula used by the on-site cost calculator and the comparison pages, so an MCP answer and the website cannot drift apart.
Which transport does the server speak?
Streamable HTTP with JSON-RPC 2.0 over POST, protocol version 2025-06-18. Any client that speaks Streamable HTTP works; there is no stdio variant.

Endpoints

  • MCP: https://railwail.com/api/mcp
  • Discovery: https://railwail.com/.well-known/mcp.json
  • Crawler summary: https://railwail.com/llms.txt
    MCP Server: Give Your AI Agent the Railwail Model Catalog | Railwail