Gemini OCR MCP Server
Utilizes the Google Gemini API to perform Optical Character Recognition (OCR), enabling the extraction of text from images provided via local file paths or base64 encoded strings.
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 OCR MCP Serverextract the text from the image file at C:/Users/Admin/Desktop/invoice.png"
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 OCR MCP Server
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.
Objective
Extract the text from the following image:

and convert it to plain text, e.g., fbVk
Related MCP server: Vision Toolkit
Features
File-based OCR: Extract text directly from an image file on your local system.
Base64 OCR: Extract text from a base64 encoded image string.
Easy to Use: Exposes OCR functionality as simple tools in an MCP server.
Powered by Gemini: Utilizes Google's advanced Gemini models for high-accuracy text recognition.
Prerequisites
Python 3.8 or higher
A Google Gemini API Key. You can obtain one from Google AI Studio.
Setup and Installation
Clone the repository:
git clone https://github.com/WindoC/gemini-ocr-mcp cd gemini-ocr-mcpCreate and activate a virtual environment:
# Install uv standalone if needed ## On macOS and Linux. curl -LsSf https://astral.sh/uv/install.sh | sh ## On Windows. powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Install the required dependencies:
uv sync
MCP Configuration Example
If you are running this as a server for a parent MCP application, you can configure it in your main MCP config.json.
Windows Example:
{
"mcpServers": {
"gemini-ocr-mcp": {
"command": "uv",
"args": [
"--directory",
"x:\\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"
}
}
}
}Linux/macOS Example:
{
"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"
}
}
}
}Note: Remember to replace the placeholder paths with the absolute path to your project directory.
Tools Provided
ocr_image_file
Performs OCR on a local image file.
Parameter:
image_file(string): The absolute or relative path to the image file.Returns: (string) The extracted text from the image.
ocr_image_base64
Performs OCR on a base64 encoded image.
Parameter:
base64_image(string): The base64 encoded string of the image.Returns: (string) The extracted text from the image.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
OCR.space MCP — wraps the OCR.space API (ocr.space) for image/PDF → text OCR.
ImagePay MCP: 40 x402 paid API tools (OCR, PDF, image, QR, tabular, web). Pay per call on Base.
OCR and document understanding: extract text from images, then summarize or translate it.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to perform OCR on images via multimodal models through a remote server.-
- AlicenseNot gradedqualityCmaintenanceProvides multimodal vision MCP tools for image analysis, OCR, object detection, text-to-image generation, and image similarity, integrating OpenAI, Qwen, and Gemini.321MIT
- FlicenseNot gradedqualityCmaintenanceProvides OCR (Optical Character Recognition) capabilities through MCP, including text extraction and document layout parsing to Markdown. Supports multiple PaddleOCR models like PP-OCRv5, PP-OCRv6, and PP-StructureV3.-
- AlicenseNot gradedqualityBmaintenanceProvides image understanding capabilities via local OCR and cloud VLM, enabling text extraction and visual description through MCP.893MIT
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/WindoC/gemini-ocr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server