BaihaWhite/mcp-ds-ocr
Project Overview项目介绍
This is an OCR visual recognition plugin for DSH, compatible with OpenAI and Anthropic API protocols. It recognizes text from input images, outputs results with coordinate boxes, and auto re-scans low-confidence regions. You need to configure API info before use, and the API key is only stored locally.
这是DSH平台的OCR视觉识别插件,兼容OpenAI、Anthropic双API协议,可对传入图片做文字识别,输出带百分比/像素坐标框的识别结果,支持对低置信度文字自动区域重读合并。需配置API地址、密钥和模型后使用,API密钥仅本地存储。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:mcp-ds-ocr(BaihaWhite/mcp-ds-ocr)
仓库:https://github.com/BaihaWhite/mcp-ds-ocr
本站详情页:https://www.yhbd.top/plugins/baihawhite-mcp-ds-ocr/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-08-16 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:BaihaWhite/mcp-ds-ocr
把 BaihaWhite/mcp-ds-ocr 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-ocr · DSH OCR 视觉识别插件
视觉模型 OCR 插件(OpenAI / Anthropic 双协议):配置 API 格式 / API URL / API Key / Model Name(设置 → 插件 → 插件配置 的可折叠卡片),支持获取模型列表与测试连接按钮;ocr_recognize 工具对传入图片自动识别;结果百分比坐标化并以对角线两点方框描述;低置信度文字自动同图区域重读再识别并合并。
安装
方式一:插件商店(推荐,已收录)
仓库已打 topic:dsh-plugin 并被商店收录,package.json 已声明 dsh.bundle.patch:
- 打开 设置 → 插件 → 插件商店,搜索
dsh-ocr(或BaihaWhite); - 卡片点「安装」:自动
pnpm add github:BaihaWhite/mcp-ds-ocr+ 写入 profile bundles; - 重启 DSH 生效;之后可「更新 / 卸载 / 一键更新」。
方式二:手工挂载(本地开发)
ln -s /root/projects/mcp-ds-ocr ~/.dsh/profiles/web/dsh-ocr
ln -s ../dsh-ocr ~/.dsh/profiles/web/node_modules/dsh-ocr
# ~/.dsh/profiles/web/cordis.patch.yml 增加:
# - insert:
# - id: dsh-ocr
# name: 'dsh-ocr'
# config: {}
# 重启 dsh web(watchdog 会自动拉起)
文件
| 文件 | 说明 |
|---|---|
lib/index.js |
宿主半(ESM 无构建):ocr_recognize 工具、`/api/dsh-ocr/models |
lib/client.js |
浏览器半(ModuleLoader lazy-factory):设置 → 插件 的可折叠配置卡片 |
package.json |
包清单:exports(. 宿主 / ./client 浏览器)、dsh.bundle.patch(商店安装)、dsh.client(浏览器自动发现) |
cordis.patch.yml |
bundle patch:声明 dsh-ocr 插件行 |
plugin/ |
早期动态 Cordis 版本源码存档(已由正式包取代) |
test-400x300.png |
400×300 测试图片 |
配置项(dsh-settings 持久化,全局生效)
| 字段 | 说明 |
|---|---|
apiFormat |
openai(POST {apiurl}/chat/completions,Bearer)或 anthropic(POST {apiurl}/v1/messages,x-api-key + anthropic-version,自动补 /v1) |
apiurl |
服务商 base URL |
apikey |
认证密钥(明文存于本机设置文件,请勿外传) |
model |
视觉模型名;「获取模型列表」拉取后可从旁侧下拉选择 |
threshold |
置信度阈值(默认 0.7),低于阈值触发区域重读 |
coordMode |
both / percent / pixel |
retryEnabled |
是否自动区域重读(默认开) |
maxRounds |
重读最大轮数(1-3,默认 2) |
工具
ocr_recognize(image_path, coord_mode?, retry_if_uncertain?, max_rounds?, focus_regions?, prompt_hint?)
image_path:绝对路径或工作区相对路径(PNG/JPEG/GIF/WebP,≤10MB;相对路径按 sandboxPolicy 工作区根 → 进程 cwd 解析)。- 结果每项:
text、box_px(像素框)、box_pct(百分比框)、description(左上(x%, y%) → 右下(x%, y%))、confidence、retried。 - 低置信度(< threshold)→ 同一图片按不确定区域像素框重读精读 → IoU 匹配按高置信合并,
attempts记录调用次数。 focus_regions:手动指定[x1,y1,x2,y2]区域精读一次。- 图片宽高由插件本地解析图片头(PNG/JPEG/GIF/WebP,无需图像库)。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
nexu-io/open-design
Devin-AXIS/iPolloWork
liustack/modlens
Alisa0808/vox-director
EthanYoQ/AI-Novel-Writer
Anionex/agent-vision-toolkit
ysr666/dsh-vision-router
tong-io/tongflow