
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 分
请在仓库或注册中心条目中声明许可证。