/teammcp:deploy-routerfrom teammcp
Deploys claude-code-router proxy to enable third-party API providers (OpenRouter, Gemini, DeepSeek, Ollama) for TeamMCP agents. Handles installation, configuration, and agent setup.
Ships in teammcp. Installing the plugin adds it to Claude Code.
Deploys claude-code-router as a proxy service that translates Anthropic API format to third-party providers. Required for non-Anthropic models (OpenRouter, Gemini, DeepSeek, Ollama, etc).
npx @musistudio/claude-code-router start
This installs and starts the router. Default port: 3456.
Create/edit ~/.claude-code-router/config.json:
{
"LOG": true,
"LOG_LEVEL": "info",
"HOST": "127.0.0.1",
"PORT": 3456,
"Providers": [
{
"name": "openrouter",
"api_base_url": "https://openrouter.ai/api/v1/chat/completions",
"api_key": "{YOUR_OPENROUTER_API_KEY}",
"models": ["{MODEL_NAME}"],
"transformer": {
"use": ["openrouter"]
}
}
],
"Router": {
"default": "openrouter,{MODEL_NAME}"
}
}
Provider examples:
| Provider | api_base_url | transformer |
|---|---|---|
| OpenRouter | https://openrouter.ai/api/v1/chat/completions | ["openrouter"] |
| DeepSeek | https://api.deepseek.com/chat/completions | ["deepseek"] |
| Gemini | https://generativelanguage.googleapis.com/v1beta/models/ | ["gemini"] |
| Ollama | http://localhost:11434/v1/chat/completions | (none needed) |
npx @musistudio/claude-code-router stop
npx @musistudio/claude-code-router start
curl -s -X POST http://localhost:3456/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: test" \
-H "anthropic-version: 2023-06-01" \
-d '{"model":"{MODEL_NAME}","max_tokens":50,"messages":[{"role":"user","content":"Hello"}]}'
Should return a valid response with the model's reply.
In TeamMCP Dashboard Agent Management, set for the target agent:
auth_mode: api_keyapi_provider: provider name (e.g., openrouter)api_base_url: http://localhost:3456 (router address)api_auth_token: any value (router handles real auth)api_model: model name (e.g., qwen/qwen3-235b-a22b)Or via API:
curl -X PATCH http://localhost:3100/api/agents/{AGENT_NAME} \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{"auth_mode":"api_key","api_provider":"openrouter","api_base_url":"http://localhost:3456","api_auth_token":"test","api_model":"{MODEL_NAME}"}'
Then stop+start the agent to apply.
startAgent automatically generates these for api_key mode:
set "ANTHROPIC_API_KEY="
set "CLAUDE_CODE_OAUTH_TOKEN=channel-gate-bypass"
set "ANTHROPIC_BASE_URL=http://localhost:3456"
set "ANTHROPIC_AUTH_TOKEN=test"
set "ANTHROPIC_MODEL={MODEL_NAME}"
"transformer": {"use": ["openrouter"]} for OpenRouter compatibilityFiles this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
claude-code-router, third-party-api, proxy, team-mcp, model-routing
7-day visitors to each command page
Generated from the plugin's indexed repository (cookjohn/teammcp) — no native marketplace selected
npx claudepluginhub p/cookjohn-teammcp9 commands in this plugin
/check-inboxCheck and process unread TeamMCP inbox messages. Reviews all unread items, acknowledges processed ones, and summarizes what needs attention./daily-standupGenerate and post a daily standup report. Checks project state, pending tasks, and unread messages, then posts a structured summary to the specified channel./quickstartQuick start guide for TeamMCP first-time users. Walk through installation, configuration, and first deployment in minutes./search-contextSearch team knowledge across messages, project state, and task history. Compiles relevant context from multiple TeamMCP sources to answer questions./submit-for-reviewSubmit work for team review or approval. Creates/updates a review task, notifies the reviewer via channel or DM, and requests state approval if needed./update-stateUpdate a project state field via TeamMCP. Sets state with reason, verifies the update, and handles approval flow if you are not the state owner.Other plugins' commands for the same job