openrouter-multimodal

v4.5.1
io.github.stabgan/openrouter-multimodal Checked 5 days ago Published 7 months ago

Chat with 300+ LLMs via OpenRouter.

Values you need

VariableWhat it is
OPENROUTER_API_KEYrequired secret OpenRouter API key. Get one free at https://openrouter.ai/keys
OPENROUTER_DEFAULT_MODELoptional Default model for chat + analyze tools. Defaults to nvidia/nemotron-nano-12b-v2-vl:free.
OPENROUTER_OUTPUT_DIRoptional Sandbox root for save_path on generate_* tools. Defaults to the current working directory.
OPENROUTER_MAX_TOKENSoptional Default max_tokens for chat_completion when unset in the request.
OPENROUTER_PROVIDER_SORToptional price / throughput / latency
OPENROUTER_PROVIDER_IGNOREoptional CSV of provider slugs to exclude.
OPENROUTER_PROVIDER_ORDERoptional JSON array or CSV of preferred provider IDs.
OPENROUTER_PROVIDER_QUANTIZATIONSoptional CSV of quantization levels (fp16,int8).
OPENROUTER_PROVIDER_REQUIRE_PARAMETERSoptional true/false. Require providers to support all request params.
OPENROUTER_PROVIDER_DATA_COLLECTIONoptional allow/deny
OPENROUTER_PROVIDER_ALLOW_FALLBACKSoptional true/false
OPENROUTER_CACHE_RESPONSESoptional Enable response caching server-wide. Sends X-OpenRouter-Cache: true on every chat/analyze call unless overridden per-request. Zero tokens billed on cache hits.
OPENROUTER_INCLUDE_REASONINGoptional Enable reasoning tokens passthrough server-wide. Adds _meta.reasoning to chat_completion responses for DeepSeek R1 / Gemini Thinking / Opus 4.7.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add openrouter-multimodal -e 'OPENROUTER_API_KEY=<OPENROUTER_API_KEY>' -- npx -y @stabgan/openrouter-mcp-multimodal@4.5.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "openrouter-multimodal": {
      "args": [
        "-y",
        "@stabgan/openrouter-mcp-multimodal@4.5.1"
      ],
      "command": "npx",
      "env": {
        "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "openrouter-multimodal": {
      "args": [
        "-y",
        "@stabgan/openrouter-mcp-multimodal@4.5.1"
      ],
      "command": "npx",
      "env": {
        "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "OPENROUTER_API_KEY",
      "id": "openrouter-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "openrouter-multimodal": {
      "args": [
        "-y",
        "@stabgan/openrouter-mcp-multimodal@4.5.1"
      ],
      "command": "npx",
      "env": {
        "OPENROUTER_API_KEY": "${input:openrouter-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.openrouter-multimodal]
command = "npx"
args = ["-y", "@stabgan/openrouter-mcp-multimodal@4.5.1"]
env = { "OPENROUTER_API_KEY" = "<OPENROUTER_API_KEY>" }

Docker

Requires Docker

Run in a terminal
claude mcp add openrouter-multimodal -e 'OPENROUTER_API_KEY=<OPENROUTER_API_KEY>' -- docker run -i --rm -e OPENROUTER_API_KEY docker.io/stabgan/openrouter-mcp-multimodal:4.5.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "openrouter-multimodal": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "OPENROUTER_API_KEY",
        "docker.io/stabgan/openrouter-mcp-multimodal:4.5.1"
      ],
      "command": "docker",
      "env": {
        "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "openrouter-multimodal": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "OPENROUTER_API_KEY",
        "docker.io/stabgan/openrouter-mcp-multimodal:4.5.1"
      ],
      "command": "docker",
      "env": {
        "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "OPENROUTER_API_KEY",
      "id": "openrouter-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "openrouter-multimodal": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "OPENROUTER_API_KEY",
        "docker.io/stabgan/openrouter-mcp-multimodal:4.5.1"
      ],
      "command": "docker",
      "env": {
        "OPENROUTER_API_KEY": "${input:openrouter-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.openrouter-multimodal]
command = "docker"
args = ["run", "-i", "--rm", "-e", "OPENROUTER_API_KEY", "docker.io/stabgan/openrouter-mcp-multimodal:4.5.1"]
env = { "OPENROUTER_API_KEY" = "<OPENROUTER_API_KEY>" }

For AI agents

  1. Ask the user for: OPENROUTER_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: chat_completion, analyze_image, analyze_audio, analyze_video, search_models, get_model_info, validate_model, generate_image, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json