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

Local serverstdioPython

What is the Gemini Ocr MCP MCP server?

Gemini Ocr MCP becomes available to MCP clients through the gemini ocr mcp 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.

What Gemini Ocr MCP does

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.

Key capabilities

  • 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

Tools it exposes

Once connected, the assistant can call these 2 tools directly:

  • ocr_image_file — The ocr_image_file tool exposed by this server
  • ocr_image_base64 — The ocr_image_base64 tool exposed by this server

Installing the gemini ocr mcp mcp server

Setup follows the standard MCP pattern: clone or install the server, then register it in your client's configuration file and restart the client. The configuration snippets on this page cover Claude Desktop, Claude Code and Cursor.

Configuration

Before the server will start you need to supply 3 environment variables: GEMINI_MODEL, GEMINI_API_KEY, YOUR_GEMINI_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Python 3.8 or higher - A Google Gemini API Key. You can obtain one from Google AI Studio.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Gemini Ocr MCP sits in that group, and the shape of its toolset — ocr_image_file, ocr_image_base64 — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • Maintained by WindoC, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the gemini ocr mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
ocr_image_fileThe ocr_image_file tool exposed by this server.
ocr_image_base64The ocr_image_base64 tool exposed by this server.

How to install the Gemini Ocr MCP MCP server

**Linux/macOS Example:**
```json
{
  "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"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.8 or higher - A Google Gemini API Key. You can obtain one from Google AI Studio.
VariableDescriptionRequired
GEMINI_MODELConfiguration value read at startup.Optional
GEMINI_API_KEYCredential the server authenticates with.Yes
YOUR_GEMINI_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Gemini Ocr MCP to ocr image file.
  • Use Gemini Ocr MCP to ocr image base64.

Frequently asked questions

It connects Gemini Ocr MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 2 tools (ocr_image_file, ocr_image_base64) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Gemini Ocr MCP directly.