Gemini OCR MCP
@WindoC
About Gemini OCR MCP
This project provides a simple yet powerful OCR (Optical Character Recognition) service through a FastMCP server, leveraging the capabilities of the Google Gemini API. It allows you to extract text from images either by providing a file path or a base64 encoded string.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"gemini-ocr-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/project/gemini-ocr-mcp",
"run",
"gemini-ocr-mcp.py"
],
"env": {
"GEMINI_MODEL": "gemini-2.5-flash-preview-05-20",
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Gemini OCR MCP?
Gemini OCR MCP is an MCP server that provides Optical Character Recognition (OCR) by leveraging the Google Gemini API. It allows you to extract text from images either by providing a file path or a base64-encoded string, making it useful for developers who need programmatic text extraction from images.
How to use Gemini OCR MCP?
Clone the repository, install dependencies with uv sync, and configure the server in your MCP client’s config.json using the provided Windows/macOS/Linux examples. Set the environment variables GEMINI_API_KEY and optionally GEMINI_MODEL, then invoke the tools ocr_image_file (with an image file path) or ocr_image_base64 (with a base64 image string).
Key features of Gemini OCR MCP
- File-based OCR from local images
- Base64 OCR from encoded image strings
- Powered by Google Gemini models for high accuracy
- Simple tool-based interface via FastMCP
Use cases of Gemini OCR MCP
- Extracting text from CAPTCHA images
- Digitizing text from scanned documents or photos
- Processing images received as base64 data in APIs
FAQ from Gemini OCR MCP
What are the prerequisites for running Gemini OCR MCP?
You need Python 3.8 or higher and a valid Google Gemini API Key from Google AI Studio.
How do I configure Gemini OCR MCP for my MCP client?
Add a configuration entry to your MCP client’s config.json specifying the command uv, the project directory, and environment variables GEMINI_API_KEY and GEMINI_MODEL (optional). Example configurations for Windows and Linux/macOS are provided in the README.
Which Gemini model does Gemini OCR MCP use?
The default model is gemini-2.5-flash-preview-05-20, but you can override it by setting the GEMINI_MODEL environment variable.
What tools does Gemini OCR MCP provide?
It provides two tools: ocr_image_file (accepts an image file path) and ocr_image_base64 (accepts a base64-encoded image string). Both return the extracted text.
How does Gemini OCR MCP handle authentication?
It reads the Google Gemini API key from the GEMINI_API_KEY environment variable. No other authentication or transport configuration is required beyond standard MCP setup.
Frequently asked questions
What are the prerequisites for running Gemini OCR MCP?
You need Python 3.8 or higher and a valid Google Gemini API Key from Google AI Studio.
How do I configure Gemini OCR MCP for my MCP client?
Add a configuration entry to your MCP client’s `config.json` specifying the command `uv`, the project directory, and environment variables `GEMINI_API_KEY` and `GEMINI_MODEL` (optional). Example configurations for Windows and Linux/macOS are provided in the README.
Which Gemini model does Gemini OCR MCP use?
The default model is `gemini-2.5-flash-preview-05-20`, but you can override it by setting the `GEMINI_MODEL` environment variable.
What tools does Gemini OCR MCP provide?
It provides two tools: `ocr_image_file` (accepts an image file path) and `ocr_image_base64` (accepts a base64-encoded image string). Both return the extracted text.
How does Gemini OCR MCP handle authentication?
It reads the Google Gemini API key from the `GEMINI_API_KEY` environment variable. No other authentication or transport configuration is required beyond standard MCP setup.
Basic information
More AI & Agents MCP servers
Unreal Engine Generative AI Support Plugin
prajwalshettydevUnreal Engine plugin for LLM/GenAI models & MCP UE5 server. OpenAI GPT-5, Deepseek R1, Claude Opus/Sonnet, Gemini 3, Grok 4, Alibaba Qwen, Kimi, ElevenLabs TTS, Inworld, OpenRouter, Groq, GLM, Ollama, Local, Meshy, Tripo, Hunyuan3D, Rodin, fal, Dashscope, Seedream. NPC AI, agenti
🔎 GPT Researcher
assafelovicAn autonomous agent that conducts deep research on any data using any LLM providers
Model Context Protocol Server for Home Assistant
tevonsbA MCP server for Home Assistant
🛡️ A.I.G(AI-Infra-Guard)
TencentA full-stack AI Red Teaming platform securing AI ecosystems via OpenClaw Security Scan, Agent Scan, Skills Scan, MCP scan, AI Infra scan and LLM jailbreak evaluation.
Hass-MCP
voskaControl and query Home Assistant from Claude and other LLMs — a Model Context Protocol (MCP) server.
Comments