Skip to main content
Glama
README.md
<p align="center">
  <img src="assets/modelslab-icon-512.png" alt="ModelsLab" width="96" />
</p>

<h1 align="center">ModelsLab MCP Server</h1>

<p align="center">
  Generate images, video, speech, music and sound effects, and run LLM chat, across 10,000+ AI models from any MCP client.
</p>

<p align="center">
  <a href="https://modelslab.com">Website</a> ·
  <a href="https://docs.modelslab.com/mcp-web-api/overview">Docs</a> ·
  <a href="https://modelslab.com/pricing">Pricing</a> ·
  <a href="https://discord.gg/4xnGe4vpq7">Discord</a>
</p>

ModelsLab runs a hosted, remote MCP server. There is nothing to install: point your MCP client at the URL below and sign in with OAuth, or send your ModelsLab API key.

| | |
|---|---|
| **Server URL** | `https://modelslab.com/mcp/v7` |
| **Transport** | Streamable HTTP |
| **Auth** | OAuth 2.1 (PKCE + dynamic client registration), or `Authorization: Bearer <API key>` |
| **API key** | [modelslab.com/dashboard/api-keys](https://modelslab.com/dashboard/api-keys) |
| **Server card** | [`/.well-known/mcp/server-card.json`](https://modelslab.com/.well-known/mcp/server-card.json) |
| **Official registry** | `io.github.ModelsLab/modelslab` |

## Tools

| Category | Tools |
|---|---|
| Discovery | `list-models`, `list-providers` |
| Image | `text-to-image`, `image-to-image`, `inpaint-image`, `fetch-image` |
| Video | `text-to-video`, `image-to-video`, `video-to-video`, `lip-sync`, `motion-control`, `fetch-video` |
| Audio | `text-to-speech`, `speech-to-text`, `speech-to-speech`, `sound-generation`, `music-generation`, `song-extender`, `song-inpaint`, `dubbing`, `fetch-audio` |
| LLM | `chat-completion` |
| Jobs | `fetch-generation` |

Most generation is asynchronous. A tool returns `"status": "processing"` with an `id`; call `fetch-generation` with that `id` until the status is `success` or `error`. Use `list-models` first to get a valid `model_id` (Flux, Qwen Image, Seedream, Kling, Veo, Wan, Hailuo, ElevenLabs-class voices, open-source LLMs, and more).

## Setup

### Claude (claude.ai and Claude Desktop)

Settings → Connectors → **Add custom connector** → URL `https://modelslab.com/mcp/v7`. Claude detects OAuth and opens the ModelsLab sign-in page.

### Claude Code

```bash
claude mcp add --transport http modelslab https://modelslab.com/mcp/v7
```

Or with an API key:

```bash
claude mcp add --transport http modelslab https://modelslab.com/mcp/v7 \
  --header "Authorization: Bearer $MODELSLAB_API_KEY"
```

### Cursor

`~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "modelslab": {
      "url": "https://modelslab.com/mcp/v7",
      "headers": { "Authorization": "Bearer YOUR_MODELSLAB_API_KEY" }
    }
  }
}
```

### VS Code (GitHub Copilot)

`.vscode/mcp.json`:

```json
{
  "servers": {
    "modelslab": {
      "type": "http",
      "url": "https://modelslab.com/mcp/v7",
      "headers": { "Authorization": "Bearer ${input:modelslab-key}" }
    }
  },
  "inputs": [
    { "type": "promptString", "id": "modelslab-key", "description": "ModelsLab API key", "password": true }
  ]
}
```

### Windsurf

`~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "modelslab": {
      "serverUrl": "https://modelslab.com/mcp/v7",
      "headers": { "Authorization": "Bearer YOUR_MODELSLAB_API_KEY" }
    }
  }
}
```

### Gemini CLI

`~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "modelslab": {
      "httpUrl": "https://modelslab.com/mcp/v7",
      "headers": { "Authorization": "Bearer YOUR_MODELSLAB_API_KEY" }
    }
  }
}
```

### OpenAI Codex CLI

`~/.codex/config.toml`:

```toml
[mcp_servers.modelslab]
url = "https://modelslab.com/mcp/v7"
bearer_token_env_var = "MODELSLAB_API_KEY"
```

### Clients that only speak stdio

Use [`mcp-remote`](https://www.npmjs.com/package/mcp-remote):

```json
{
  "mcpServers": {
    "modelslab": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://modelslab.com/mcp/v7",
               "--header", "Authorization: Bearer ${MODELSLAB_API_KEY}"],
      "env": { "MODELSLAB_API_KEY": "YOUR_MODELSLAB_API_KEY" }
    }
  }
}
```

## Example prompts

- "List the ModelsLab video models, then make a 5 second clip of a paper boat in the rain with the best one."
- "Generate a product photo of a ceramic mug on a wooden table, 1024x1024."
- "Turn this paragraph into speech with a calm British voice."
- "Write a 30 second lo-fi track with soft piano."

## Other servers

| URL | What it does | Auth |
|---|---|---|
| `https://modelslab.com/mcp/v8` | Next-generation v8 generation APIs | OAuth or API key |
| `https://modelslab.com/mcp/agents` | Account, billing, team, API key and model discovery for autonomous agents | Agent token |

## Pricing

MCP calls bill the same as the REST API. Plans start at $21/month; the $149/month plan gives unlimited generations on open-source models. See [modelslab.com/pricing](https://modelslab.com/pricing).

## About ModelsLab

ModelsLab is an AI API platform with 10,000+ models, 400,000+ registered users and 500 million+ API requests served, running on its own GPU datacenter. Founded in 2022.

## License

The documentation and config files in this repository are MIT licensed. The hosted service is covered by the [ModelsLab terms](https://modelslab.com/terms-of-service).