
Mcp Dharmamitra
io.github.alex-deus由 GitHub 帳號 alex-deus 發布v0.1.0更新於 Oct 25, 2026
Dharmamitra OCR for Tibetan / Sanskrit / Devanagari images; writes extracted text to a file.
概覽
本機 MCP 伺服器,透過公開的 Dharmamitra 介面對藏文、梵文或天城文圖片執行 OCR,並將辨識文字寫入檔案。
- 可以做什麼
- 對本機圖片執行 OCR,把辨識出的 UTF-8 文字寫入指定的輸出檔案(自動建立上層目錄),並回傳包含任務 ID、頁數、處理時間與字元數的小型 JSON 摘要,而非文字本身。可選擇將天城文轉寫為 IAST、將藏文轉寫為 Wylie,傳入自訂模型指示,並設定 OCR 模型、輪詢間隔與逾時時間。
- 適用情境
- 適合處理藏文、梵文或天城文的掃描檔、照片、碑文或手稿,需要把文字擷取到本機檔案以便後續處理時使用。每次呼叫處理一張圖片,較適合零散數位化工作而非批次流程。
- 執行需求
- 以 Python 套件形式透過 uvx 在本機執行(也可用 uv 從原始碼執行,或使用 Docker 映像)。需要能連線到公開的 Dharmamitra OCR 端點。選用環境變數 DHARMAMITRA_COOKIE 存放 Cloudflare 的 cf_clearance 值,僅在請求開始回傳 403 時需要。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Dharmamitra,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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
Returns a small JSON summary — the extracted text is written to output_path,
not returned to the client.
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):
Or via the Claude Code CLI:
Pin a specific version with uvx [email protected].
Install from source
Run locally with the MCP inspector:
Run tests:
For a source checkout the Claude Desktop entry uses the local path:
Docker
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:
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.
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.
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:
The server will attach it as a cookie on every request. Do not hardcode it — Cloudflare rotates the value.
來源:README.md,提交 9240b35
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。