Provides tools for interacting with the Google Gemini API to perform image editing workflows, including starting, continuing, and finalizing image edits based on natural language instructions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gemini Streamable HTTP MCPEdit this photo to add a simple red circle on a white background"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gemini-3-pro-mcp-streamable-http-mcp
A Docker-based deployment that wraps the RLabs-Inc/gemini-mcp stdio MCP server with supergateway to expose it over Streamable HTTP. Includes a Python test suite that validates the full image-edit workflow end-to-end.
Architecture
supergateway spawns gemini-mcp as a child process, speaks MCP over stdio with it, and re-exposes every tool over a single Streamable HTTP endpoint at /mcp.
Prerequisites
Docker
Python 3.10+ (for running the tests)
Quick Start
Build the image
Run the container
The MCP server is now available at http://localhost:8000/mcp.
Connect from any MCP client
Any client that supports Streamable HTTP transport can connect. For example, with the MCP Python SDK:
File Reference
File | Purpose |
| Builds the container image: installs |
| Pytest test suite that builds the image, starts a container, connects via the MCP Python SDK, and exercises the image-edit workflow. |
| Python dependencies for the test suite. |
Dockerfile
Layer | What it does |
| Minimal Node.js 22 runtime. |
| Pre-installs both packages so startup is fast (no |
| Declares the variable; the actual key is injected at |
| Documents the listening port. |
| Launches supergateway, which spawns |
Test Suite
Dependencies
Install with:
Package | Role |
| Official MCP Python SDK -- provides |
| Test runner. |
| Enables |
| Image validation (format detection, integrity check via |
| Python Docker SDK -- builds images, manages container lifecycle. |
Running the tests
The test suite is fully self-contained: it builds the Docker image, starts the container, runs the tests, and tears the container down afterward.
Fixtures
Fixture | Scope | Description |
| session | Reads |
| session | Creates a Docker SDK client from the local Docker daemon. |
| session | Builds the image, removes stale containers, starts a fresh container on port 18000, polls until the TCP port is accepting connections, yields the container, and force-removes it on teardown. |
Tests
test_list_tools
Connects to the MCP server and verifies that the expected image-edit tools are exposed:
gemini-start-image-editgemini-continue-image-editgemini-end-image-edit
test_image_edit_workflow
End-to-end image editing round-trip:
Start session -- calls
gemini-start-image-editwith a prompt ("a simple red circle on a white background"), asserts anImageContentandTextContentblock are returned, extracts the session ID.Apply edit -- calls
gemini-continue-image-editwith the session ID and an edit instruction ("change the red circle to a blue star"), asserts a new image is returned.Download -- base64-decodes the image data and writes it to a temp file.
Validate -- opens the bytes with Pillow, calls
verify()to check integrity, asserts width/height > 0 and format is PNG/JPEG/WEBP/GIF. Also validates the file written to disk.Close session -- calls
gemini-end-image-editto clean up the server-side session.
Configuration constants
Constant | Default | Purpose |
|
| Docker image tag used during the test run. |
|
| Container name (allows cleanup of stale runs). |
|
| Host port mapped to container port 8000. |
|
| Full MCP endpoint URL. |
|
| Max seconds to wait for the container to accept TCP connections. |
|
| Read timeout (seconds) for individual MCP tool calls to the Gemini API. |
Environment Variables
Variable | Required | Description |
| Yes | Google Gemini API key. Passed to the container at runtime. |
The @rlabs-inc/gemini-mcp package also supports optional variables (GEMINI_OUTPUT_DIR, GEMINI_TOOL_PRESET, GEMINI_PRO_MODEL, etc.) which can be passed through with additional -e flags on docker run.
License
See upstream projects for license terms: