Skip to main content
Connect your AI coding agent to ModelsLab’s account management capabilities. The Agent Control Plane MCP server is hosted — no installation required. Just add the URL and your bearer token.

Overview

The Agent Control Plane MCP server works with any client that supports the Model Context Protocol over HTTP:
  • Claude Code - Anthropic’s CLI coding assistant
  • Claude Desktop - Claude’s desktop application
  • Cursor - AI-powered code editor
  • VS Code - Via GitHub Copilot agent mode
  • Windsurf - Codeium’s AI editor
  • OpenCode - Open-source AI coding agent
  • Continue - Open-source AI code assistant
Unlike the Generation MCP server which uses API keys, the Agent Control Plane uses Sanctum bearer tokens. Get a token by calling the agent-auth tool with the login action, or via the REST API.

Getting Your Bearer Token

Before configuring your IDE, get a bearer token:
curl -X POST https://modelslab.com/api/agents/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your-password"}'
Copy the access_token from the response.
You can also use the MCP server itself to log in — the agent-auth tool’s login and signup actions work without authentication.

Using Both MCP Servers Together

For full ModelsLab access, configure both MCP servers:
ServerURLAuthPurpose
Generationhttps://modelslab.com/mcp/v7API keyImage, video, audio, LLM generation
Agent Control Planehttps://modelslab.com/mcp/agentsBearer tokenAccount, billing, subscriptions, teams

Claude Code

Edit ~/.claude/settings.json:
settings.json
{
  "mcpServers": {
    "modelslab": {
      "url": "https://modelslab.com/mcp/v7",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    },
    "modelslab-agents": {
      "url": "https://modelslab.com/mcp/agents",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_TOKEN"
      }
    }
  }
}

Usage

claude "Check my ModelsLab usage summary and wallet balance"
claude "Search for the best flux image models on ModelsLab"
claude "Create a new API key named 'production' on my ModelsLab account"

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
claude_desktop_config.json
{
  "mcpServers": {
    "modelslab-agents": {
      "url": "https://modelslab.com/mcp/agents",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_TOKEN"
      }
    }
  }
}
Restart Claude Desktop after updating the configuration.

Cursor

Add to your Cursor MCP settings or edit .cursor/mcp.json in your project:
mcp.json
{
  "servers": {
    "modelslab-agents": {
      "type": "http",
      "url": "https://modelslab.com/mcp/agents",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_TOKEN"
      }
    }
  }
}

VS Code (Copilot Agent Mode)

Edit .vscode/mcp.json in your workspace:
mcp.json
{
  "inputs": [
    {
      "id": "modelslab-agent-token",
      "type": "promptString",
      "description": "ModelsLab Agent Bearer Token",
      "password": true
    }
  ],
  "servers": {
    "modelslab-agents": {
      "type": "sse",
      "url": "https://modelslab.com/mcp/agents",
      "headers": {
        "Authorization": "Bearer ${input:modelslab-agent-token}"
      }
    }
  }
}

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:
mcp_config.json
{
  "mcpServers": {
    "modelslab-agents": {
      "serverUrl": "https://modelslab.com/mcp/agents",
      "transport": "sse",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_TOKEN"
      }
    }
  }
}

OpenCode

Edit opencode.json in your project root:
opencode.json
{
  "mcp": {
    "servers": {
      "modelslab-agents": {
        "type": "http",
        "url": "https://modelslab.com/mcp/agents",
        "headers": {
          "Authorization": "Bearer YOUR_AGENT_TOKEN"
        }
      }
    }
  }
}

Continue

Edit ~/.continue/config.json:
config.json
{
  "mcpServers": [
    {
      "name": "modelslab-agents",
      "transport": {
        "type": "http",
        "url": "https://modelslab.com/mcp/agents",
        "headers": {
          "Authorization": "Bearer YOUR_AGENT_TOKEN"
        }
      }
    }
  ]
}

Generic MCP Client

For any MCP-compatible client:
{
  "servers": {
    "modelslab-agents": {
      "transport": "http",
      "url": "https://modelslab.com/mcp/agents",
      "headers": {
        "Authorization": "Bearer YOUR_AGENT_TOKEN"
      }
    }
  }
}

Environment Variables

For security, use environment variables instead of hardcoding tokens:
Add to your shell profile (~/.bashrc, ~/.zshrc):
export MODELSLAB_AGENT_TOKEN="your_agent_token_here"
Then reference in config:
{
  "mcpServers": {
    "modelslab-agents": {
      "url": "https://modelslab.com/mcp/agents",
      "headers": {
        "Authorization": "Bearer ${MODELSLAB_AGENT_TOKEN}"
      }
    }
  }
}
Environment variable substitution support varies by client. Check your specific client’s documentation.

Verification

After configuring, verify the integration:

Test Connection

Ask your AI agent:
Check my ModelsLab profile using the agent control plane

Test Model Discovery

Search for realistic image generation models on ModelsLab

Check for Errors

If the integration is not working, check:
  1. Token: Ensure your bearer token is valid and not expired
  2. URL: Verify the endpoint is https://modelslab.com/mcp/agents
  3. Headers: Confirm the Authorization: Bearer format
  4. Client support: Ensure your MCP client supports HTTP/SSE transport

Troubleshooting

  • Your bearer token may have expired. Get a new one via agent-auth login
  • Ensure the header format is Bearer <token> (with space after Bearer)
  • Some actions (signup, login, forgot-password) don’t need a token
  • Restart your MCP client after configuration changes
  • Check the configuration file syntax (valid JSON)
  • Verify the config file is in the correct location
  • Verify the endpoint URL is correct
  • Check your network connection and firewall rules
  • API key: Used for generation endpoints (/mcp/v7). Get from dashboard or agent-api-keys tool
  • Bearer token: Used for control plane (/mcp/agents). Get from agent-auth login

Next Steps