
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
nano-banana-mcp-s3
Advanced tools
MCP server for Google's Gemini 2.5 Flash Image generation API with AWS S3 cloud storage support
Enhanced fork with AWS S3 cloud storage support
A Model Context Protocol (MCP) server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API with automatic AWS S3 cloud storage integration. Generate stunning images, edit existing ones, and store them directly in your S3 bucket.
Get your Gemini API key:
Configure the MCP server: See configuration examples for your specific client below (Claude Code, Cursor, or other MCP clients).
Add this to your Claude Code MCP settings:
Option A: With S3 Integration (Recommended for cloud storage)
{
"mcpServers": {
"nano-banana-s3": {
"command": "npx",
"args": ["nano-banana-mcp-s3"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"S3_BUCKET": "your-bucket-name",
"S3_REGION": "eu-central-1",
"S3_ACCESS_KEY_ID": "your-access-key-id",
"S3_SECRET_ACCESS_KEY": "your-secret-access-key",
"S3_PUBLIC_URL": "https://your-cloudfront-or-custom-domain.com"
}
}
}
}
Option B: Local storage only (no S3)
{
"mcpServers": {
"nano-banana-s3": {
"command": "npx",
"args": ["nano-banana-mcp-s3"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}
}
Note on S3 Configuration:
S3_PUBLIC_URL is optional - if not provided, standard S3 URLs will be generatedS3_SESSION_TOKEN is also supported for temporary AWS credentialsGenerate an image of a sunset over mountains
Edit this image to add some birds in the sky
Continue editing to make it more dramatic
Add to your Cursor MCP configuration:
Option A: With S3 Integration
{
"nano-banana-s3": {
"command": "npx",
"args": ["nano-banana-mcp-s3"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"S3_BUCKET": "your-bucket-name",
"S3_REGION": "eu-central-1",
"S3_ACCESS_KEY_ID": "your-access-key-id",
"S3_SECRET_ACCESS_KEY": "your-secret-access-key"
}
}
}
Option B: Local storage only
{
"nano-banana-s3": {
"command": "npx",
"args": ["nano-banana-mcp-s3"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here"
}
}
}
If you're using a different MCP client, you can configure nano-banana-mcp-s3 using any of these methods:
Method A: Environment Variable in MCP Config (Recommended)
{
"nano-banana-s3": {
"command": "npx",
"args": ["nano-banana-mcp-s3"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"S3_BUCKET": "your-bucket-name",
"S3_REGION": "eu-central-1",
"S3_ACCESS_KEY_ID": "your-access-key-id",
"S3_SECRET_ACCESS_KEY": "your-secret-access-key"
}
}
}
Method B: System Environment Variable
export GEMINI_API_KEY="your-gemini-api-key-here"
export S3_BUCKET="your-bucket-name"
export S3_REGION="eu-central-1"
export S3_ACCESS_KEY_ID="your-access-key-id"
export S3_SECRET_ACCESS_KEY="your-secret-access-key"
npx nano-banana-mcp-s3
Method C: Using the Configure Tool
npx nano-banana-mcp-s3
# The server will prompt you to configure when first used
# This creates a local .nano-banana-config.json file
generate_imageCreate a new image from a text prompt.
generate_image({
prompt: "A futuristic city at night with neon lights"
})
edit_imageEdit a specific image file.
edit_image({
imagePath: "/path/to/image.png",
prompt: "Add a rainbow in the sky",
referenceImages?: ["/path/to/reference.jpg"] // optional
})
continue_editingContinue editing the last generated/edited image.
continue_editing({
prompt: "Make it more colorful",
referenceImages?: ["/path/to/style.jpg"] // optional
})
get_last_image_infoGet information about the last generated image.
get_last_image_info()
configure_gemini_tokenConfigure your Gemini API key.
configure_gemini_token({
apiKey: "your-gemini-api-key"
})
get_configuration_statusCheck if the API key is configured.
get_configuration_status()
The MCP server loads your API key in the following priority order:
🥇 MCP Configuration Environment Variables (Highest Priority)
claude_desktop_config.json or MCP client config"env": { "GEMINI_API_KEY": "your-key" }🥈 System Environment Variables
export GEMINI_API_KEY="your-key"🥉 Local Configuration File (Lowest Priority)
configure_gemini_token tool.nano-banana-config.json in current directory💡 Recommendation: Use Method 1 (MCP config env variables) for the best security and convenience.
When S3 credentials are configured, images are automatically uploaded to your S3 bucket:
S3_PUBLIC_URLWhen S3 is not configured, images are saved locally to platform-appropriate locations:
%USERPROFILE%\\Documents\\nano-banana-images\\~/nano-banana-images/File naming convention:
generated-[timestamp]-[id].pngedited-[timestamp]-[id].pngfileName parameter to specify your own namesgenerate_image - Create your base imagecontinue_editing - Refine and improvecontinue_editing - Add final touchesgenerate_image - Create base contentedit_image - Use reference images for stylecontinue_editing - Fine-tune the resultgenerate_image - Start with a conceptget_last_image_info - Check current statecontinue_editing - Make adjustmentsRun the server as a REST API for remote access:
# Using npm
npm run start:http
# Using environment variables
PORT=3031 HOST=0.0.0.0 GEMINI_API_KEY=your-key npm run start:http
# Development mode
npm run dev:http
GET /health - Health checkGET /tools - List available MCP toolsPOST /mcp - MCP JSON-RPC endpointThe project includes Docker and AWS ECS configuration for production deployment.
This project is an enhanced fork with S3 support, built with:
# Clone the repository
git clone https://github.com/sirio-admin/nano-banana-mcp-s3.git
cd nano-banana-mcp-s3
# Install dependencies
npm install
# Run in development mode (MCP server)
npm run dev
# Run in HTTP server mode
npm run dev:http
# Build for production
npm run build
# Run tests
npm test
This is an enhanced fork of the original nano-banana-mcp with the following additions:
Contributions are welcome! Please feel free to:
MIT License - see LICENSE file for details.
☁️ Enhanced with AWS S3 integration by sirio-admin
FAQs
MCP server for Google's Gemini 2.5 Flash Image generation API with AWS S3 cloud storage support
The npm package nano-banana-mcp-s3 receives a total of 925 weekly downloads. As such, nano-banana-mcp-s3 popularity was classified as not popular.
We found that nano-banana-mcp-s3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.