images-mcp
Provides image generation tools powered by OpenRouter, running on Cloudflare Workers.
README
gemini-image-mcp
An MCP server that provides image generation tools powered by OpenRouter. Runs on Cloudflare Workers.
Tools
generate_image
Generate an image from a text prompt.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt |
string | yes | Image description (max 1500 chars) |
aspect_ratio |
string | no | 1:1 (default), 16:9, 9:16, 4:3, or 3:4 |
style |
string | no | photorealistic, digital art, line drawing, or diagram |
model |
string | no | OpenRouter image model (default: black-forest-labs/flux.2-klein-4b) |
Setup
1. Get an OpenRouter API key
Create an API key at OpenRouter.
2. Configure your MCP client
Add the server to your MCP configuration file (e.g. ~/.claude/mcp.json for Claude Code, claude_desktop_config.json for Claude Desktop):
{
"mcpServers": {
"gemini": {
"type": "url",
"url": "https://gemini.mcp.nqs.io?apiKey=YOUR_OPENROUTER_API_KEY"
}
}
}
Replace YOUR_OPENROUTER_API_KEY with your actual OpenRouter API key.
Self-hosting
If you'd prefer to deploy your own instance instead of using the hosted version:
Prerequisites
- Node.js >= 20
- A Cloudflare account
- An OpenRouter API key
Deploy
-
Clone the repo and install dependencies:
git clone https://github.com/nqs/gemini-images-mcp.git cd gemini-images-mcp npm install -
Set your OpenRouter API key as a Wrangler secret:
npx wrangler secret put OPENROUTER_API_KEY # Paste your OpenRouter API key when prompted -
Update
wrangler.tomlwith your own domain or remove theroutessection to use the default*.workers.devsubdomain. -
Deploy with Wrangler:
npx wrangler deployOr push to
mainto trigger the included GitHub Actions workflow (requiresCLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_IDsecrets). -
Point your MCP config at your deployed URL:
{ "mcpServers": { "gemini": { "type": "url", "url": "https://your-worker.your-subdomain.workers.dev?apiKey=YOUR_OPENROUTER_API_KEY" } } }
Local development
export OPENROUTER_API_KEY="your-openrouter-key-here"
npm run dev # starts server with file watcher
npm test # runs the test suite
Image Generation Model
This server uses black-forest-labs/flux.2-klein-4b via OpenRouter for image generation by default. You can specify a different model via the model parameter in the generate_image tool call.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.