eln-mcp
ELN MCP Server
建科 ELN テンプレート編集プラットフォーム MCP Server — 編集ページの4つのTab全機能(66ツール)をカバー。
クイックスタート
cd /Users/slouch/Desktop/eln-mcp
npm install
npx playwright install chromium
npm run buildRelated MCP server: Work Note MCP Server
Cursor MCP 設定
必須: ELN_USERNAME、ELN_PASSWORD(MCP設定のenvにのみ記述、ソースコードにデフォルト値はありません)
{
"mcpServers": {
"eln-form-design": {
"command": "node",
"args": ["/Users/slouch/Desktop/eln-mcp/dist/index.js"],
"env": {
"ELN_BASE_URL": "http://10.1.228.52:13002/api/v1",
"ELN_USERNAME": "your_username",
"ELN_PASSWORD": "your_password",
"ELN_HEADLESS": "true"
}
}
}
}環境変数 | 必須 | 説明 |
| 必須 | ログインユーザー名 |
| 必須 | ログインパスワード |
| 任意 | APIアドレス、デフォルト |
| 任意 | デフォルト |
| 任意 | Tokenキャッシュパス |
ユーザーを切り替える場合は、MCP設定の ELN_USERNAME / ELN_PASSWORD のみを変更し、MCPを再起動するだけです。
プログラムレベルの制約
禁止(ハードコードによるブロック):
activate_template、initiate_change、検出レコード送信系ツール制限なしカテゴリ範囲:任意のカテゴリで create/save/edit 可能(ELNアカウントの権限による)
コンポーネント追加・削除・変更 MCP ツール
操作 | ツール |
追加 |
|
削除 |
|
属性の変更 |
|
選択肢の変更 |
|
検証の変更 |
|
レスポンダーの変更 |
|
コピー/移動/並べ替え |
|
全体置換 |
|
変更はすべてメモリ上で有効になり、save_template でデータベースに保存する必要があります。
ツールモジュール
モジュール | ツール数 | 説明 |
auth | 2 | login, check_auth |
query | 8 | カテゴリ/テンプレート/ログの照会 |
template | 8 | テンプレートのライフサイクル |
form + form-ext | 21 | フォームTab |
data + data-ext | 16 | データ設定Tab |
table + table-ext | 9 | テーブルTab |
preview | 2 | 検証 + プレビューセッション |
session | 1 | get_session |
詳細は docs/wiki/模板编辑.md を参照してください。
Available Tools
66 toolsadd_componentA
向当前表单添加一个组件。支持完整的 ELN 组件体系:
表单组件: Input, Number, TextArea, Select, DatePicker, DatePicker.RangePicker, TimePicker, TimePicker.RangePicker, Switch, Radio, Checkbox, Slider, TreeSelect, Cascader, Transfer
容器/布局: Card, FormGrid, FormGrid.GridColumn, FormLayout, FormCollapse, FormCollapse.CollapsePanel, Space, Tabs, Tabs.TabPane
表格类: Table, TableRow, TableCell, ArrayTable, ArrayTable.Column, ArrayTable.Index, ArrayFixTable, ArrayFixTable.Column, ArrayFixTable.RowTitle
展示/数组: Text, FormattedText, ArrayCards 容器组件可包含子组件,通过 parentPath 指定父级路径。 详细属性配置请参考 Skill 文件: eln-component-catalog
Inputs: name (required), type (required), title (required), display, +5 more.
add_detection_date_itemC
添加一条检测日期字段绑定(DatePicker / DatePicker.RangePicker)。
Inputs: path (required), component (required), valueKind (required), id, +1 more.
add_formulaC
添加或更新计算公式。ELN 内置 22 个函数。详细语法见 Skill: expression-engine.md
Inputs: title (required), variables (required), expression (required), writeFormValue (required), +1 more.
add_grid_columnC
向 FormGrid 添加 GridColumn 子节点。
Inputs: gridPath (required), columnName (required), title.
add_output_itemC
添加或更新输出值。名称格式: raw##{卡片标题}-{字段标题}##{字段名}
Inputs: cardTitle (required), fieldName (required), fieldTitle (required), id.
bind_cell_dataC
将表格单元格绑定到表单字段。绑定后单元格的值会随表单字段自动更新。
Inputs: cellKey (required), bindType (required), fieldPath (required).
bind_cell_loopC
绑定单元格区域到 ArrayTable 等循环数据(bind_loop)。
Inputs: cellKey (required), arrayPath (required), columnField (required).
check_authA
检查当前 token 是否仍然有效。
Inputs: no named parameters.
copy_componentC
复制组件子树到新 name,可指定新 parentPath。
Inputs: newName (required), sourcePath (required), parentPath.
copy_templateC
复制模板并选中新模板。
Inputs: sourceTemplateId (required), newName.
create_preview_sessionC
POST /template-preview/session 生成外部分享预览 token。
Inputs: versionId, templateId.
create_templateA
创建新模板并选中为当前编辑模板。需先 login。
Inputs: name (required), categoryId (required), sampleName (required), standard.
delete_rowC
删除指定行。
Inputs: row (required).
delete_templateC
删除指定模板。
Inputs: templateId (required).
get_category_treeB
获取完整的分类树结构,包含分类 → 样品的层级关系。
Inputs: no named parameters.
get_data_configB
获取当前会话完整数据配置(公式、输出值、检测日期)。
Inputs: no named parameters.
get_schemaA
获取当前会话的完整 Formily Schema JSON。用于检查当前表单结构。
Inputs: no named parameters.
get_sessionA
查看当前编辑会话:模板 ID、版本 ID、组件数、公式数等。设计前/保存前用于确认状态。
Inputs: no named parameters.
get_table_templateB
获取当前会话中的表格模板 JSON。
Inputs: no named parameters.
get_template_detailA
获取模板完整详情,含版本信息(草稿版本、当前版本、启用版本)。不加载到编辑会话,仅查看。
Inputs: templateId (required).
init_array_fix_tableC
创建固定行数表格骨架。适用于平行测定等固定行场景。
Inputs: name (required), title (required), columns (required), rowCount (required), +1 more.
init_array_tableC
创建自增表格骨架(含序号/操作列、添加按钮)。列内字段路径形如 tableName.colName.fieldName。
Inputs: name (required), title (required), columns (required), parentPath.
init_form_tableD
创建表单内 Table/TableRow/TableCell 矩阵布局。
Inputs: cols (required), name (required), rows (required), title (required), +1 more.
insert_rowC
在指定行索引插入空行。
Inputs: at (required).
list_categoriesB
获取所有检测分类列表。创建模板时需要 categoryId。
Inputs: no named parameters.
list_componentsA
列出当前表单中所有组件的树形结构。每个组件显示路径、标识、类型和标题。
Inputs: no named parameters.
list_component_typesA
列出编辑页组件库全部类型(与平台设计器左侧面板一致)。add_component 的 type 参数从此列表选择。
Inputs: no named parameters.
list_detection_date_itemsB
列出当前检测日期配置项。
Inputs: no named parameters.
list_expression_functionsA
列出 ELN 表达式引擎 22 个内置函数。
Inputs: no named parameters.
list_formulasA
列出当前会话中所有计算公式。
Inputs: no named parameters.
list_output_itemsA
列出当前会话中所有输出值配置。
Inputs: no named parameters.
list_samplesA
查询指定分类下的样品列表。创建模板时需要知道样品属于哪个分类。
Inputs: categoryId (required).
list_submission_logsA
分页查询提交日志。返回提交类型、创建者、任务 ID 等信息。
Inputs: current, pageSize.
list_templatesA
分页查询模板列表。可按分类筛选或按名称搜索。返回每个模板的 ID、名称、状态、版本等信息。
Inputs: name, current, pageSize, categoryId.
list_template_versionsD
GET 版本历史列表。
Inputs: templateId.
loginA
通过浏览器自动化登录 ELN 平台,获取 JWT token。首次使用或 token 过期时调用。登录后会缓存 token 24 小时。
Inputs: password, username.
merge_cellsD
合并单元格区域。
Inputs: endCol (required), endRow (required), startCol (required), startRow (required).
move_componentB
将组件移动到新的 parentPath(先删后加)。
Inputs: path (required), newName, newParentPath.
remove_componentA
从当前表单中删除指定组件。支持删除容器组件(会连同子组件一起删除)。
Inputs: path (required).
remove_detection_date_itemC
删除一条检测日期配置项。
Inputs: id (required).
remove_formulaC
按 ID 删除计算公式。
Inputs: id (required).
remove_output_itemB
按 ID 删除输出值配置。
Inputs: id (required).
remove_reactionsC
删除字段的 x-reactions。
Inputs: path (required).
remove_validatorC
按索引删除 x-validator 规则。
Inputs: path (required), index (required).
reorder_componentC
设置组件 x-index 排序值。
Inputs: path (required), index (required).
reorder_formulasB
按 ID 顺序重排 expressionItems。
Inputs: ids (required).
reset_schemaA
清空当前表单 Schema,重新开始设计。注意:不影响已保存到服务器的数据。
Inputs: no named parameters.
save_templateB
PATCH 保存 formTemplateJson + extra + tableTemplateJson。
Inputs: no named parameters.
search_templatesB
搜索模板(GET /form-template/search)。支持 categoryId、name 筛选。
Inputs: name, current, pageSize, categoryId.
select_templateD
选择模板并加载 Schema/extra/table 到内存。
Inputs: templateId (required).
set_cell_styleC
设置单元格样式索引或样式属性。
Inputs: col (required), row (required), bold, style, +1 more.
set_controlled_noC
设置受控编号(需全局唯一)。
Inputs: controlledNo (required).
set_detection_dateA
设置检测日期全局策略(missingPolicy、outputFormat)。不修改已有 items,除非传入 items 全量替换。
Inputs: missingPolicy (required), items, outputFormat.
set_enum_optionsC
设置 Select/Radio/Checkbox 的可选项(enum 字段)。
Inputs: path (required), options (required).
set_form_settingsA
设置表单级属性(右侧「表单」面板):labelCol、wrapperCol、labelWrap、layout 等。
Inputs: layout, fullness, labelCol, labelWrap, +1 more.
set_full_extra_configA
一次性设置完整 extra(expressionItems、outputItems、detectionDateConfig)。覆盖此前数据配置。
Inputs: extra (required).
set_full_schemaA
直接设置完整的 Formily Schema JSON。适用于从已有模板复制 Schema 或 AI 一次性生成完整表单结构。会覆盖之前所有细粒度操作。
Inputs: schema (required).
set_propertyB
修改已添加组件的属性。可设置任意 x-component-props 或 x-decorator-props 字段。 属性名映射请参考 Skill 文件: formily-schema-guide.md
Inputs: key (required), path (required), propType (required), value.
set_reactionsC
设置 x-reactions 响应器规则。
Inputs: path (required), reactions (required).
set_spreadsheet_cellC
设置 x-spreadsheet 单元格文本(表格搭建 Tab)。行/列从 0 开始。
Inputs: col (required), row (required), text (required), style.
set_table_templateA
设置完整的表格模板 JSON(x-spreadsheet 格式)。通常用于从已有模板复制表格配置。详细表格结构请参考 Skill 文件: table-building.md。
Inputs: tableJson (required).
set_validatorC
添加校验规则到 x-validator 数组。
Inputs: path (required), rule (required).
update_formulaC
按 ID 更新已有公式。
Inputs: id (required), title, variables, expression, +1 more.
update_output_itemC
按 ID 更新输出值 name。
Inputs: id (required), name (required).
update_template_metadataB
PATCH 更新 remark/spec/testingItemName,不改 Schema。
Inputs: spec, remark, testingItemName.
validate_templateB
检查当前会话 Schema/extra 完整性(本地校验,非 UI 预览)。
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 66 tools
Most tools have clear, distinct purposes (e.g., list_templates vs search_templates, get_schema vs list_components). However, there is overlap between add_formula/update_formula and add_output_item/update_output_item since the 'add' variants also support updating by ID, which could cause misselection.
The toolset largely follows a verb_noun snake_case pattern (list_, get_, set_, add_, remove_, etc.). Minor inconsistencies exist: mixing 'delete' and 'remove' for destruction (delete_template vs remove_component), and verbs like 'set' vs 'update' for the same action (set_full_schema vs update_*).
At 66 tools, the count is far above the 25+ threshold for 'too many'. While the domain is broad (template design, schema editing, table building, formulas, auth), the sheer number makes it heavy and potentially overwhelming for agents, despite each tool being reasonably scoped.
The toolset covers the full lifecycle of ELN template design: authentication, CRUD for templates, schema manipulation (components, properties, validators, reactions), table construction (rows, cells, bindings, styles), formulas/output items, detection date config, validation, and preview. No significant gaps are evident for the stated purpose.
Related MCP Connectors
Detect, review and fill existing PDF forms from JSON or Excel; reuse saved templates
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Search, read, and automate TextMine documents, records, workflows, integrations, and agent tasks.
30+ deterministic dev and delivery tools: linting, metrics, diagrams, model advice, AI-text checks.
Related MCP Servers
- -licenseCqualityNot gradedmaintenanceEnables AI to create, edit, and batch generate JSON data with advanced rule engines. Supports CRUD operations, node-level editing, template management, and multi-format file exports (JSON, JSONL, CSV).3179 npm-
- -licenseNot gradedqualityNot gradedmaintenanceEnables automatic creation and management of weekly work reports in Korean through structured templates. Organizes work tasks and issues with automatic file management, backup/rollback, and 100% template compliance through JSON Schema validation.-
- FlicenseBqualityBmaintenanceEnables programmatic CAD modeling with Onshape's REST API, offering 45 tools for parametric sketches, feature management, assemblies, analysis, variables, and exports.48166-
- FlicenseNot gradedqualityDmaintenanceAutomates three core workflows for Sangfor Engineer: project all-in-one (Excel to guide to validation to report), equipment health check, and Obsidian wiki integration.-