# crazyrouter-mcp [Health: Active]

**Category:** 🗣️ Conversational AI  
**Repository:** https://github.com/xujfcn/crazyrouter-mcp  
**GitHub Stars:** 3  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/crazyrouter-mcp

## Description
MCP tools for Crazyrouter chat, synchronous images and live model discovery

## Tools
Capabilities this server exposes over MCP:

- **chat** — Text messages for models listed for Chat Completions; default `gpt-4o-mini
- **list_models** — Live models available to your key; optional category filter
- **generate_image** — One synchronous image; default `gpt-image-2`; model-specific sizes

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "crazyrouter-mcp": {
    "command": "npx",
    "args": ["-y","crazyrouter-mcp@1.0.1"],
    "env": {
      "CRAZYROUTER_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `CRAZYROUTER_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What crazyrouter-mcp does

crazyrouter-mcp gives an MCP-compatible AI client three ways to use Crazyrouter:

- Send text messages to models supported by the Chat Completions API.
- Query the models currently available to the configured API key.
- Generate one synchronous image through the Images API.

Model discovery can return entries for capabilities such as video, music, transcription, or text-to-speech, but those entries are informational. The MCP server does not implement those native task APIs. It also does not treat display names in the model catalogue as exact API identifiers; requests should use the model ID expected by Crazyrouter.

## How it works

The server uses the Crazyrouter API at `https://crazyrouter.com/v1`. `chat` calls `/v1/chat/completions`, `list_models` reads `/v1/models` along with public endpoint metadata, and `generate_image` calls `/v1/images/generations`. Authentication errors and discovery failures are returned to the MCP client rather than being replaced by a fallback model list.

`list_models` accepts an optional category filter. Categories are derived from public endpoint metadata, with name-based detection for audio models; unrecognized types are grouped as `other`. The chat tool defaults to `gpt-4o-mini`, while image generation defaults to `gpt-image-2`. Model-specific request rules still apply, including supported image sizes and the choice between `max_tokens` and `max_completion_tokens`.

## Setup and configuration

Node.js 22 or newer is required. Create an API key in the Crazyrouter console, then configure the MCP client to start the package with a stdio command such as:

```json
{
  "command": "npx",
  "args": ["-y", "crazyrouter-mcp@latest"],
  "env": {
    "CRAZYROUTER_API_KEY": "YOUR_CRAZYROUTER_API_KEY"
  }
}
```

Claude Desktop uses its MCP configuration file, Cursor uses `.cursor/mcp.json`, and VS Code uses `.vscode/mcp.json` with a server of type `stdio`. Restart the client after changing its configuration, and keep the API key out of committed files. For a source build, clone the repository, run `npm ci`, run `npm run build`, and configure the resulting local `dist/index.js` as the command target.

## Tools and capabilities

`chat` accepts a model and message array, with additional fields such as token limits when supported by the selected model. Use only parameters accepted by that model; unsupported optional fields can produce an HTTP 400 response.

`list_models` reports models available to the supplied key and can filter by category. It is useful for selecting a valid model at runtime instead of relying on a static catalogue.

`generate_image` accepts a prompt, model, count, and model-dependent size options. The result can include a URL, base64 image data, or both. The tool rejects an empty result rather than reporting a successful generation.

## Limitations and notes

Image requests are billed according to the selected model. Model availability, pricing, quotas, and rate limits come from Crazyrouter and can change independently of the MCP package. HTTP 401 or 403 responses generally indicate an invalid key or insufficient permissions; HTTP 429 responses indicate quota or rate-limit issues.

Models that require native task-specific APIs are rejected by the chat or image tools before inference. The server does not provide video generation, music, transcription, TTS, or Midjourney operations. Use Crazyrouter's native API documentation for those workflows.

_Full upstream README: https://allmcps.com/mcp/crazyrouter-mcp/readme_

