Connect ModelsLab’s powerful AI generation capabilities to your favorite AI coding assistant. This guide covers integration with popular MCP-compatible agents and tools.Documentation Index
Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The ModelsLab MCP Web API works with any client that supports the Model Context Protocol over HTTP. This includes:- Claude Code - Anthropic’s CLI coding assistant
- OpenCode - Open-source AI coding agent
- Claude Desktop - Claude’s desktop application
- Cursor - AI-powered code editor
- Continue - Open-source AI code assistant
- Custom integrations - Any MCP-compatible client
Claude Code
Claude Code is Anthropic’s agentic CLI tool for software development.Configuration
Add ModelsLab to your Claude Code MCP settings file:- macOS / Linux
- Windows
Edit
~/.claude/settings.json:settings.json
Usage
Once configured, you can ask Claude Code to generate images, videos, and audio directly:OpenCode
OpenCode is an open-source AI coding agent that runs in your terminal.Configuration
Add ModelsLab to your OpenCode configuration:- opencode.json (Project-level)
- Global Config
Create or edit
opencode.json in your project root:opencode.json
Usage
Start OpenCode and use ModelsLab tools:Claude Desktop
Claude Desktop supports MCP servers for extended functionality.Configuration
- macOS
- Windows
Edit
~/Library/Application Support/Claude/claude_desktop_config.json:claude_desktop_config.json
Restart Required
After updating the configuration:- Completely quit Claude Desktop (not just minimize)
- Reopen Claude Desktop
- The ModelsLab tools should now be available
Cursor
Cursor is an AI-powered code editor with MCP support.Configuration
Add ModelsLab to your Cursor MCP settings:- Open Cursor Settings (
Cmd/Ctrl + ,) - Search for “MCP”
- Add the following server configuration:
.cursor/mcp.json in your project:
mcp.json
VS Code (Copilot Agent Mode)
VS Code supports MCP servers through Copilot Agent Mode.Configuration
Create or edit.vscode/mcp.json in your project:
mcp.json
Usage
Once configured, use ModelsLab tools in Copilot Agent Mode:Windsurf
Windsurf is an AI-powered IDE by Codeium with MCP support.Configuration
Edit~/.codeium/windsurf/mcp_config.json:
mcp_config.json
Restart Required
After updating the configuration, restart Windsurf for the changes to take effect.Continue
Continue is an open-source AI code assistant that works with VS Code and JetBrains IDEs.Configuration
Edit your Continue configuration file (~/.continue/config.json):
config.json
Generic MCP Client
For any MCP-compatible client, use the following configuration pattern:Environment Variables
For security, you can use environment variables instead of hardcoding your API key:- macOS / Linux
- Windows
Add to your shell profile (Then reference it in your config:
~/.bashrc, ~/.zshrc, etc.):Verification
After configuring your MCP client, verify the integration is working:Test Connection
Ask your AI agent to list available models:Generate a Test Image
Check for Errors
If the integration isn’t working, check:- API Key: Ensure your API key is valid and has sufficient credits
- URL: Verify the endpoint URL is correct
- Headers: Confirm the Authorization header format is correct
- Client Support: Ensure your MCP client supports HTTP transport
Troubleshooting
Connection refused or timeout
Connection refused or timeout
- Verify the endpoint URL is correct
- Check your network connection
- Ensure there are no firewall rules blocking the connection
Authentication errors
Authentication errors
- Verify your API key is correct
- Check that the Authorization header uses
Bearerprefix (with space) - Ensure your API key has not expired
Tools not appearing
Tools not appearing
- Restart your MCP client after configuration changes
- Check the configuration file syntax (valid JSON)
- Verify the config file is in the correct location
Rate limiting
Rate limiting
- Check your ModelsLab account for usage limits
- Add delays between requests if making many calls
- Consider upgrading your plan for higher limits
Next Steps
Tools Reference
Explore all available MCP tools and their parameters
Get API Key
Create or manage your ModelsLab API keys

