Back to Home
shinpr icon

mcp-image

Verified Safe

by shinpr

Overview

AI image generation and editing using Google Gemini 3 Pro Image (Nano Banana Pro), with intelligent prompt optimization using Gemini 2.0 Flash, integrated as an MCP server for AI assistants like Codex, Cursor, and Claude Code.

Installation

Run Command
npx -y mcp-image

Environment Variables

  • GEMINI_API_KEY
  • IMAGE_OUTPUT_DIR
  • SKIP_PROMPT_ENHANCEMENT

Security Notes

The server includes a dedicated `SecurityManager` to prevent common file-related vulnerabilities like path traversal (`..`), null byte injection (`\0`), and ensures file operations are confined to allowed directories (current working directory, IMAGE_OUTPUT_DIR, /tmp). Input parameters are extensively validated (prompt length, image size up to 10MB, supported MIME types, aspect ratios). Environment variables, including the API key, are securely loaded, and sensitive data is actively redacted in logs. External API calls to Google's Gemini are handled with comprehensive error management. No `eval` or code obfuscation was detected.

Similar Servers

Stats

Interest Score45
Security Score9
Cost ClassMedium
Avg Tokens1000
Stars25
Forks8
Last Update2025-12-05

Tags

AI Image GenerationImage EditingPrompt EngineeringGoogle Gemini APIMCP Server