OCR 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., "@OCR MCPfill json from this invoice pdf"
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.
OCR MCP
An HTTP (Streamable) MCP server written in Node.js that receives a file and a structured JSON object with empty values, extracts the file's content using local OCR / text extraction (no cloud, no API keys), and fills in the JSON values.
Supported file types:
Type | How it's read |
Image | Tesseract OCR ( |
Embedded text ( | |
DOCX | Direct text extraction ( |
DOC | Not supported (convert to DOCX/PDF/image) |
How field filling works
Filling happens in two passes:
Heuristic parser (always on, local). Matches each JSON key to a label in the document text, e.g. a key
invoiceNumbermatches lines likeInvoice Number: INV-2026orinvoice_number - INV-2026. Nested objects are supported.LLM fallback (optional). For any field the heuristic could not resolve, a configured LLM is asked to fill the remaining values from the extracted text. It only fills still-empty fields and never overrides values already found. Enable it via
.env(see below); leave it disabled to stay fully local.
Fields that remain empty after both passes are returned in an unfilled list.
Related MCP server: pymupdf4llm-mcp
Requirements
Node.js 18+ (developed on v24)
Install
npm install
cp .env.example .env # then edit .env if you want the LLM fallbackConfiguration (.env)
Variable | Description |
| Server port (default |
| MCP endpoint path (default |
|
|
| Model name, e.g. |
| Provider API key (not required for |
| Optional base URL override. |
Provider defaults for LLM_BASE_URL:
openai→https://api.openai.com/v1anthropic→https://api.anthropic.comollama→http://localhost:11434/v1
openai and ollama use the OpenAI-compatible Chat Completions API; anthropic uses
the Messages API. Any OpenAI-compatible endpoint (Azure OpenAI, LM Studio, vLLM, etc.)
works by pointing LLM_PROVIDER=openai at a custom LLM_BASE_URL.
Run
npm start
# OCR MCP server (Streamable HTTP) listening on http://localhost:3000/mcp
# LLM fallback enabled: openai / gpt-4o-mini (or "disabled")Health check: GET /health.
MCP tool
fill_json_from_file
Argument | Type | Required | Description |
| string | yes | File content encoded as base64. |
| string | one of* | MIME type, e.g. |
| string | one of* | Original filename, used to detect the type. |
| object | yes | JSON object with the desired keys and empty values. |
| string | no | Tesseract language code(s), e.g. |
* Provide at least one of mimeType or filename.
Returns JSON (as text + structuredContent):
{
"data": { "name": "Acme Corp", "invoiceNumber": "INV-2026", "missingField": "" },
"unfilled": ["missingField"],
"extractedTextLength": 41,
"usedLlm": false
}usedLlm indicates whether the LLM fallback was invoked. If a fallback call fails, an
llmError field is included and the heuristic result is still returned.
Connecting from an MCP client
Point a Streamable-HTTP-capable MCP client at http://localhost:3000/mcp. Example VS
Code mcp.json:
{
"servers": {
"ocr": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}Example (raw HTTP)
# 1. initialize -> read the mcp-session-id response header
# 2. POST notifications/initialized with that session id
# 3. POST tools/call with the base64 file + schema
# See the curl handshake used in development; Accept must include
# "application/json, text/event-stream".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
- 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/ssutikno/ocr_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server