Install MCP Server
Configure Router9 as an MCP server for AI harnesses
Router9 Skills are available via the Model Context Protocol (MCP), making them compatible with MCP-enabled AI harnesses like Claude Code, Codex, OpenCode, and omp.
Router9 hosts the MCP server for you — there is nothing to install or run locally. Point any MCP client that supports the Streamable HTTP transport at:
https://api.router9.com/v1/mcpAuthenticate with your Router9 API key in an Authorization: Bearer header.
Prerequisites
- A Router9 API key (
sk-r9k-...). See Authentication to create one.
Claude Code
Add Router9 as a remote HTTP MCP server with one command:
claude mcp add --transport http router9 https://api.router9.com/v1/mcp \
--header "Authorization: Bearer sk-r9k-your-key"By default the server is added to the local scope (this project, your machine only).
Use --scope user to make it available in every project, or --scope project to
share it with your team through a checked-in .mcp.json.
Verify the connection from inside Claude Code with the /mcp command — Router9's
Skills then show up as mcp__router9__* tools.
You can also write the configuration by hand in .mcp.json (project scope) or
~/.claude.json (user scope):
{
"mcpServers": {
"router9": {
"type": "http",
"url": "https://api.router9.com/v1/mcp",
"headers": {
"Authorization": "Bearer sk-r9k-your-key"
}
}
}
}Prefer not to commit your key? Claude Code expands environment variables in
.mcp.json, so"Authorization": "Bearer ${ROUTER9_API_KEY}"works too.
This connects Router9 tools to Claude Code; it does not change which model Claude Code talks to.
Codex
Codex reads MCP servers from ~/.codex/config.toml. Add Router9 as a streamable
HTTP server and let Codex pull the key from your environment:
[mcp_servers.router9]
url = "https://api.router9.com/v1/mcp"
bearer_token_env_var = "ROUTER9_API_KEY"bearer_token_env_var names the environment variable holding your key — Codex sends
it as Authorization: Bearer <token>. To hardcode the header instead, use:
[mcp_servers.router9]
url = "https://api.router9.com/v1/mcp"
http_headers = { Authorization = "Bearer sk-r9k-your-key" }Run codex mcp list to confirm Router9 is registered.
OpenCode
Add Router9 as a remote MCP server in your opencode.json:
{
"mcp": {
"router9": {
"type": "remote",
"url": "https://api.router9.com/v1/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer sk-r9k-your-key"
}
}
}
}omp
omp discovers MCP servers from .omp/mcp.json (project) or
~/.omp/agent/mcp.json (user):
{
"mcpServers": {
"router9": {
"type": "http",
"url": "https://api.router9.com/v1/mcp",
"headers": {
"Authorization": "Bearer ${ROUTER9_API_KEY}"
}
}
}
}${ROUTER9_API_KEY} expands from your environment at discovery time; a literal
sk-r9k-... works too. You can also add it interactively with /mcp add, then
check it with /mcp test router9.
Generic MCP Client
Any client that speaks the MCP Streamable HTTP transport can connect. Point it at the endpoint and send your key as a Bearer token:
- URL —
https://api.router9.com/v1/mcp - Header —
Authorization: Bearer sk-r9k-your-key
Available Tools
Once connected, the MCP server exposes every Router9 capability as a tool:
audio_transcribe/audio_synthesize/audio_voices(the voice idsaudio_synthesizeaccepts, your cloned voices first)image_describeimage_generate/image_editimage_upscale/image_background_remove(when a provider that can serve them is configured)video_generate(when a video provider is configured)canvas_build/canvas_get/canvas_runproject_list
Everything the image and speech tools make is kept in your library, filed into a
project — the same projects Router9 Studio shows under Works. Call
project_list for their ids and pass one as project_id; without one, results
land in your default project.
image_generate takes an enhance_prompt flag: a language model expands the
prompt before drawing, and the text it produced comes back as enhanced_prompt.
It is a second billed call, and it fails open — if the rewrite cannot be produced
your own prompt is drawn and nothing extra is charged.
canvas_build makes a canvas from a recipe: steps (pictures, clips, spoken lines) and
which step feeds which. It is a work you can open in Router9 Studio and carry on from,
with the dependencies kept, so changing one step makes again only what follows it.
Building again is safe: steps you changed on the canvas, and steps you added, are left
as they are and reported. To change a few steps, pass canvas_id, patch: true and
only the steps that are new or different; the rest of the canvas stays as it is. canvas_get reads it and says what a run would cost (a picture of a model billed by
the tokens it uses is counted at what its recent pictures cost, and reported as an
estimate), and
canvas_run makes what is missing, billed per step as the image, video and speech tools
are. It answers after wait_seconds (50 by default) with where the run stands; call it
again to collect what was still being made.
video_generate queues a clip and answers at once with a job: the clip is made
in the background and lands in your library a few minutes later, billed per second
of video when it does (a clip that fails is not billed). Read the job back with
GET /v1/video/jobs/{id}.
search_webalso appears when web search is configured on the server.