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
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

