io.github.alex-deus/mcp-dharmamitra

Registre officiel Médias et design

Dharmamitra OCR for Tibetan / Sanskrit / Devanagari images; writes extracted text to a file.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

PYPI package mcp-dharmamitra
Claude Code
claude mcp add mcp-dharmamitra -e 'DHARMAMITRA_COOKIE=<your dharmamitra_cookie>' -- uvx mcp-dharmamitra==0.1.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mcp-dharmamitra": {
            "command": "uvx",
            "args": [
                "mcp-dharmamitra==0.1.0"
            ],
            "env": {
                "DHARMAMITRA_COOKIE": "<your dharmamitra_cookie>"
            }
        }
    }
}

Variables d'environnement

  • DHARMAMITRA_COOKIE secret Optional cf_clearance cookie value. Only needed if requests start returning 403 from Cloudflare.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. mcp-dharmamitra
  2. Tool
  3. Install from the MCP registry
  4. Install from source
  5. Docker
  6. Cloudflare / cf_clearance

mcp-dharmamitra

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.

Tool

ocr_image
ArgumentTypeDefaultNotes
image_pathstr—Absolute path to a local image (png/jpg/…).
output_pathstr—File to write UTF-8 text into. Parent dirs are created.
transliterate_devanagari_to_iastboolfalsePassed to the API.
transliterate_tibetan_to_wylieboolfalsePassed to the API.
instructionstr""Optional model instruction.
modelstr"auto"OCR model id.
poll_interval_secondsfloat2.0Delay between status polls.
timeout_secondsfloat300.0Overall polling deadline.

Returns a small JSON summary — the extracted text is written to output_path, not returned to the client.

{
  "job_id": "b8b26984b3ca49199c28303cad6a144d",
  "output_path": "/abs/path/out.txt",
  "pages": 1,
  "processing_time_seconds": 3.957,
  "chars": 1234
}

Install from the MCP registry

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):

{
  "mcpServers": {
    "dharmamitra": {
      "command": "uvx",
      "args": ["mcp-dharmamitra"],
      "env": {"DHARMAMITRA_COOKIE": ""}
    }
  }
}

Or via the Claude Code CLI:

claude mcp add dharmamitra -e DHARMAMITRA_COOKIE="" -- uvx mcp-dharmamitra

Pin a specific version with uvx mcp-dharmamitra@0.1.0.

Install from source

uv sync                           # or: pip install -e '.[dev]'

Run locally with the MCP inspector:

uv run mcp dev src/mcp_dharmamitra/server.py

Run tests:

uv run pytest

For a source checkout the Claude Desktop entry uses the local path:

{
  "mcpServers": {
    "dharmamitra": {
      "command": "uv",
      "args": ["--directory", "/path/mcp-dharmamitra", "run", "mcp-dharmamitra"],
      "env": {"DHARMAMITRA_COOKIE": ""}
    }
  }
}

Docker

Build the image:

docker build -t mcp-dharmamitra:latest .

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:

docker run --rm --entrypoint python mcp-dharmamitra:latest \
  -c "from mcp_dharmamitra.server import mcp; print(mcp.name)"
Wire the container into Claude Desktop / Claude Code

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.

{
  "mcpServers": {
    "dharmamitra": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/path/mcp-dharmamitra/data:/data",
        "-e", "DHARMAMITRA_COOKIE",
        "mcp-dharmamitra:latest"
      ],
      "env": {
        "DHARMAMITRA_COOKIE": ""
      }
    }
  }
}

Or the same via CLI:

claude mcp add dharmamitra \
  --scope project \
  -e DHARMAMITRA_COOKIE="" \
  -- docker run -i --rm \
       -v /path/mcp-dharmamitra/data:/data \
       -e DHARMAMITRA_COOKIE \
       mcp-dharmamitra:latest

When calling the tool, pass container paths. Example — image at <host>/tmp/text.png → /data/text.png:

{
  "image_path": "/data/text.png",
  "output_path": "/data/text.txt"
}

The resulting text.txt appears in the mounted host directory.

Cloudflare / cf_clearance

The 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:

export DHARMAMITRA_COOKIE='cf_clearance value here'

The server will attach it as a cookie on every request. Do not hardcode it — Cloudflare rotates the value.

Questions fréquentes

Qu'est-ce que io.github.alex-deus/mcp-dharmamitra ?

Dharmamitra OCR for Tibetan / Sanskrit / Devanagari images; writes extracted text to a file.

Comment installer io.github.alex-deus/mcp-dharmamitra ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add mcp-dharmamitra -e 'DHARMAMITRA_COOKIE=<your dharmamitra_cookie>' -- uvx mcp-dharmamitra==0.1.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.alex-deus/mcp-dharmamitra ?

Oui. Il attend DHARMAMITRA_COOKIE, à renseigner dans sa configuration.

io.github.alex-deus/mcp-dharmamitra est-il open source ?

Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.

Qui maintient io.github.alex-deus/mcp-dharmamitra ?

Il est publié par alex-deus. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.