We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhongweili/nanobanana-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
# Nano Banana MCP Server - Documentation Index
**Version:** 0.1.4
**Status:** Production Ready
**Package:** `nanobanana-mcp-server`
A production-ready Model Context Protocol (MCP) server for AI-powered image generation using Google's Gemini 2.5 Flash Image model.
## π Quick Navigation
### π Getting Started
- **[README.md](../README.md)** - Installation and client configuration
- **[CLAUDE.md](../CLAUDE.md)** - Claude Code development guidance
### π Core Documentation
- **[API Specification](API_SPECIFICATION.md)** - Complete API reference
- **[System Design](SYSTEM_DESIGN.md)** - Architecture and design patterns
- **[Component Design](COMPONENT_DESIGN.md)** - Detailed component documentation
### π§ Development
- **[Implementation Plan](IMPLEMENTATION_PLAN.md)** - Development roadmap and milestones
- **[FastMCP Skeleton](fastmcp-skeleton.md)** - FastMCP integration guide
- **[Workflows](workflows.md)** - Development workflows and processes
### π¦ Publishing
- **[Publishing Workflow](PUBLISHING_WORKFLOW.md)** - Complete publishing guide
- **[PyPI Upload Guide](PYPI_UPLOAD_GUIDE.md)** - PyPI deployment instructions
## ποΈ Project Structure
### Package Layout
```
nanobanana_mcp_server/
βββ __init__.py # Package entry point (v0.1.4)
βββ server.py # Main server implementation
βββ config/ # Configuration management
β βββ settings.py # Server and API settings
β βββ constants.py # Application constants
βββ core/ # Core functionality
β βββ server.py # FastMCP server setup
β βββ exceptions.py # Custom exceptions
β βββ validation.py # Input validation
β βββ progress_tracker.py # Progress tracking
βββ services/ # Business logic services
β βββ __init__.py # Service registry
β βββ gemini_client.py # Gemini API wrapper
β βββ *_image_service.py # Image processing services
β βββ file_service.py # File management
β βββ maintenance_service.py # System maintenance
βββ tools/ # MCP tools implementation
β βββ generate_image.py # Image generation tool
β βββ upload_file.py # File upload tool
β βββ output_stats.py # Statistics tool
β βββ maintenance.py # Maintenance tool
βββ resources/ # MCP resources
β βββ file_metadata.py # File metadata resource
β βββ stored_images.py # Image storage resource
β βββ template_catalog.py # Template catalog
β βββ operation_status.py # Operation status
βββ prompts/ # Prompt templates
β βββ photography.py # Photography templates
β βββ design.py # Design templates
β βββ editing.py # Image editing templates
βββ utils/ # Utility functions
βββ image_utils.py # Image processing utilities
βββ logging_utils.py # Logging configuration
βββ validation_utils.py # Validation helpers
```
### Configuration Files
```
βββ pyproject.toml # Project configuration and dependencies
βββ fastmcp.json # FastMCP CLI configuration
βββ ruff.toml # Code linting configuration
βββ uv.lock # Dependency lock file
```
### Scripts & Tools
```
scripts/
βββ build.py # Automated build script
βββ upload.py # PyPI upload script
```
## π MCP Integration
### Available Tools
| Tool | Description | Status |
|------|-------------|---------|
| `generate_image` | AI image generation from prompts | β
Active |
| `upload_file` | File upload to Gemini Files API | β
Active |
| `output_stats` | Image storage statistics | β
Active |
| `maintenance` | System maintenance operations | β
Active |
### Available Resources
| Resource | URI Pattern | Description |
|----------|-------------|-------------|
| File Metadata | `gemini://files/{name}` | Gemini Files API metadata |
| Stored Images | `file://images/{id}` | Generated image access |
| Image Thumbnails | `file://images/{id}/thumbnail` | Image thumbnail access |
| Template Catalog | `nano-banana://prompt-templates` | Prompt template browser |
| Operation Status | `nano-banana://operations` | Server operation status |
### Prompt Templates
| Template | Module | Purpose |
|----------|---------|---------|
| `photorealistic_shot` | photography.py | High-quality photography |
| `product_shot` | photography.py | E-commerce product photos |
| `logo_text` | design.py | Logo design with text |
| `sticker_flat` | design.py | Flat design illustrations |
| `iterative_edit_instruction` | editing.py | Precise image editing |
| `composition_and_style_transfer` | editing.py | Artistic style transfer |
## π οΈ Technical Stack
### Core Dependencies
- **FastMCP** (β₯2.11.0) - MCP server framework
- **Google GenAI** (β₯0.3.0) - Gemini API integration
- **Pillow** (β₯10.4.0) - Image processing
- **Pydantic** (β₯2.0.0) - Data validation
- **Python-dotenv** (β₯1.0.1) - Environment management
### Development Tools
- **uv** - Modern Python package management
- **Ruff** - Fast Python linter and formatter
- **MyPy** - Static type checking
- **Pytest** - Testing framework
### Build System
- **Hatchling** - Modern Python build backend
- **Twine** - PyPI package uploading
- **Build** - PEP 517 build frontend
## π Project Metrics
### Package Information
- **Total Python Files:** 40+
- **Package Size:** ~260KB (wheel + source)
- **Supported Python:** 3.11+
- **License:** MIT
- **Development Status:** Alpha (Production Ready)
### Documentation Coverage
| Category | Files | Status |
|----------|-------|---------|
| API Documentation | 3 | β
Complete |
| System Design | 2 | β
Complete |
| User Guides | 2 | β
Complete |
| Development Guides | 3 | β
Complete |
| Publishing Guides | 2 | β
Complete |
## π Version History
### v0.1.4 (Latest) - Comprehensive Import Fixes
- β
Fixed all absolute imports to relative imports
- β
Restructured to proper package layout
- β
Added automated PyPI publishing workflow
- β
Streamlined README with client configurations
### v0.1.3 - Import Fixes
- β
Fixed service import issues
- β
Updated resource handlers
### v0.1.2 - Directory Fixes
- β
Fixed read-only filesystem issues
- β
Improved default directory handling
### v0.1.1 - Initial Package
- β
Basic MCP server functionality
- β
Image generation tools
## π Development Status
### β
Completed Features
- Production-ready MCP server
- Comprehensive image generation capabilities
- File management and storage
- Template system with 6+ templates
- Error handling and logging
- PyPI package publishing
- Multi-client configuration support
### π In Progress
- Enhanced documentation
- Performance optimization
- Additional prompt templates
### π Planned Features
- Image editing capabilities expansion
- Batch processing tools
- Advanced template customization
- Performance monitoring
## π Support & Resources
- **Issues:** [GitHub Issues](https://github.com/zhongweili/nanobanana-mcp-server/issues)
- **Discussions:** [GitHub Discussions](https://github.com/zhongweili/nanobanana-mcp-server/discussions)
- **Package:** [PyPI Package](https://pypi.org/project/nanobanana-mcp-server/)
---
*Last updated: December 2024 | Version 0.1.4*