Skip to main content

What is the MCP Web API?

ModelsLab provides two hosted MCP servers that give AI agents complete access to the platform — no local installation required: Both servers use the Model Context Protocol specification over HTTP with JSON-RPC 2.0 and SSE transport.

Endpoints

ServerURLAuthPurpose
Generationhttps://modelslab.com/mcp/v7API keyImage, video, audio, LLM generation
Agent Control Planehttps://modelslab.com/mcp/agentsBearer tokenAccount, billing, subscriptions, teams

Generation Server

The Generation MCP server enables AI assistants to interact with the ModelsLab V7 API for AI-powered generation capabilities including images, videos, audio, and chat completions.

Key Features

Image Generation

Generate, transform, and edit images using text prompts and advanced AI models

Video Creation

Create videos from text, animate images, and apply AI transformations

Audio & Speech

Text-to-speech, speech-to-text, music generation, and voice transformation

LLM Chat

Chat with powerful language models for text generation and conversation

Authentication

All requests must include your ModelsLab API key using one of the following methods:
Get your API key from the ModelsLab Dashboard.

Protocol

The MCP Web API uses the Model Context Protocol specification. Communication is done via JSON-RPC 2.0 over HTTP.

Request Format

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tool-name",
    "arguments": {
      "param1": "value1",
      "param2": "value2"
    }
  }
}

Response Format

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

Available Tools (Generation Server)

CategoryToolsDescription
Modelslist-models, list-providersBrowse available AI models
Imagetext-to-image, image-to-image, inpaint-image, fetch-imageGenerate and edit images
Videotext-to-video, image-to-video, video-to-video, lip-sync, motion-control, fetch-videoCreate and transform videos
Audiotext-to-speech, speech-to-text, speech-to-speech, sound-generation, music-generation, song-extender, song-inpaint, dubbing, fetch-audioAudio generation and processing
LLMchat-completionChat with AI language models

View Complete Tool Reference

See detailed documentation for all 24 generation tools, parameters, and examples.

Agent Control Plane Server

The Agent Control Plane MCP server lets AI agents manage an entire ModelsLab account lifecycle — signup, authentication, API keys, billing, subscriptions, and teams — without a browser.

Agent Control Plane Documentation

Full documentation for all 10 account management tools, setup guides, and examples.

Quick Example

Here’s a simple example generating an image using the MCP Web API: 1. List available models:
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list-models",
    "arguments": {
      "feature": "imagen",
      "limit": 5
    }
  }
}
2. Generate an image:
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "text-to-image",
    "arguments": {
      "model_id": "flux-dev",
      "prompt": "A futuristic city at night with neon lights",
      "width": 1024,
      "height": 1024
    }
  }
}
3. Fetch the result:
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "fetch-image",
    "arguments": {
      "id": 12345
    }
  }
}

Error Handling

Errors are returned in standard JSON-RPC 2.0 format:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32600,
    "message": "Authentication required. Please provide a valid API key."
  }
}

Common Error Codes

CodeDescription
-32600Invalid Request
-32601Method not found
-32602Invalid params
-32603Internal error

Server Information

Generation ServerAgent Control Plane
Namemodelslab-v7-apimodelslab-agent-control-plane
Version1.0.01.0.0
ProtocolMCP (Model Context Protocol)MCP (Model Context Protocol)
TransportHTTP with JSON-RPC 2.0 / SSEHTTP with JSON-RPC 2.0 / SSE
Local namev7-apiagent-control-plane

Next Steps