Skip to main content

What is the MCP Web API?

The ModelsLab MCP (Model Context Protocol) Web API enables AI assistants and applications to interact with the ModelsLab V7 API for AI-powered generation capabilities including images, videos, audio, and chat completions. Unlike the open-source MCP Server which requires local installation, the MCP Web API is a hosted solution that works directly over HTTP, making it easy to integrate with any MCP-compatible client.

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

Endpoint

https://modelslab.com/mcp/v7

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

The MCP Web API provides a comprehensive set of tools organized by category:
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 available tools, parameters, 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

  • Name: modelslab-v7-api
  • Version: 1.0.0
  • Protocol: MCP (Model Context Protocol)
  • Transport: HTTP with JSON-RPC 2.0

Next Steps