Twincat MCP logo

Twincat MCP

Manage TwinCAT engineering, PLC runtime diagnostics, deployments, TcUnit tests, and ADS data through three MCP tools.

Install Twincat MCP

Run the project’s own setup commands, in order.

Setup steps from the project

twincat-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    .\scripts\setup.ps1
    
  2. 2. Add to your MCP client
    .\scripts\install-mcp.ps1
    

Overview

twincat-mcp MCP server exposes TwinCAT engineering and runtime workflows through the MCP tools twincat_search, twincat_describe, and twincat_execute. It provides catalog-driven operations for building, deploying, testing with TcUnit, inspecting PLC symbols, and reading runtime data over ADS. Use it from a Windows MCP client when an agent needs validated TwinCAT operations rather than arbitrary scripting. The server uses jobs, receipts, context handles, grants, and confirmations to control longer-running or high-impact actions.

Use cases

  • Build and verify TwinCAT projects
  • Deploy PLC applications to designated targets
  • Run TcUnit workflows and inspect reports
  • Read PLC variables and symbols over ADS
  • Organize TwinCAT project objects and folders

Key features

  • Catalog-driven TwinCAT operations
  • ADS PLC variable and symbol inspection
  • Build, activation, deployment, and restart workflows
  • TcUnit test execution with structured reports
  • Scoped grants and confirmation checks
  • Paged job receipts with idempotent request keys

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

7/7 checks healthy over the last 30d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars37Stargazers on the source repository.
Last commit22d agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Twincat MCP works

What twincat-mcp does

twincat-mcp connects AI clients to TwinCAT engineering projects and PLC runtimes on Windows. Its operation catalog covers project authoring, builds, deployment, runtime inspection, ADS variable access, TcUnit workflows, object and folder management, and controlled job handling. The server exposes three public MCP tools rather than registering every catalog operation as a separate tool.

The catalog contains operations for both engineering contexts and runtime work. Engineering actions can target a selected solution, PLC, and AMS Net ID. Runtime operations can inspect state and symbols or interact with PLC data through ADS. Workflow operations combine validated catalog steps for tasks such as deployment, testing, state polling, and build verification.

How it works

Use twincat_search to locate relevant operation IDs without loading the complete catalog. Call twincat_describe for schemas, prerequisites, and examples for up to five operations, then submit validated work through twincat_execute.

Long-running requests return a job handle, status, and bounded progress. job.wait waits for completion, while job.get inspects a receipt immediately and job.result reads large results in pages. A unique UUID requestKey makes submitted operations idempotent: resending the same operation, arguments, and key returns the existing receipt instead of executing the work again. Intentional repeats require a new key.

Engineering work starts with context.open, which fixes the solution, PLC, target, and optional TwinCAT version for that context. Only one engineering context can own the persistent shell in a server process. Operations that require authorization use scoped grants from safety.grant; high-impact operations may also require the literal confirmation value specified by their schema.

Setup and configuration

The server requires Windows, Python 3.10 or newer, TwinCAT XAE, Visual Studio MSBuild, the .NET Framework 4.7.2 targeting pack, and Beckhoff's TcXaeMgmt PowerShell module. Run the PowerShell setup and installation scripts:

powershell
.\scripts\setup.ps1
.\scripts\install-mcp.ps1

Setup creates a virtual environment, updates pinned packaging tools and reviewed dependencies, and builds TcAutomation.exe with MSBuild. Configure an MCP client with absolute paths to the virtual-environment Python executable and mcp-server/server.py. The installation script can merge an entry into the current VS Code workspace configuration with -Workspace. Reload the server in the client after installation.

Optional Scope configuration creation requires TE13xx and a worker built with Scope support. Scope capture and export are disabled; runtime.record provides bounded ADS recording instead.

Tools and capabilities

The three public tools are:

  • twincat_search searches operation categories and workflows.
  • twincat_describe returns detailed schemas, prerequisites, and examples.
  • twincat_execute validates and runs operations, or manages existing jobs.

Supported catalog capabilities include:

  • Building projects and verifying expected symbols or types against TMC output.
  • Deploying through the existing build, activation, and restart workflow.
  • Configuring and running TcUnit tests with a structured report.
  • Reading PLC variables and symbol information over ADS.
  • Creating, listing, updating, moving, renaming, deleting, and importing TwinCAT or PLCopen project objects.
  • Recording bounded runtime data, exporting libraries, and running ordered sequences of up to 32 validated steps.

Limitations and notes

Scope capture, Scope export, status, stop, and export operations are disabled pending qualification. The server does not provide arbitrary Python or JavaScript execution, and sequences must use catalog operation IDs rather than raw command lines. Nested sequences and control operations are prohibited.

The server is designed as a local trusted stdio service and should not be exposed as an unauthenticated network service. Grants are scoped and expire; revoking one stops later workflow steps, although a native command already dispatched may finish. Existing output files are not overwritten, and library export does not install a library into a repository. Handles from a previous server process expire, and a lost worker invalidates its engineering context.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Twincat MCP

twincat-mcp is an MCP server that connects AI clients to TwinCAT engineering projects and PLC runtimes through ADS. Its main tools search the operation catalog, describe schemas and prerequisites, and validate or execute operations such as builds, deployments, TcUnit tests, runtime inspection, PLC variable reads, and job management.

Run `scripts\setup.ps1` followed by `scripts\install-mcp.ps1` on Windows. The setup creates a virtual environment and builds the automation executable. Configure your MCP client with absolute paths to `.venv\Scripts\python.exe` and `mcp-server\server.py`, then reload the server.

twincat-mcp requires Windows, Python 3.10 or newer, TwinCAT XAE, Visual Studio MSBuild, the .NET Framework 4.7.2 targeting pack, and Beckhoff's `TcXaeMgmt` PowerShell module. Scope configuration creation additionally requires TE13xx and a worker built with Scope support.

Search for an operation with `twincat_search`, inspect its schema using `twincat_describe`, and submit it through `twincat_execute`. Use a new UUID request key for each submitted operation. Longer jobs return handles that can be followed with `job.wait`, `job.get`, or paged `job.result` calls.

Yes. twincat-mcp uses a standard stdio MCP configuration, so it can be configured in Cursor with the server's absolute Python and script paths. The same stdio setup can be used by other MCP clients that support local servers.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTwincat MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/twincat-mcp?style=directory)](https://allmcps.com/mcp/twincat-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/twincat-mcp"><img src="https://allmcps.com/api/badge/twincat-mcp?style=directory" alt="Twincat MCP on AllMCPs" /></a>