gemini-vision-mcp
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-vision-mcpDescribe the scene in /path/to/image.jpg"
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-vision-mcp
MCP server for describing video, image, audio, and text using the Gemini 3.1 Flash Live API.
Uses a persistent WebSocket session (Google GenAI Live API) to describe media content through FastMCP.
Requirements
Python 3.11+
Google API key with Gemini access
Related MCP server: Gemini MCP Server
Install
uv pip install gemini-vision-mcpOr run directly with uvx:
uvx gemini-vision-mcpConfiguration
Copy .env.example to .env and fill in your API key:
cp .env.example .envVariable | Default | Description |
| — | Required. Your Google Gemini API key |
|
| Gemini model to use (More models to be tested.) |
|
| Tokens per minute limit for auto-refresh |
|
| Rate limit window in seconds |
|
| Max requests per rate window |
Usage
Run with uvx:
uvx --no-cache --from . gemini-vision-mcpThis project uses uvx for running and venv for development.
MCP Client Configuration
Add to your MCP client (e.g. opencode opencode.json):
{
"mcp": {
"gemini-vision": {
"environment": {
"GOOGLE_API_KEY": "your-api-key",
"GEMINI_MODEL": "gemini-3.1-flash-live-preview",
"RATE_LIMIT_WINDOW_SECONDS": "60",
"RATE_LIMIT_REQUESTS": "10"
},
"enabled": true,
"type": "local",
"cwd": ".",
"command": [
"uvx",
"--no-cache",
"--from",
".",
"gemini-vision-mcp"
]
}
}
}Tools
Tool | Description |
| Describe a single file (image, audio, video, or text) |
| Alias for |
| Describe multiple files in one request |
| Alias for |
| Multiple files with different media types |
| Alias for |
| Describe a URL resource |
| Alias for |
| Describe multiple URL resources |
| Alias for |
| Multiple URLs with different media types |
| Alias for |
| Force a fresh Gemini Live session (loses context) |
| Summarize history via model, reconnect with summary |
| Report current token usage and TPM status |
Parameters
type: Media category —text,image,audio, orvideoprompt: Instructions to the model (what to describe/extract)path: Local file path (file tools)resource: URL to fetch (resource tools)compact: If true, auto-compact history after this request (vision tools only)
Example: describe an image
vision_from_file(type="image", path="/path/to/photo.jpg", prompt="Describe the scene in detail")Example: extract text from a screenshot
vision_from_file(type="image", path="/path/to/screenshot.png", prompt="Extract all visible text")Example: batch describe images
vision_from_files(type="image", paths=["/a.jpg", "/b.jpg", "/c.jpg"], prompt="Describe each image")Example: describe a URL resource
vision_from_resource(type="image", resource="https://example.com/photo.png", prompt="What is in this image?")Session management
The server maintains a conversation history across tool calls and uses a two-tier TPM management strategy:
70% TPM — Auto-compaction: the model summarizes the conversation history, then reconnects with the summary as context. History shrinks, session continues.
75% TPM — Hard refresh: reconnects with whatever compacted history exists. Use
new_visionto reset completely (loses all context).
You can also trigger compaction manually:
compact()Or pass compact=true to any vision tool to compact after that request:
vision_from_file(type="image", path="photo.jpg", prompt="Describe this", compact=true)Call new_vision to force a clean reset (no history carried over).
Call gemini_usage to inspect current token consumption and rate limit status.
Architecture
src/server.py— FastMCP server, tool registration, rate limitingsrc/gemini_live.py— Persistent Gemini Live WebSocket client with auto-reconnect, history tracking, and self-compactionsrc/rate_limiter.py— Sliding window rate limitersrc/tool/— Tool implementations (compact, file, files, files_mixed, gemini_usage, new_vision, resource, resources, resources_mixed)src/event/— Background TPM monitoring
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Niruchie/gemini-vision-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server