dsh-eplan
EPLAN Electric P8 integration for DeepSeek Harness: a bundled local EPLAN automation MCP server, an offline P8 2025 .NET API reference and platform guide built from the installed docs, and offline 2026 / 2027 / EEC Pro documentation lookups (those three ship disabled and read indexes extracted from the release assets).
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:shangyunqiang1/DSH_Eplan說明文件
閱讀完整 README ↗使用示例
连接并查看当前项目
eplan_versions → eplan_connect → eplan_status → eplan_tools_call({name:"eplan_get_current_project"})
把项目导出为 PDF
eplan_tools_search({query:"export pdf"}) → eplan_tools_describe({names:"eplan_export_pdf_project"})
→ eplan_tools_call({name:"eplan_export_pdf_project", arguments:{project_path:"…", export_path:"…"}})
按 GUI 名字找动作
eplan_action_catalog({search:"Page macro"}) → eplan_action_describe({name:"…"})
→ eplan_action_run({name:"…", params:{…}, dry_run:true}) → 去掉 dry_run 执行
查 2025 API(写脚本用)
eplan2025_get({name:"Eplan.EplApi.DataModel.ProjectManager.OpenProject"})
eplan2025_type({type:"Eplan.EplApi.Base.PathMap"})
查 2025 界面/流程(操作 EPLAN 用)
eplan2025_guide_search({query:"connection numbering"})
eplan2025_guide_get({path:"…/Plattform/2025/Content/htm/wirenumberinggui_k_start.htm"})
查 2026 / 2027 / EEC Pro(本地)
eplan_search({query:"ProjectManager OpenProject", category:"API Reference"})
eplan_search({query:"schematic generation settings", category:"User Guide"})
eplan2027_search({query:"InsertSymbol"}) → eplan2027_get({path:"…"})
eecpro_search({query:"refformulas"})
配置
cordis.patch.yml 中的七行:
dsh-eplan— 主插件,注入系统提示。eplan-mcp(dsh-eplan/mcp/eplan,显示为 EPLAN 远程连接)— stdio,经scripts\launch-eplan-mcp.cmd启动,cwd为vendor\eplan-mcp\eplan-p8-mcp-server\mcp_server。默认EPLAN_MCP_MODE=discovery; 改成full可获得 248 个独立工具(每个请求都要携带全部 schema,token 成本高)。eplan-docs-2025(dsh-eplan/mcp/eplan2025,P8 2025 · API 参考)— stdio,经scripts\launch-docs2025.cmd。eplan-guide-2025(dsh-eplan/mcp/eplan2025guide,P8 2025 · 平台帮助)— stdio,经scripts\launch-docs2025guide.cmd。eplan-docs-2026/eplan-docs-2027(P8 2026 · 文档 / P8 2027 · 文档)— stdio,分别经scripts\launch-docs2026.cmd、launch-docs2027.cmd启动server\docs\server.py --docset …,只读本地库。默认关闭(见下)。eec-pro-docs(dsh-eplan/mcp/eecpro,EEC Pro · 文档)— stdio,经scripts\launch-docseecpro.cmd。
为什么插件列表里能分开显示
cordis.patch.yml 的每一行 name: 都是插件包内自带的小包 dsh-eplan/mcp/(mcp\\index.js
只做 export * from "@deepseek-ai/dsh-mcp-client",mcp\\locale\{en,zh}.json 提供标题与说明),
而不是六行同名 @deepseek-ai/dsh-mcp-client。DSH 的插件列表按包名读取 locale 里的 meta.title,
所以现在每行显示各自的名称(EPLAN 远程连接 / P8 2025 · API 参考 / …)。
根 package.json 为此导出了 ./mcp/*、./mcp/*/locale/en.json、./mcp/*/locale/zh.json 三个入口
(Node 的单星号导出规则所限,必须逐文件列出,不能写成 ./mcp/*/locale/*.json)。
2025 / 2026 / 2027 的默认开关
本机装的是 P8 2025,所以 eplan2026、eplan2027 两行在 cordis.patch.yml 里带 disabled: true,
装好后只有 2025 在运行(2025 API + 2025 平台帮助 + EEC Pro 文档 + 远程连接)。需要时到
设置 → 插件 打开对应开关即可,开关状态写在 profile 的 cordis.patch.yml 里,不会改回插件包。
相关环境变量/文件:runtime\python-path.txt(setup 写入)、EPLAN_DATA_DIR(统一指定五套索引所在目录)、
EPLAN2025_DB / EPLAN2025_GUIDE_DB / EPLAN2026_DB / EPLAN2027_DB / EECPRO_DB(逐个覆盖)、
EPLAN_DSH_PYTHON(setup 优先解释器)、EPLAN_MCP_MODE、EPLAN_PLATFORM_ROOT(EPLAN 安装根目录,见上一节;
通常由设置页写入 runtime\eplan-platform-root.txt 后自动注入)。动作调用超时为 600 秒(EPLAN 动作可能很慢)。
索引放在哪里
默认跟随插件目录,即 \data\*.sqlite(例如 C:\path\to\DSH_Eplan\data\,五个库共约
199 MB)。插件目录被 DSH 以 Junction 链接进 profile(…\profiles\desktop\node_modules\dsh-eplan),
所以只要原目录存在,索引就跟着走;整包拷贝到别处同样可用。
想让索引不跟着插件走(例如插件目录只读、或多人共用一个缓存),设置环境变量 EPLAN_DATA_DIR 指向任意目录,
再把五个 .sqlite 放进去即可;逐个覆盖用 EPLAN2025_DB 等。解析顺序:
EPLAN2025_DB / … / EECPRO_DB (单库覆盖,最高)
EPLAN_DATA_DIR\eplan2025.sqlite …(统一目录)
\data\eplan2025.sqlite …(默认)
cordis.patch.yml 里没有任何绝对路径:每行只写 cmd.exe 和一个相对启动器名(如 scripts\launch-docs2025.cmd),
cwd 由 !!js 表达式在加载时解析成当前插件目录,所以换机器/换盘符不用改 YAML,也不用先跑 setup.ps1 才能搬。
换机器真正要做的是机器本地的东西:重跑一次 setup.ps1 重写 runtime\python-path.txt、把五个 .sqlite 解压进 data\。