ocr_image_fileLABSCO SUMMARY
Text trapped in an image becomes text you can work with.
It does one thing — hand an image to Gemini and return what it reads — and takes the image either as a path or inline, which is what makes it usable inside a pipeline as well as from a chat.
What it is
An OCR service in front of the Google Gemini API. Point it at an image on disk or pass one inline as base64, and it returns the text it can read.
What you get
- Text extracted from an image file on the local filesystem, by path
- Text extracted from a base64-encoded image string, for images that never touch disk
- The Gemini model chosen by configuration, so accuracy and cost can be traded off without a code change
Requirements
Python 3.8 or newer, uv, and a Google Gemini API key from AI Studio. Images are sent to Google for recognition.
Setup effort
Build from source — git clone https://github.com/WindoC/gemini-ocr-mcp
USE CASES
Pulling numbers off a screenshot
Point it at the file and get the text back, so a table someone pasted as a picture can be read, checked or copied without retyping.
Reading a scanned document
Hand over the scan by path and take the recognized text — the step that usually needs a separate OCR application happens in the conversation.
Reading an image that only exists in memory
Pass the image inline as base64 when it came from a clipboard, an API response or a generated render and was never written to disk.
Handling short, awkward strings
Distorted or low-contrast characters — the repository's own example is a CAPTCHA image — are read by a general vision model rather than a template matcher.
2 tools
Listed in project docs. Your client may show a different list.
ocr_image_base64BEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- Python 3.8 or later
- GEMINI_API_KEY in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/WindoC/gemini-ocr-mcp
cd gemini-ocr-mcp
uv syncMCP Clients
Any MCP client
{
"mcpServers": {
"gemini-ocr-mcp": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_PROJECT_GEMINI_OCR_MCP>",
"run",
"gemini-ocr-mcp.py"
],
"env": {
"GEMINI_MODEL": "gemini-3.6-flash",
"GEMINI_API_KEY": "<YOUR_GEMINI_API_KEY>"
}
}
}
}<YOUR_PATH_TO_PROJECT_GEMINI_OCR_MCP> is the full path of your gemini-ocr-mcp clone (on macOS or Linux, a path with / separators). GEMINI_MODEL picks the Gemini model and has to be set: the README's gemini-2.5-flash-preview-05-20, which the code also falls back to when the variable is unset, was shut down on November 18, 2025. gemini-3.6-flash is Google's recommended replacement; any current model id from Google's models page works.