Hongcheng-LI/dsh-zotero

Plugin插件 Native原生 ⭐ 15 MIT Memory & Knowledge记忆与知识库

DeepSeek Harness 的 Zotero 工具:通过 Zotero 本地 API 搜索文库、读取元数据/全文、列出附件、下载 PDF、管理笔记。

Project Overview项目介绍

dsh-zotero is a native plugin built exclusively for the DeepSeek Harness (DSH) agent framework. It enables DSH agents to interact directly with a locally running Zotero literature library via Zotero’s built-in local API, which is available starting from Zotero version 7. To install the plugin, you can run the command dsh plugin --profile web add dsh-zotero from your terminal, then restart the dsh web process to activate it. Alternatively, you can install it directly from a GitHub repository reference by adding the commit hash to the install command.

Before using the plugin, you must have Zotero 7 or newer installed locally, and enable the “Allow other applications on this computer to communicate with Zotero” option in Zotero’s advanced settings. The plugin is targeted at researchers and students who use Zotero for literature management and DSH for academic research assistance. A common use case is asking DSH to search for papers matching a specific keyword, filter results by year or topic, pull the full text of a target paper, and write a summary note back to Zotero.

The plugin ships with sensible default configurations that work out of the box for most local Zotero setups, and it supports optional custom configuration for API endpoint, library ID, download size limits, and other parameters. Currently, all read operations (search, full text access, metadata retrieval) work on tested Zotero 9 versions, but write operations for notes are not supported due to Zotero’s local API being read-only. The project is open-source under the MIT license, and it includes unit tests and end-to-end smoke tests that can be run to verify functionality against a local Zotero instance.

这是专门为 DeepSeek Harness(DSH)开发的原生插件,作用是让 DSH 代理能够直接操作本地的 Zotero 文献库。它通过 Zotero 7 及以上版本提供的本地 API 访问文献库数据,无需额外 API 密钥,全程基于 Node.js 实现,不需要对 Zotero 本身做任何核心修改。插件提供了多个专用工具,支持检索文献、读取元数据、获取全文、管理附件和笔记。

这款插件面向使用 Zotero 管理文献、同时借助 DSH 代理完成文献综述、论文写作的科研人员与学生。使用前需要先在 Zotero 的设置中开启「允许本机其他程序与 Zotero 通信」选项,并保持 Zotero 后台运行。典型工作流程是用户要求 DSH 检索指定主题文献,插件返回结果后,可进一步读取目标文献全文、生成读书笔记并存回 Zotero。

插件可以通过 DSH 的插件命令直接安装,安装后重启 DSH Web 即可使用,自带默认配置,不会导致启动异常。目前受限于 Zotero 本地 API 的只读限制,笔记的增删改操作暂不可用,插件会给出明确提示。项目基于 MIT 许可证开源,支持自定义配置 API 地址、文献库、下载上限等参数。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 15 stars - an early-stage project星标 15,属于早期项目
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 dsh-zotero

把 Hongcheng-LI/dsh-zotero 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-zotero

English | 中文

DeepSeek Harness 的 Zotero 工具插件:让 agent 直接检索你的 Zotero 文献库、阅读条目元数据与摘要、列出分类和 PDF 附件、读 PDF 全文、代写读书笔记。通过 Zotero 本地 API(7 代及以上可用,实测 9.x;http://127.0.0.1:23119)访问,无需 API Key,纯 Node 实现,零核心改动。

独立仓库:本仓库是 dsh-zotero 的唯一正本(曾作为 dsh-scientific monorepo 的 plugins/zotero,2026-08 拆分独立)。配套的 skills / workflows 仍在 dsh-scientific。

前置条件

  1. 本机安装并运行 Zotero 7 及以上(本地 API 自 7 代引入;本项目在 Zotero 9.0.6 / Windows 上实测通过);
  2. 打开 Zotero:设置 → 高级 → 通用 → 勾选「允许本机上的其他应用程序与 Zotero 通信」。

兼容性说明:读取类工具(检索/条目/全文/附件路径/笔记读取)在 Zotero 9 上全部实测通过。笔记写入(create/append/update/delete)受本地 API 只读限制不可用(见工具表说明)。

工具一览

工具 作用
zotero_collections 列出文献库的所有分类(collectionKey + 条目数),用于限定检索范围
zotero_search 按关键词检索文献库(标题/作者/年份),支持条目类型、分类、标签、年份区间(sinceYear/beforeYear)、排序、分页;mode 控制返回粒度省 token
zotero_recent 列出最近添加的条目("我刚导入的文献"场景)
zotero_item 按 key 读取条目详情:作者、期刊、DOI、摘要、标签、附件列表
zotero_fulltext 读条目全文纯文本:优先读 Zotero 全文缓存(.zotero-ft-cache,零下载),无缓存时现场解析本地 PDF(pdfjs-dist,约 0.3s)并写缓存;仅远程链接附件才下载到工作区
zotero_attachment_path 返回附件在 storage 的原始绝对路径,让 read 工具零拷贝直读
zotero_download 把条目的 PDF 附件下载到会话工作区(默认),供模型用 read 工具阅读
zotero_notes 列出某条目的子笔记,或全库按关键词搜笔记正文
zotero_note 笔记写入:create 新增 / append 追加 / update 更新 / delete 删除。⚠️ 实测多数版本的本地 API 为只读(POST/PATCH/DELETE 未开放),写操作会返回明确提示并建议手动操作

示例对话:

在我的 Zotero 里搜一下 transformer 相关的论文,挑 2020 年以后的,把第一篇的全文读一遍,给我写个摘要存进笔记。

安装

dsh plugin --profile web add dsh-zotero

或从 GitHub 安装:

dsh plugin --profile web add github:<你的账号>/dsh-zotero#<commit>

装好后重启 dsh web。插件自带空配置,不会弄崩启动;Zotero 未运行时工具会返回明确的连接提示。

配置(可选)

默认配置即可用(本地库、端口 23119)。如需自定义,在你的 profile($DSH_HOME/profiles/<name>/)的 cordis.patch.yml 里覆盖 tool-zotero 行,然后重启:

- id: tool-zotero
  config:
    baseUrl: http://127.0.0.1:23119   # Zotero 本地 API 地址
    library: user                      # user(我的文献库)或 group:<群组ID>
    downloadDir: D:/papers             # 附件下载目录,缺省存到会话工作区
    dataDir: D:/ZoteroData             # Zotero 数据目录(含 profiles.ini),默认自动探测
    storageDir: .../zotero/storage     # 直接指定 storage 目录(zotero_fulltext / attachment_path 用)
    maxAttachmentBytes: 67108864       # 单附件下载上限,默认 64MB
    maxFulltextChars: 80000            # zotero_fulltext 返回的最大字符数,默认 80000
    maxLimit: 50                       # 检索结果条数上限,默认 50
    timeoutMs: 15000                   # 本地 API 超时(毫秒)

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-playwright-browser 下一个 Next dsh-skills →