Prerequisites
Before installing the ModelsLab MCP Server, ensure you have:- Python 3.7+ installed on your system
- Claude Desktop application installed
- ModelsLab account with API access
- Git for cloning the repository
Step 1: Clone the Repository
First, clone the ModelsLab MCP Server repository to your local machine:bash
bash
Step 2: Get Your API Key
- Visit the ModelsLab Portal
- Log in to your account
- Navigate to the API Keys section
- Generate a new API key or copy your existing one
- Keep this key secure - you’ll need it for configuration
Step 3: Create Configuration File
Create the Claude Desktop configuration file in the appropriate location:For macOS:
bash
For Windows:
bash
Step 4: Configure the MCP Server
Add the following configuration to yourclaude_desktop_config.json
file:
claude_desktop_config.json
Configuration Parameters:
Parameter | Description | Example |
---|---|---|
command | Python executable path | python or python3 |
args | Path to the cloned repository | "/Users/username/modelslab-mcp" |
IMAGE_STORAGE_DIRECTORY | Where to save generated images | "/Users/username/Pictures/ModelsLab" |
MODELSLAB_API_KEY | Your ModelsLab API key | "ml-abc123..." |
Step 5: Update Paths
Replace the placeholder paths with your actual paths:Example for macOS:
claude_desktop_config.json
Example for Windows:
claude_desktop_config.json
Step 6: Restart Claude Desktop
- Completely quit Claude Desktop (not just minimize)
- Reopen Claude Desktop
- The MCP server should now be available
Verification
To verify the installation worked:- Open a new conversation in Claude Desktop
- Try generating an image with a command like:
- If successful, you should see the generated image and it will be saved to your specified directory