Gemini Image Generation MCP
Remote MCP server that exposes a generate_image tool allowing Claude to generate images via the Google Gemini API.
README
Conector MCP — Generación de imágenes con Gemini
Servidor MCP remoto en Node.js/TypeScript que expone la herramienta generate_image para que Claude (claude.ai) genere imágenes usando la API de Google Gemini.
Requisitos
- API key de Google AI Studio: crea una gratis en https://aistudio.google.com/apikey
- Node.js 20+ (para probar en local)
- Una cuenta de hosting que soporte Node.js: Render, Railway, Fly.io o Google Cloud Run. Render tiene plan gratuito y es el más sencillo.
Prueba en local
npm install
cp .env.example .env # edita .env con tu API key
npm run dev
El endpoint queda en http://localhost:3000/mcp/TU_SECRETO (POST). Verifica salud en http://localhost:3000/health.
Puedes probarlo con MCP Inspector:
npx @modelcontextprotocol/inspector
# Transport: Streamable HTTP
# URL: http://localhost:3000/mcp/TU_SECRETO
Despliegue en Render (gratis)
- Sube este proyecto a un repositorio de GitHub.
- En https://render.com crea un Web Service apuntando al repo.
- Configuración:
- Build command:
npm install && npm run build - Start command:
npm start - Environment variables:
GEMINI_API_KEY= tu key de AI StudioMCP_SECRET= un texto aleatorio largo (ej. genera uno conopenssl rand -hex 12)
- Build command:
- Render te da una URL tipo
https://gemini-mcp-xxxx.onrender.com.
Tu endpoint MCP final será:
https://gemini-mcp-xxxx.onrender.com/mcp/TU_SECRETO
Nota: en el plan gratuito de Render el servicio "duerme" tras 15 min de inactividad; la primera petición puede tardar ~30-50 segundos en despertar.
Conectar en claude.ai
- Ve a Configuración → Conectores (Settings → Connectors).
- Clic en Agregar conector personalizado (Add custom connector).
- Nombre:
Gemini Imágenes— URL: tu endpoint MCP completo (con el secreto). - Guarda. Al iniciar un chat, activa el conector en el menú de herramientas.
- Pídele a Claude: "Genera una imagen de un paisaje cafetero de Ebéjico al atardecer" — Claude llamará a
generate_imagey te mostrará el resultado.
Seguridad
- El
MCP_SECRETen la ruta evita que cualquiera que descubra tu dominio consuma tu cuota de la API de Gemini. No lo compartas ni lo subas a GitHub (usa variables de entorno). - La API key de Gemini nunca sale del servidor; Claude solo ve la herramienta.
- Si sospechas que el secreto se filtró, cámbialo en las variables de entorno y actualiza la URL del conector.
Cambiar de modelo
Por defecto usa gemini-2.0-flash-preview-image-generation. Si Google publica un modelo nuevo (o quieres usar Imagen), cambia la variable GEMINI_IMAGE_MODEL. Verifica los modelos disponibles para tu key en https://ai.google.dev/gemini-api/docs/models
Estructura
gemini-mcp/
├── src/index.ts # Servidor Express + MCP + llamada a Gemini
├── package.json
├── tsconfig.json
└── .env.example
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.
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.
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.
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.