
一个MCP服务器,用于验证、自动修复并搭建TwinCAT 3 XML文件。连接到任何LLM客户端,为您的AI助手提供可靠、确定性的TwinCAT代码质量工具——结构性......
概览
一个MCP服务器,用于验证、自动修复并搭建TwinCAT 3 XML文件(.TcPOU,TcIO, .TcDUT,TcGVL)。将其连接到任何LLM客户端,为您的AI助手提供可靠、确定性的TwinCAT代码质量工具——结构检查、21 IEC 61131-3面向对象检测、自动修复流水线和规范骨架生成。 使用该服务器与 Claude Desktop 最简单的方法是使用一键的 .dxt 扩展名: 1. pip 安装 twincat-validator-mcp 2.从最新版本下载 .dxt 文件 3.打开 Claude 桌面 → → → 完整说明和故障排除请参见dxt/README.md。 对于其他客户端(Cursor、VS Code、Windsurf、Cline),服务器使用传输。
概述(AI 翻译)
一个MCP服务器,用于验证、自动修复并搭建TwinCAT 3 XML文件(.TcPOU、.TcIO、.TcDUT、.TcGVL)。将其连接到任何LLM客户端,为您的AI助手提供可靠、确定性的TwinCAT代码质量工具——结构检查、21条IEC 61131-3面向对象检测、自动修复流水线和规范骨架生成。
支持的文件类型
| 扩展 | 描述 |
|---|---|
.TcPOU |
程序组织单元 — 功能模块、程序、功能 |
.TcIO |
输入输出配置 — 接口 |
.TcDUT |
数据单元类型 — 结构、枚举、类型别名 |
.TcGVL |
全局变量列表 |
安装
来自源头
Claude桌面扩展
使用该服务器与 Claude Desktop 最简单的方法是通过一键扩展 .dxt :
pip install twincat-validator-mcp- 下载最新版本中的
.dxt文件 - 打开Claude桌面 → 设置 → 扩展 → 安装扩展
完整说明和故障排除请参见dxt/README.md。
连接大型语言模型客户端
对于其他客户端(Cursor、VS Code、Windsurf、Cline),服务器使用 stdio 传输。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
TwinCAT Validator MCP Server
An MCP server that validates, auto-fixes, and scaffolds TwinCAT 3 XML files (.TcPOU, .TcIO, .TcDUT, .TcGVL). Connect it to any LLM client to give your AI assistant reliable, deterministic TwinCAT code quality tooling — structural checks, 21 IEC 61131-3 OOP checks, auto-fix pipelines, and canonical skeleton generation.
Supported File Types
| Extension | Description |
|---|---|
.TcPOU |
Program Organization Units — Function Blocks, Programs, Functions |
.TcIO |
I/O configurations — Interfaces |
.TcDUT |
Data Unit Types — Structures, Enums, Type Aliases |
.TcGVL |
Global Variable Lists |
Installation
pip install twincat-validator-mcp
From Source
git clone https://github.com/agenticcontrolio/twincat-validator-mcp.git
cd twincat-validator-mcp
pip install -e .
Claude Desktop Extension
The easiest way to use this server with Claude Desktop is via the one-click .dxt extension:
pip install twincat-validator-mcp- Download the
.dxtfile from the latest release - Open Claude Desktop → Settings → Extensions → Install Extension
See dxt/README.md for full instructions and troubleshooting.
Connecting to an LLM Client
For other clients (Cursor, VS Code, Windsurf, Cline), the server uses stdio transport. Add the following to your client’s MCP config file:
Cursor — .cursor/mcp.json
{
"mcpServers": {
"twincat-validator": {
"command": "twincat-validator-mcp",
"args": []
}
}
}
VS Code (Copilot / Continue) — .vscode/mcp.json
{
"servers": {
"twincat-validator": {
"type": "stdio",
"command": "twincat-validator-mcp",
"args": []
}
}
}
Windsurf — ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"twincat-validator": {
"command": "twincat-validator-mcp",
"args": []
}
}
}
Cline (VS Code Extension)
{
"mcpServers": {
"twincat-validator": {
"command": "twincat-validator-mcp",
"args": [],
"disabled": false
}
}
}
MCP Tools
Validation
| Tool | Description |
|---|
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"twincat-validator": {
"command": "twincat-validator-mcp",
"args": []
}
}
}