Gemini MCP Server
Provides tools for generating text and images using Google's Gemini and Imagen models, with configurable prompts, system instructions, and generation parameters.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gemini MCP ServerGenerate an image of a lighthouse at sunset and save it to /home/user/gemini-images"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Gemini MCP Server
A general-purpose MCP server that uses the Google Gemini API to generate text and images (Imagen).
Generated images are returned as local absolute paths (the image data itself is not included in the tool call result).
The intended use is as the first stage of a two-step flow: pass the saved file to ftp_upload_file in ftp-mcp to make it a public URL, then register it in the WordPress media library with wp_upload_media_from_url in wp-mcp.
Text generation results are returned directly as the tool call result.
1. Setup
cd gemini-mcp
npm installCopy config.json.example to config.json and enter the API key issued by Google AI Studio ( https://aistudio.google.com/apikey )
(This file contains an API key, so never publish, share, or commit it to Git.
It is included in .gitignore).
cp config.json.example config.json{
"api_key": "AIza................................",
"default_text_model": "gemini-2.5-flash",
"default_image_model": "imagen-4.0-generate-001"
}api_key: The API key issued by Google AI Studio.default_text_model: The model ID used when themodelparameter ofgenerate_textis omitted.default_image_model: The model ID used when themodelparameter ofgenerate_imageis omitted.
The model lineup is updated from time to time in Google's official documentation, so check the latest model IDs at https://ai.google.dev/gemini-api/docs/models (text) / https://ai.google.dev/gemini-api/docs/imagen (image).
The server itself can start even if the API key is not set (left as a placeholder). When you actually call
generate_text / generate_image, you will get an authentication error from Google.
Related MCP server: MCP Nano Banana
2. Registering with Claude Code
Add the MCP server information to .mcp.json in the root folder of the project that uses Claude Code.
{
"mcpServers": {
"gemini": {
"command": "node",
"args": ["/MCPの保存パス/gemini-mcp/index.js"],
"env": {
"GEMINI_MCP_CONFIG_PATH": "/MCPの保存パス/gemini-mcp/config.json"
}
}
}
}After registering, restart the Claude Code session to reload the MCP server.
3. Provided Tools
gemini_check_config— Checks whether the API key is set and the default model names (does not call the API).generate_text— Generates text for a prompt and returns it as is.prompt(required): The input prompt.system_instruction(optional): A system instruction that specifies the overall behavior of the model.temperature(optional, 0–2): The randomness of the output.model(optional): A model ID that overridesdefault_text_model.Return value: The generation model name and generated text.
generate_image— Generates an image from a text prompt and saves it as PNG/JPEG in the specified local folder.prompt(required): A description of the image you want to generate.output_dir(required): The absolute path of the destination directory (created automatically if it does not exist).file_prefix(optional, defaultimage): The prefix of the saved file name.number_of_images(optional, default 1, max 4): The number of images to generate.aspect_ratio(optional, default1:1):1:1/3:4/4:3/9:16/16:9.negative_prompt(optional): Elements you do not want included.model(optional): A model ID that overridesdefault_image_model.Return value: The generation model name, prompt, absolute path/MIME type of each saved file, etc.
Notes
The dependency library is Google's official
@google/genaiSDK.If a request is blocked by the safety filter, or if the response contains no content, it is returned as an error.
For image generation use cases (article eye-catch images, in-body images, etc.) and how to reflect them in the article body, see
docs/tasks/eyecatch-image.md/docs/tasks/image-embed.md(on each project side).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables image processing and analysis using Google's Gemini 2.5 Flash model. Supports local files, URLs, and Base64 images with streaming responses and automatic output saving.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables image generation using the Google Gemini API through a simple text prompt. Generated images are saved locally and hosted online via ImgBB for easy access and sharing.9
- AlicenseNot gradedqualityNot gradedmaintenanceEnables image generation using Google's Gemini 2 API with customizable parameters like aspect ratio, number of samples, and person generation settings.189
- AlicenseBqualityDmaintenanceEnables image generation using Google Gemini models like Gemini 2.0 Flash and Imagen 3.0 with support for custom aspect ratios and negative prompts. It also allows users to list and manage generated images stored in local directories.225MIT
Related MCP Connectors
LLM chat, text summarization and AI image generation
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
Generate images, video & speech with Nano Banana, Veo, Omni and Gemini TTS. Pay as you go.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nao9net/gemini-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server