{"id":51357917,"url":"https://github.com/aboubak-art/img-mcp","last_synced_at":"2026-07-02T21:00:57.158Z","repository":{"id":368902582,"uuid":"1287463078","full_name":"aboubak-art/img-mcp","owner":"aboubak-art","description":"An open-source Model Context Protocol (MCP) server that lets AI agents generate images. It currently supports Google's Nano Banana image-generation models (Gemini Flash Image) through the Gemini API.","archived":false,"fork":false,"pushed_at":"2026-07-02T19:00:36.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-02T19:16:58.261Z","etag":null,"topics":["ai","claude-code","image-generation","image-mcp","mcp","nano-banana"],"latest_commit_sha":null,"homepage":"https://aboubak-art.github.io/img-mcp/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aboubak-art.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-02T17:56:47.000Z","updated_at":"2026-07-02T19:03:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aboubak-art/img-mcp","commit_stats":null,"previous_names":["aboubak-art/img-mcp"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/aboubak-art/img-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboubak-art%2Fimg-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboubak-art%2Fimg-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboubak-art%2Fimg-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboubak-art%2Fimg-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aboubak-art","download_url":"https://codeload.github.com/aboubak-art/img-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aboubak-art%2Fimg-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35062691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","claude-code","image-generation","image-mcp","mcp","nano-banana"],"created_at":"2026-07-02T21:00:37.821Z","updated_at":"2026-07-02T21:00:57.149Z","avatar_url":"https://github.com/aboubak-art.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# img-mcp\n\n[![npm version](https://img.shields.io/npm/v/img-mcp.svg?style=flat-square)](https://www.npmjs.com/package/img-mcp)\n[![CI](https://img.shields.io/github/actions/workflow/status/aboubak-art/img-mcp/ci.yml?branch=main\u0026style=flat-square)](https://github.com/aboubak-art/img-mcp/actions/workflows/ci.yml)\n[![License](https://img.shields.io/github/license/aboubak-art/img-mcp?style=flat-square)](./LICENSE)\n\n📚 **[View the website](https://aboubak-art.github.io/img-mcp/)**\n\nAn open-source [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that lets AI agents generate images. It currently supports Google's **Nano Banana** image-generation models (Gemini Flash Image) through the Gemini API.\n\n## Features\n\n- **Text-to-image generation** via MCP tools\n- **Google Nano Banana** support (`gemini-3.1-flash-image`, `gemini-3.1-flash-lite-image`, `gemini-3-pro-image`, etc.)\n- **User-provided API key** — you bring your own Google API key\n- **Zero-install usage** with `npx img-mcp`\n- **Multiple aspect ratios and image sizes**\n\n## Installation\n\n### Via `npx` (recommended)\n\n```bash\nnpx -y img-mcp\n```\n\n### Via npm\n\n```bash\nnpm install -g img-mcp\nimg-mcp\n```\n\n## Configuration\n\nSet your Google API key as an environment variable:\n\n```bash\nexport GOOGLE_API_KEY=\"your-google-api-key\"\n```\n\nYou can get an API key from [Google AI Studio](https://aistudio.google.com/app/apikey).\n\n### Optional environment variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `GOOGLE_API_KEY` | Your Google Gemini API key | — |\n| `GOOGLE_IMAGE_MODEL` | Default Nano Banana model ID | `gemini-3.1-flash-image` |\n\n## Usage with MCP hosts\n\nAdd the server to your MCP host configuration (e.g., Claude Desktop, Cursor, or Windsurf):\n\n```json\n{\n  \"mcpServers\": {\n    \"img-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"img-mcp\"],\n      \"env\": {\n        \"GOOGLE_API_KEY\": \"your-google-api-key\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools\n\n### `generate_image`\n\nGenerates images from a text prompt.\n\n**Arguments**\n\n| Argument | Type | Required | Default | Description |\n|----------|------|----------|---------|-------------|\n| `prompt` | `string` | Yes | — | Text description of the image |\n| `model` | `string` | No | `gemini-3.1-flash-image` | Nano Banana model ID |\n| `n` | `number` | No | `1` | Number of images to generate (1–4) |\n| `aspect_ratio` | `string` | No | `1:1` | Aspect ratio (`1:1`, `16:9`, `9:16`, `3:2`, `2:3`, `4:3`, `3:4`, `4:5`, `5:4`, `21:9`) |\n| `image_size` | `string` | No | `1K` | Image size (`512px (05.K)`, `1K`, `2K`, `4K`) |\n| `output_path` | `string` | No | — | If provided, saves the first generated image to this path |\n\n**Example**\n\n```json\n{\n  \"prompt\": \"A futuristic city at sunset with flying cars\",\n  \"aspect_ratio\": \"16:9\",\n  \"image_size\": \"2K\",\n  \"n\": 1\n}\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run in development mode\nnpm run dev\n\n# Build\nnpm run build\n\n# Lint / type check\nnpm run lint\n```\n\n### Testing with the MCP Inspector\n\n```bash\nnpm run build\nnpx @modelcontextprotocol/inspector dist/index.js\n```\n\n## Provider: Google Nano Banana\n\nThis server uses the Gemini API [`interactions`](https://ai.google.dev/gemini-api/docs/image-generation) endpoint for Nano Banana models. You are responsible for your own API usage and costs.\n\n## License\n\n[MIT](./LICENSE)\n\n## Contributing\n\nContributions are welcome! Please open an issue or pull request on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboubak-art%2Fimg-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faboubak-art%2Fimg-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faboubak-art%2Fimg-mcp/lists"}