MCP server for Midjourney image generation via ImagineAPI
Project description
midjourney-proxy-mcp
MCP server for ImagineAPI - generate Midjourney images from Claude, Cursor, and other AI tools.
Features
- Generate Midjourney images via ImagineAPI
- Query image generation status and results
- List recent generations with filtering
- Access generation statistics via MCP resources
Installation
# Using uvx (recommended)
uvx midjourney-proxy-mcp
# Using pip
pip install midjourney-proxy-mcp
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
IMAGINEAPI_URL |
ImagineAPI base URL | https://cl.imagineapi.dev |
IMAGINEAPI_TOKEN |
API authentication token | (required) |
Get your API token from ImagineAPI.
Claude Desktop
Add to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"midjourney": {
"command": "uvx",
"args": ["midjourney-proxy-mcp"],
"env": {
"IMAGINEAPI_URL": "https://your-imagineapi.com",
"IMAGINEAPI_TOKEN": "your-api-token"
}
}
}
}
Claude Code
claude mcp add midjourney --env IMAGINEAPI_TOKEN=your-api-token -- uvx midjourney-proxy-mcp
Or add manually to ~/.claude/settings.json:
{
"mcpServers": {
"midjourney": {
"command": "uvx",
"args": ["midjourney-proxy-mcp"],
"env": {
"IMAGINEAPI_TOKEN": "your-api-token"
}
}
}
}
Alternatively, create a .env file in your working directory:
IMAGINEAPI_TOKEN=your-api-token
Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"midjourney": {
"command": "uvx",
"args": ["midjourney-proxy-mcp"],
"env": {
"IMAGINEAPI_URL": "https://your-imagineapi.com",
"IMAGINEAPI_TOKEN": "your-api-token"
}
}
}
}
Tools
| Tool | Description |
|---|---|
midjourney_imagine |
Generate an image from a prompt (supports Midjourney syntax like --ar 16:9) |
midjourney_get_status |
Get generation status including progress, URLs, and upscaled images |
midjourney_list_images |
List recent generations with optional status filter |
Tool Examples
Generate an image:
midjourney_imagine(prompt="A futuristic city at sunset --ar 16:9 --v 7")
Check status:
midjourney_get_status(image_id="abc123")
List recent images:
midjourney_list_images(limit=10, status="completed")
Resources
| Resource URI | Description |
|---|---|
midjourney://generations |
List all recent generations |
midjourney://generations/{status} |
Filter generations by status (pending, in-progress, completed, failed) |
midjourney://generation/{id} |
Get details for a specific generation |
midjourney://stats |
Get generation statistics (total count, status breakdown, completion rate) |
Image Status Flow
pending- Request received, queued for processingin-progress- Midjourney is generating (progress percentage available)completed- Done,upscaled_urlscontains 4 upscaled imagesfailed- Error occurred, checkerrorfield
Development
# Install dependencies
uv sync
# Run tests
uv run pytest
# Run tests with coverage
uv run pytest --cov=midjourney_proxy_mcp
# Type checking
uv run mypy src/
# Linting
uv run ruff check src/ tests/
# Format code
uv run ruff format src/ tests/
# Run server locally
uv run midjourney-proxy-mcp
Related
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file midjourney_proxy_mcp-0.2.0.tar.gz.
File metadata
- Download URL: midjourney_proxy_mcp-0.2.0.tar.gz
- Upload date:
- Size: 375.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6c44852648dec317e70d3c7636debe4314c459b05db349707ff5b89489df067
|
|
| MD5 |
ae47512c6bbf9dfb4684a21220fe5513
|
|
| BLAKE2b-256 |
d9f649cf8bf5ff4e7f3476ac8007538a11d0034eee04c2642f04bf7f30a8e7a6
|
File details
Details for the file midjourney_proxy_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: midjourney_proxy_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5932f7759902efd13436fa102ca22f7c6529c8d4fae4bd6ff9b05b0d0c52a024
|
|
| MD5 |
b1ccc94103fc975cf60aae50ae00721b
|
|
| BLAKE2b-256 |
3039f12c477873871b4eb071ec77b7e626cb2563d919d5c406ec32a8417fdbd0
|