EtherCAT MCP Server
Click on "Deploy 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., "@EtherCAT MCP ServerScan the EtherCAT bus and tell me which slaves are connected and their states."
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.
EtherCAT MCP Server
面向工业自动化与机器人控制的 EtherCAT Model Context Protocol (MCP) 服务。让 Claude Code、Codex CLI、Antigravity、Cursor 等 AI 工具能够直接与 EtherCAT 现场总线交互,实现从站拓扑扫描、ESM 状态机调度、CoE (CANopen over EtherCAT) SDO 读写、PDO 周期过程数据交互、CiA 402 伺服运动控制以及总线健康诊断。
内置高保真虚拟总线仿真器,开箱即用,无需真实硬件或专用网卡权限即可完成全流程调试与闭环测试。
🌟 核心特性
🚀 全面支持标准 ESM 状态机:无缝调度总线与各从站的
INIT、PRE-OP、BOOT、SAFE-OP、OP状态转换与 AL 错误复位。⚡ CoE 对象字典全功能支持:任意读取/写入 SDO 索引与子索引(支持十六进制如
0x6040、0x1018与十进制)。🔄 PDO 周期数据交互:实时读取数字量/模拟量输入、伺服编码器位置与状态字;高速下发数字量输出与运动指令。
🦾 内置 CiA 402 伺服驱动状态机:提供高层运动控制工具(电机使能、停机、急停、故障复位、点动/位置定位、速度模式)。
🌐 零门槛高仿真虚拟总线:自带由倍福(Beckhoff)与汇川(Inovance)经典设备构成的 5 从站虚拟链路,离线即测。
🔌 硬件网关无缝接入:支持无缝对接原生 EtherCAT 主站后台(SOEM daemon / IgH EtherCAT Master / TwinCAT ADS 桥接)。
Related MCP server: codesys-mcp-server
🏗️ 架构图
┌────────────────────────────────────────────────────────┐
│ AI Assistants (Claude / Codex / Antigravity) │
└───────────────────────────┬────────────────────────────┘
│ MCP Protocol (stdio)
▼
┌────────────────────────────────────────────────────────┐
│ ethercat-mcp Server │
│ - 12 Native MCP Tools (ESM, SDO, PDO, CiA 402) │
└─────────────┬────────────────────────────┬─────────────┘
│ (Simulation Mode) │ (Hardware Mode)
▼ ▼
┌───────────────────────────┐ ┌─────────────────────────┐
│ Built-in Virtual Bus │ │ Native Master Gateway │
│ - EK1100 (Bus Coupler) │ │ (SOEM / IgH / ADS) │
│ - EL1008 (8-Ch DI) │ └───────────┬─────────────┘
│ - EL2008 (8-Ch DO) │ │ Ethernet Raw Socket
│ - EL3064 (4-Ch AI 0-10V) │ ▼
│ - SV660N (CiA 402 Servo) │ ┌─────────────────────────┐
└───────────────────────────┘ │ Real EtherCAT Slaves │
└─────────────────────────┘🛠️ MCP 工具列表 (Tools)
工具名称 | 功能描述 | 典型参数示例 |
| 扫描总线上的所有从站设备并输出厂商、型号代码、固件版本、序列号及状态 |
|
| 查询特定从站的软硬件详情、CoE 对象字典映射及 PDO 配置 |
|
| 输出 EtherCAT 总线物理网线级联拓扑关系与端口链路状态 |
|
| 查询总线主站或指定从站的 ESM 当前状态与 AL 状态码 |
|
| 请求总线或特定从站执行状态迁移 ( |
|
| 读取 CoE 对象字典条目(支持十六进制索引) |
|
| 向 CoE 对象字典写入参数值 |
|
| 读取周期过程输入映像 (TxPDO: 数字量/模拟量/当前位置速度) |
|
| 下发周期过程输出映像 (RxPDO: 继电器开闭/控制字/目标位置) |
|
| 获取总线通信质量报告(周期时间、抖动、丢包率、CRC 错误) |
|
| 复位从站 AL 报警及驱动器故障状态 |
|
| 高层 CiA 402 伺服电机控制快捷工具(使能/去使能/回零/定位) |
|
⚡ 快速接入与配置
1. Claude Code
claude mcp add -s user ethercat -- npx -y ethercat-mcp2. Codex CLI
codex mcp add ethercat -- npx -y ethercat-mcp3. Claude Desktop
在 claude_desktop_config.json 中追加:
{
"mcpServers": {
"ethercat": {
"command": "npx",
"args": ["-y", "ethercat-mcp"]
}
}
}4. 真实硬件网关模式 (SOEM / TwinCAT ADS)
若要连接外部工业总线主站守护进程:
npx ethercat-mcp --hardware --endpoint=http://127.0.0.1:8088🤖 典型 AI 交互示例
连接完成后,您可以直接在 AI 中输入自然语言:
扫描总线拓扑:
“帮我扫描一下当前 EtherCAT 总线挂载了哪些设备,现在的通信状态是什么?”
电机上电与位置运动:
“把 4 号从站伺服驱动器使能上电,并控制它运动到位置 25000 脉冲。”
读取 IO 终端信号:
“读取 1 号从站 EL1008 的所有输入通道电平,以及 3 号从站当前的模拟量电压。”
故障诊断与排除:
“检查总线是否有丢包或者 CRC 校验错误,如果驱动器报错请帮我读取 0x603F 并复位报警。”
💻 本地构建与测试
# 克隆仓库
git clone https://github.com/LckAndLove/ethercat-mcp.git
cd ethercat-mcp
# 安装依赖
npm install
# 类型检查与编译
npm run check
npm run build
# 运行自动化单元测试
npm test📄 License
MIT License © 2026 LckAndLove
Available Tools
12 toolsdrive_controlC
High-level CiA 402 Servo Drive Motion Control (enable, disable, quick_stop, fault_reset, move_velocity, move_position).
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Drive control action | |
| target | No | Target position (inc) or target velocity (inc/s) | |
| slaveIndex | No | Slave index of the CiA 402 drive (default 4) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral-disclosure burden. It names the actions but does not explain their effects, safety implications, prerequisites, whether they mutate drive state, or what happens on enable/disable/quick_stop/fault_reset.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no waste. The parenthetical action list is compact and directly supports the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no annotations and no output schema, the description should explain safety, state changes, and action-specific parameter behavior. It does not address whether target is required for motion actions, how fault_reset interacts with reset_error, or what a caller should expect after each action.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, including descriptions for action, target, and slaveIndex, so the baseline is 3. The description only repeats the action enum and adds no additional meaning about target units, action-specific target requirements, or the slaveIndex default.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that this is a CiA 402 servo drive motion-control tool and enumerates its six actions. The verb+resource are clear, but it does not distinguish itself from siblings such as reset_error, write_sdo, or set_esm_state.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lists available actions but gives no guidance on when to use this tool versus alternatives. In particular, it does not clarify how fault_reset differs from the sibling reset_error or when to prefer drive_control over ESM/SDO operations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_diagnosticsA
Get EtherCAT bus diagnostic metrics including frame loss, jitter, cycle time, CRC errors, and active AL errors.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. Listing the concrete metrics is useful context and 'Get' implies a non-mutating read, but it doesn't say whether the call samples live data, takes a snapshot over time, could affect bus traffic, or requires specific permissions — meaningful gaps for a fieldbus diagnostic read.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence that leads with the verb and resource, then packs the metric list with zero filler. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no annotations exist, but the description enumerates the returned metrics, which substantially compensates for the missing return-value documentation. It is nearly complete for a zero-parameter read; only live-vs-snapshot behavior and any bus-load caveats are absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4; there is no parameter meaning the description needs to supplement, and the schema is trivially complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description gives a specific verb ('Get') and resource ('EtherCAT bus diagnostic metrics') and enumerates the exact metrics returned, so the agent knows precisely what it retrieves. It does not explicitly contrast itself with siblings like get_slave_info or get_topology, but the resource scope is distinctive enough to avoid confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied — an agent can infer this is for monitoring/troubleshooting bus health, but the description never states when to call it versus get_esm_state, get_slave_info, or reset_error. No prerequisites, exclusions, or alternative routing are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_esm_stateA
Query the EtherCAT State Machine (ESM) state (INIT, PREOP, BOOT, SAFEOP, OP) for the bus or a specific slave.
| Name | Required | Description | Default |
|---|---|---|---|
| slaveIndex | No | Optional slave index. If omitted, queries the master/bus state. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations at all, the description carries the full behavioral burden. 'Query' correctly signals a safe read, and listing the possible state values compensates for the missing output schema, but nothing is said about permissions, behavior on an out-of-range slaveIndex, or whether the call fails when the bus is down.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler; the enumerated state list earns its place because no output schema exists to convey return values.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-optional-parameter query tool, the description plus schema cover what an agent needs to invoke it, and the state enumeration substitutes well for the absent output schema. Only error/failure conditions are left unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description's 'for the bus or a specific slave' merely paraphrases what the schema's slaveIndex description already states, adding no new syntax or constraint detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Query') and resource ('EtherCAT State Machine state') and enumerates the five possible states, which pins down exactly what is returned. It implicitly contrasts with the mutating sibling set_esm_state through 'Query', but never names it explicitly, so it falls short of full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer this is the read-side counterpart to set_esm_state, but the description never says when to reach for this versus get_diagnostics, get_slave_info, or scan_slaves. No exclusions or prerequisites are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_slave_infoA
Get detailed information, SDO object dictionary, and PDO mappings for a specific slave device.
| Name | Required | Description | Default |
|---|---|---|---|
| slaveIndex | Yes | Slave index on the bus (0-based) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the behavioral burden. 'Get' implies a read-only operation and the description lists the kinds of data returned, but it does not explicitly confirm no side effects, permissions required, or response format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. Every element—detailed information, SDO object dictionary, PDO mappings, specific slave—earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter read tool with no output schema, the description does list the returned content categories. However, without annotations or an output schema, it does not describe the return structure or whether all categories are always present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the schema already explains that slaveIndex is a 0-based bus index. The description adds no parameter-specific meaning beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (Get) and resource (slave info, SDO object dictionary, PDO mappings) for a specific slave device. It implicitly distinguishes itself from read_sdo/read_pdo by describing dictionary and mapping retrieval, but it does not explicitly name or contrast those siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for a specific slave device' implies when the tool is relevant, but there is no explicit guidance on when to use this versus read_sdo, read_pdo, scan_slaves, or get_diagnostics. Usage is inferred rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_topologyA
Get the physical cable connection topology of the EtherCAT bus (port-to-port connections).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. 'Get' implies a side-effect-free read and the tool takes no parameters, which conveys a safe profile implicitly, but nothing is said about needing a live/connected bus, error behavior when the bus is down, or ordering/cost of the result.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that front-loads the verb and the resource with a clarifying parenthetical. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-param read tool with no annotations and no output schema, the parenthetical '(port-to-port connections)' gives the agent a reasonable idea of the returned structure. A brief note on whether output is per-slave port pairs or a flat link list would close the remaining gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Get') and a precise resource ('physical cable connection topology of the EtherCAT bus, port-to-port'). This is clearly distinct from siblings like get_slave_info or scan_slaves, though the description never names those siblings to make the contrast explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No statement of when to call this versus scan_slaves or get_slave_info, and no preconditions (e.g., bus must be in a certain state). The use case is only inferable from the word 'topology', which is not the same as guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_pdoB
Read cyclic process data (TxPDO inputs: Digital Inputs, Analog Voltages, Motor feedback position/velocity).
| Name | Required | Description | Default |
|---|---|---|---|
| slaveIndex | No | Optional slave index. If omitted, reads all slaves. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It implies a read operation and lists data categories, but it does not state side effects, permissions, whether the read is non-destructive, or what the returned data looks like.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no wasted words. It efficiently conveys the operation and the data categories involved.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with one fully documented optional parameter, the description covers the domain and data categories. However, with no annotations and no output schema, it omits return behavior and operational traits that would make the definition complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema fully documents the single optional parameter, slaveIndex, including that omitting it reads all slaves. The description adds no parameter-specific meaning beyond the schema, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Read cyclic process data' and scopes it to TxPDO inputs. It is clear what the tool does, though it does not explicitly contrast itself with sibling tools such as read_sdo or write_pdo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives. The description implies usage through the phrase 'cyclic process data (TxPDO inputs),' but it never names read_sdo, write_pdo, or any condition that would select one over another.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_sdoA
Read a CANopen over EtherCAT (CoE) SDO object by Index (e.g. 0x6041 or "0x6041") and SubIndex.
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | SDO Index, hex string (e.g. "0x6041") or integer | |
| subIndex | No | SDO SubIndex (default 0) | |
| slaveIndex | Yes | Slave index on the bus |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It states that the operation is a read, but does not disclose return format, error behavior for invalid slave/index, communication side effects, or any safety/permission context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no filler. It immediately names the operation, protocol, resource, and key parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for selection and parameter identification, but with no output schema it does not explain what read_sdo returns or how errors are surfaced. For a read operation, that missing return-value context is a clear gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents index, subIndex, and slaveIndex. The description only repeats the index/subIndex examples and adds no meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Read') and resource ('CANopen over EtherCAT (CoE) SDO object') and clarifies the required Index/SubIndex format. This clearly distinguishes it from the write_sdo sibling and lets an agent identify the operation without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'Read a ... SDO object by Index ... and SubIndex,' but the description does not explicitly say when to choose this over read_pdo, get_slave_info, or write_sdo. No prerequisites or exclusions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reset_errorB
Reset slave AL errors, clear alarms, and perform CiA 402 drive fault reset.
| Name | Required | Description | Default |
|---|---|---|---|
| slaveIndex | No | Optional slave index. If omitted, resets all slaves. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full behavioral burden, and it leaves key things unstated: whether the drive must be stopped before a fault reset, whether clearing alarms is recoverable, whether a bulk reset of all slaves is risky, and what the operation returns. It identifies the error classes cleared but not the operational consequences or prerequisites.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence that names the action and the three fault domains it clears, with no filler. Nothing is buried or redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations and no output schema, the definition is only minimally sufficient. The parameter is covered by the schema, but safety prerequisites, scope of impact when resetting all slaves, and post-reset state are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is a single optional parameter with 100% schema description coverage, including the important 'if omitted, resets all slaves' behavior. The description itself adds nothing about slaveIndex, so the schema baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('reset') and enumerates exactly what is reset: slave AL errors, alarms, and CiA 402 drive fault reset. That is concrete enough to distinguish it from diagnostic or control siblings like get_diagnostics or drive_control, though it does not name a sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The fault categories imply when the tool applies (after an AL error, alarm, or CiA 402 fault), but there is no explicit when-to-use guidance, no preconditions, and no pointer to alternatives such as reading diagnostics first. Usage is inferred rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_slavesA
Scan the EtherCAT bus and list all connected slave devices with identity, current state, and port links.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It usefully discloses the payload shape (identity, current state, port links), which matters because there is no output schema, but it omits whether a bus scan is intrusive, how long it takes, or what happens to slave states during scanning.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One front-loaded sentence: action first, returned fields second. No filler or repetition of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-arg tool with no annotations and no output schema, the description does cover the returned field categories, but it leaves out side effects/latency and any guidance on follow-up tools, which are the main remaining gaps an agent would care about.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Zero parameters, so the schema baseline of 4 applies; nothing about parameters needs explaining and the description correctly makes no parameter claims.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource (scan the EtherCAT bus, list slave devices) plus a statement of what is returned. It implicitly distinguishes itself from get_slave_info/get_topology by describing discovery of all connected slaves, but never names those siblings explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: the word 'Scan' suggests a discovery step before targeted reads like get_slave_info or read_sdo. There is no explicit when-to-use, no condition for preferring get_topology, and no prerequisites (e.g., bus must be in a safe state).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_esm_stateB
Request an EtherCAT State Machine (ESM) transition (INIT, PREOP, BOOT, SAFEOP, OP) for a slave or all slaves.
| Name | Required | Description | Default |
|---|---|---|---|
| slaveIndex | No | Optional slave index. If omitted, applies to all slaves and master. | |
| targetState | Yes | Target ESM state |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It says a transition is requested but does not disclose whether this mutates slave state, what happens to running motion, what permissions are required, or how failures are reported.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The definition is a single front-loaded sentence with no wasted wording. The operation, valid states, and target scope are all presented efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a potentially consequential ESM state-transition command with no annotations and no output schema. The description covers invocation basics but omits behavioral context such as prerequisites, side effects, and response expectations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameter semantics are already fully documented. The description reinforces the target-state enum and slave/all-slave scope, but does not add meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: requesting an EtherCAT State Machine transition, and enumerates the valid target states. It is clearly distinguishable from the sibling `get_esm_state` by describing a transition request rather than a state read.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus alternatives such as `get_esm_state` or `reset_error`. It only implies that the tool is used to change ESM state, without naming exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_pdoB
Write cyclic output process data (RxPDO outputs: Digital Outputs, motor target position/controlword).
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Key-value map of process data outputs to set | |
| slaveIndex | Yes | Slave index on the bus |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden and largely fails it. It does not state that writing RxPDO values immediately affects live device/motor behavior, whether values persist or are one-shot cyclic writes, what happens on an invalid key or non-operational slave, or any failure semantics for an industrial control mutation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no filler; the core action and resource come first and the examples follow compactly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a live-hardware mutation with nested untyped parameters, no annotations, and no output schema, the description is thin: it omits preconditions, safety implications, error behavior, and key naming for the values map. An agent could formulate the call but not predict its effects or failure modes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline would be 3, but the description adds real meaning for the untyped `values` object (additionalProperties: {}) by naming the kinds of outputs it expects: digital outputs and motor target position/controlword. It does not explain how keys are formed (name vs index), which is the remaining gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb ("Write") plus a specific resource ("cyclic output process data / RxPDO outputs"), with parenthetical examples of what that data covers (Digital Outputs, motor target position/controlword). This differentiates it from write_sdo and read_pdo by direction and data type, though no sibling is named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this versus write_sdo or drive_control, and no stated preconditions (e.g., slave must be in Operational ESM state for RxPDO writes). The agent must infer the context entirely from the tool name and domain knowledge.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_sdoC
Write a value to a CANopen over EtherCAT (CoE) SDO object by Index and SubIndex.
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | SDO Index, hex string (e.g. "0x6040") or integer | |
| value | Yes | Value to write (number or string) | |
| subIndex | No | SDO SubIndex (default 0) | |
| slaveIndex | Yes | Slave index on the bus |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, yet says nothing beyond the mutation itself: no statement about persistence after power cycle, SDO abort/error behavior, timeouts, required device state, or whether value size is dictated by the object dictionary entry. For a write tool on hardware this is a meaningful gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with zero filler — the verb and resource lead. It carries no wasted text, though its brevity leaves the behavioral gaps noted elsewhere.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no annotations means the description must cover the full picture for a hardware-mutating call, but it omits device-state preconditions, error/abort semantics, and persistency. The rich schema only covers parameter shape, not behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so index, subIndex (default 0), value and slaveIndex are already documented in the schema with formats. The description only restates Index and SubIndex, adding no meaning beyond the schema; baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (write) and resource (CoE SDO object) addressed by Index/SubIndex, which inherently separates it from read_sdo and the PDO siblings. It stops short of naming an alternative explicitly, but the object-dictionary framing is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use SDO versus the sibling write_pdo, no prerequisites (e.g. whether the slave must be in a particular EtherCAT state), and no mention of what happens on failure. The agent must infer usage purely from the terminology.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
12 tool updates
v1.0.0- First observed
drive_control - First observed
get_diagnostics - First observed
get_esm_state - First observed
get_slave_info - First observed
get_topology - First observed
read_pdo - First observed
read_sdo - First observed
reset_error - First observed
scan_slaves - First observed
set_esm_state - First observed
write_pdo - First observed
write_sdo
TDQS
Scored across 12 tools
Each tool maps to a distinct resource/action (SDO vs PDO vs ESM vs diagnostics), and descriptions clarify the boundaries. Minor overlap exists between reset_error and drive_control's fault_reset action, and set_esm_state vs reset_error both touch fault/alarm clearing, but an agent can reasonably distinguish them.
Almost all tools use a clean verb_noun pattern (read_sdo, write_pdo, get_diagnostics, scan_slaves, set_esm_state). The lone outlier is drive_control, which inverts to noun_verb and slightly stands out.
12 tools is well within the ideal 3-15 range and each covers a meaningful EtherCAT operation (discovery, state machine, SDO/PDO I/O, diagnostics, drive control). No filler tools are present.
The surface covers the full master lifecycle: bus scan, topology, ESM get/set, SDO and PDO read/write, diagnostics, error reset, and CiA 402 drive control. Gaps are minor — no explicit PDO mapping/configuration write or slave EEPROM/firmware operations — but core workflows are fully supported.
Related MCP Connectors
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
Connect your AI to your own devices, 3D printers, factory tools and a shared agent task pool.
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with B\&R Automation Studio projects by building code, running ARsim simulators, and reading or writing OPC UA variables. It facilitates industrial automation development and real-time variable integration through natural language commands.15MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to automate CODESYS V3 PLC development, including project editing, builds, library and alarm management, online variable read/write/force operations, and CODESYS documentation search via MCP.3MIT
- AlicenseNot gradedqualityAmaintenanceExposes 20 vehicle-security tools to AI coding agents such as Claude Code and Cursor, enabling them to send, fuzz, and analyze CAN frames, run UDS diagnostics and seed-key handshakes, simulate DoIP ECUs, and decode ISO-TP, J1939, DBC, and V2X data. Everything runs against a virtual CAN bus, so no vehicle or hardware is required.1MIT
- AlicenseCqualityAmaintenanceEnables an AI agent to drive a Beckhoff TwinCAT 3 setup end to end: read and write live PLC variables and system state over ADS, manage files and processes on the target IPC, build and edit projects through the XAE automation interface, capture and analyze long-running signal recordings, run scripted test benches and TcUnit suites, and look up the official Beckhoff Infosys documentation. Runs as a single Python process on the engineering PC with read-only, guarded, and full safety modes plus human-in-the-loop confirmation for destructive operations.1711MIT