Back to Home
lordmoocow icon

gemini-image-mcp

by lordmoocow

Overview

This server provides an MCP (Multi-Component Platform) interface for generating images using Google's Gemini 3 Pro Image model.

Installation

Run Command
export PYTHONPATH="/workspaces/website/nano-banana-mcp-server/src:$PYTHONPATH" && export PATH="/workspaces/website/nano-banana-mcp-server/.venv/bin:$PATH" && /workspaces/website/nano-banana-mcp-server/.venv/bin/python -c "import sys; sys.path.insert(0, '/workspaces/website/nano-banana-mcp-server/src'); import asyncio; from nano_banana_mcp import server; asyncio.run(server.main())"

Environment Variables

  • GOOGLE_API_KEY

Security Notes

The `call_tool` function allows users to specify an arbitrary `file_path` for saving generated images. This path is used directly with `pathlib.Path(file_path)` and `path.write_bytes()`. This presents a significant directory traversal vulnerability, as a malicious user could specify paths like `../../../../tmp/malicious.png` to write files to arbitrary locations on the server's filesystem, potentially overwriting critical files or planting malicious executables, especially if the server runs with elevated permissions. The `path.resolve()` call occurs after the file write and only resolves the path for reporting, not for preventing the write itself. No input sanitization for `file_path` is evident.

Similar Servers

Stats

Interest Score0
Security Score4
Cost ClassMedium
Avg Tokens250
Stars0
Forks0
Last Update2025-11-25

Tags

Image GenerationGeminiGoogle AIMCP ServerAI & ML