The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Dharmamitra listing page.
MCP server that runs OCR on an image via the public Dharmamitra OCR endpoint and writes the extracted text to a local file. Optimised for Tibetan / Sanskrit / Devanagari input.
ocr_image| Argument | Type | Default | Notes |
|---|---|---|---|
image_path | str | — | Absolute path to a local image (png/jpg/…). |
output_path | str | — | File to write UTF-8 text into. Parent dirs are created. |
transliterate_devanagari_to_iast | bool | false | Passed to the API. |
transliterate_tibetan_to_wylie | bool | false | Passed to the API. |
instruction | str | "" | Optional model instruction. |
model | str | "auto" | OCR model id. |
poll_interval_seconds | float | 2.0 | Delay between status polls. |
timeout_seconds | float | 300.0 | Overall polling deadline. |
Returns a small JSON summary — the extracted text is written to output_path,
not returned to the client.
Listed as io.github.alex-deus/mcp-dharmamitra
on the official Model Context Protocol registry. The package ships to PyPI as
mcp-dharmamitra and is meant to
be run with uvx — no clone, no manual install.
~/Library/Application Support/Claude/claude_desktop_config.json (or the
equivalent mcp block in Claude Code):
Or via the Claude Code CLI:
Pin a specific version with uvx mcp-dharmamitra@0.1.0.
Run locally with the MCP inspector:
Run tests:
For a source checkout the Claude Desktop entry uses the local path:
Build the image:
MCP talks over stdio, so the container must be run with -i (no -t). Mount
a host directory that holds the input images — the tool arguments
(image_path, output_path) are paths inside the container.
Smoke-test the entrypoint:
Replace /path/mcp-dharmamitra with any host
directory you want the tool to be able to read/write. Files inside it will be
visible under /data in the container.
Or the same via CLI:
When calling the tool, pass container paths. Example — image at
<host>/tmp/text.png → /data/text.png:
The resulting text.txt appears in the mounted host directory.
cf_clearanceThe endpoint sits behind Cloudflare. Most requests go through without any
cookie. If you start getting 403, grab a fresh cf_clearance value from a
logged-in browser session on dharmamitra.org and export it:
The server will attach it as a cookie on every request. Do not hardcode it — Cloudflare rotates the value.