Get the FREE Ultimate OpenClaw Setup Guide →

imagen-3.0-generate-google

MCP server from falahgs/imagen-3.0-generate-google-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio falahgs-imagen-3.0-generate-google-mcp-server node ./build/index.js \
  --env GEMINI_API_KEY="your-gemini-api-key"

How to use

This MCP server exposes an integration with Google's Imagen 3.0 model via the Gemini API. It implements the MCP protocol so you can send requests from Claude Desktop or any MCP-compatible host to generate images and create HTML previews. The server supports up to four images per generation request and handles file management and HTML preview creation for convenient viewing. To use it, run the server with your Gemini API key configured in the environment, then connect a client (such as Claude Desktop) to the server using the MCP interface and the provided server name (imagen-3.0-generate-google). You can call the available tools to generate images and to produce HTML previews of those images.

How to install

Prerequisites:

  • Node.js 18 or higher
  • npm (comes with Node.js)
  • Gemini API key

Installation steps:

  1. Clone the repository: git clone https://github.com/yourusername/gemini-imagen-mcp-server.git cd gemini-imagen-mcp-server

  2. Install dependencies: npm install

  3. Build the TypeScript code (if applicable): npm run build

  4. Run the server locally (ensure GEMINI_API_KEY is set): GEMINI_API_KEY=your-gemini-api-key node ./build/index.js

Note: If you prefer, you can set the environment variable in a .env file or your hosting environment as appropriate.

Additional notes

Tips:

  • Ensure your Gemini API key is valid and active; the server will fail requests without a valid key.
  • The server saves generated images to a local directory and names files using a sanitized prompt with a timestamp to avoid collisions. Ensure the host filesystem has write permissions to that directory.
  • If you see tool_not_found or execution_error, verify that the server process is running and that the MCP host is configured to address imagen-3.0-generate-google.
  • You can adjust the numberOfImages parameter (1-4) on generate_images calls to control how many images are produced per request.
  • For HTML previews, the server returns image tag snippets using file:// URLs suitable for local viewing.
  • If you deploy behind a reverse proxy or in a container, ensure the working directory and file paths referenced by the server remain accessible.

Related MCP Servers

Sponsor this space

Reach thousands of developers