Files
mcp-img-gen/README.md
T

50 lines
1.0 KiB
Markdown

# mcp-img-gen
Self-hosted MCP server for image generation via OpenRouter.
## Tools
- `generate_image(prompt, model?, aspect?)` — generates an image, saves to `/app/generated-images/`
- `list_image_models()` — returns ~35 image-capable models (1h cache)
## Endpoints
- `/mcp` — MCP Streamable HTTP transport (Bearer-auth required)
- `/health` — liveness probe (no auth)
## Auth
Required on every `/mcp*` request:
```
Authorization: Bearer $MCP_TOKEN
```
## Riverflow note
Sourceful Riverflow models (`sourceful/riverflow-*`) live on `/api/v1/images`
instead of `/chat/completions` — server branches automatically by model id.
## Deploy (Coolify)
Build pack: Dockerfile (default). Port `8935` exposed on the container.
Env vars required:
- `OPENROUTER_API_KEY`
- `MCP_TOKEN`
Volume: `/app/generated-images` (persistent).
## Client config
```json
{
"mcpServers": {
"img-gen": {
"url": "https://<host>.193.43.72.4.sslip.io/mcp",
"headers": { "Authorization": "Bearer <MCP_TOKEN>" }
}
}
}
```