zotero-word-mcp
Enables the insertion and management of native Zotero citations and bibliographies within Microsoft Word, supporting document refreshes, CSL style selection, and field listing for maintained academic workflows.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zotero-word-mcpInsert a native Zotero citation for 'Smith 2023' and update the bibliography."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
zotero-word-mcp
zotero-word-mcp 是一个面向 Windows 的 MCP Server,用于把 Zotero 原生动态引文 直接插入 Microsoft Word 桌面版 文档。
它不是静态编号脚本,也不是通用 .docx 编辑器,而是专门解决下面这个断点:
Zotero MCP 负责文献库
Word MCP 负责文档内容
但 AI 很难把 Zotero 可继续维护的原生引文 真正插进 Word
本项目补上的就是这一步。
核心能力
向 Word 文档插入 Zotero 原生
ADDIN ZOTERO_ITEM引文字段向 Word 文档插入 Zotero 原生
ADDIN ZOTERO_BIBL参考文献字段写入
ZOTERO_PREF_1..N文档首选项触发 Zotero 官方 Word
Refresh列出文档中的 Zotero 原生字段
设置文档的 CSL 样式
使用 Zotero 官方
libzoteroWinWordIntegration.dll探测文档是否可被识别分析并批量转换
[1]、[1, 2]、[1-3]这类静态数字引用
Related MCP server: zotero-mcp-lite
为什么单独做这个 MCP
普通 Word MCP 更适合:
插段落
排版
查找替换
表格/图片处理
而 zotero-word-mcp 解决的是:
引文必须是 Zotero 原生字段
刷新后要继续被 Zotero 插件接管
用户后续还要能在 Word 里继续点
Add/Edit Citation
这决定了它必须直接面向 Zotero Word 集成,而不是只写普通文本。
适用环境
Windows
Microsoft Word 桌面版
Zotero 7
Python 3.10+
当前未完整验证:
WPS
Word Online
受保护文档
多人实时协作文档
安装
git clone https://github.com/Zhangchaokai1/zotero-word-mcp.git
cd zotero-word-mcp
pip install -e .如果你只想本地运行:
pip install "mcp[cli]" pywin32 requests配置
可选环境变量:
ZOTERO_DATA_DIRZotero 数据目录,例如D:\Zotero\ZoteroFileZOTERO_SQLITE_PATH指向zotero.sqliteZOTERO_WORD_DLL指向libzoteroWinWordIntegration.dll
如果不显式设置,程序会优先从 Zotero prefs.js 自动发现数据目录。
MCP 工具
insert_citation
向 Word 文档插入 Zotero 原生引文。
主要参数:
dockeysfind_textplacementstyle_idlibrary_idprefixsuffixrefresh_afterwait_seconds
insert_bibliography
向 Word 文档插入 Zotero 原生参考文献字段。
refresh_document
触发 Zotero 官方 Refresh,并等待占位字段解析完成。
list_fields
列出文档中的 Zotero 原生字段和文档首选项。
set_document_style
设置文档 Zotero CSL 样式,不立即刷新。
analyze_numbered_citations
分析 Word 文档中的数字方括号引用和静态参考文献列表,不修改文档。
适合在转换前确认:
正文引用标记数量
References标题段落位置文末静态参考文献数量
是否有超出参考文献范围的引用编号
主要参数:
docbibliography_heading,默认References
convert_numbered_citations
将静态数字引用批量替换成 Zotero 原生字段。
支持:
[1][1, 2][1,2][1-3]
主要参数:
doccitation_mapoutput_docbibliography_headinglibrary_idstyle_idlocaledelete_static_referencesinsert_bibliographyrefresh_afterwait_seconds
citation_map 示例:
{
"1": "ABCD1234",
"2": "EFGH5678",
"3": "IJKL9012"
}推荐智能体使用 output_doc,让工具先复制原文档再转换,避免覆盖原文件。
validate_zotero_document
综合验证 Zotero 原生字段状态。
返回:
citation 字段数量
bibliography 字段数量
{Citation}/{Bibliography}占位符数量bibliography 字段是否从参考文献标题后一段开始
当前文档字段列表
probe_document
调用 Zotero 官方 libzoteroWinWordIntegration.dll 验证当前文档是否能被官方集成识别。
推荐批量转换流程
智能体把静态编号文献转换成 Zotero 原生引用时,推荐使用:
用
analyze_numbered_citations检查编号引用和参考文献列表。用 Zotero MCP 或其他文献工具生成
citation_map。调用
convert_numbered_citations,传入output_doc、citation_map和style_id。用
validate_zotero_document检查字段数量、占位符和 bibliography 起始位置。用
probe_document确认 Zotero 官方 Word 集成能识别字段。
启动服务
zotero-word-mcp如果你的 MCP 客户端支持命令式 server,可以这样配置:
[mcp_servers.zotero-word]
command = "python"
args = ["-m", "zotero_word_mcp"]项目结构
src/zotero_word_mcp/word_bridge.pyWord COM 基础桥接src/zotero_word_mcp/native_bridge.pyZotero 原生字段与刷新逻辑src/zotero_word_mcp/server.pyMCP 工具封装docs/DEVELOPMENT_REVIEW.md开发复盘与技术路线说明
与静态引用方案的区别
静态方案通常是:
正文写
[1]文末写普通文本参考文献
再靠 Word 交叉引用或脚本刷新
这类方案容易控,但不是 Zotero 原生动态引文。
本项目写入的是 Zotero 官方 Word 集成可识别的字段,因此:
Zotero 可以继续接管这份文档
用户后续仍能用 Word 里的 Zotero 插件继续维护
已知边界
仅支持 Windows + Word 桌面版
依赖本机可用的 Zotero Word 集成
相邻无间隔插入多个新引文时,Zotero 刷新后可能自动合并为复合引文字段
复杂受保护文档仍建议先做副本测试
开发复盘
详见:
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zhangchaokai1/zotero-word-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server