Skip to main content
Glama

TwinCat-MCP Documentation

Deploy docs Docs License

Source for the public user documentation of TwinCat-MCP, an MCP server for TwinCAT 3 PLC development that lets AI coding agents (Claude Code, GitHub Copilot CLI, Cursor) build, configure, deploy, and debug TwinCAT PLC projects through a standard tool interface.

πŸ“– Live site: docs.twincatmcp.qubernetic.com

Built with MkDocs Material. This repository holds the documentation content only; the product itself lives in a separate private repository.

Local development

The theme, logo and fonts come from the Qubernetic brand package, a private git submodule at brand/. Without access to it a local build of the site fails. Content changes are still welcome as pull requests. CI builds and checks a pull request from a branch of this repository. A pull request from a fork runs only the workflow rules, because forks get no access to the theme, and a maintainer builds it before merging.

The submodule is set to update = none, so git clone --recurse-submodules succeeds and leaves brand/ empty. With access to the brand repository, fetch it explicitly:

git clone https://github.com/qubernetic/TwinCat-MCP-Docs.git
cd TwinCat-MCP-Docs
git submodule update --init --checkout brand

The submodule URL is HTTPS. If you reach GitHub over SSH only, have git rewrite it on the command line:

git -c url."git@github.com:".insteadOf=https://github.com/ submodule update --init --checkout brand

The rewrite is not saved, so give later git submodule update --checkout brand runs the same -c option.

update = none applies to later updates as well. After the brand pin changes (a pull, or switching branches), run git submodule update --checkout brand again, or you keep building with the old theme.

The lock targets Python 3.12. Serve or build the site with uv:

uv run --python 3.12 --with-requirements requirements.txt mkdocs serve           # live preview at http://127.0.0.1:8000
uv run --python 3.12 --with-requirements requirements.txt mkdocs build --strict  # the CI build; must pass

Or in a virtual environment with Python 3.12:

python3.12 -m venv .venv
source .venv/bin/activate          # Windows: .venv\Scripts\activate
pip install --require-hashes -r requirements.txt
mkdocs serve

The build draws the social cards with the Cairo graphics library (libcairo.so.2 on Linux), which pip and uv do not install. On Debian or Ubuntu, install it with sudo apt-get install libcairo2.

Related MCP server: TwinCAT Validator MCP Server

Repository layout

mkdocs.yml                     # site config: theme, nav, plugins
brand/                         # git submodule: Qubernetic brand package (theme in brand/mkdocs/material)
requirements.in                # direct dependencies: mkdocs-material at the theme's version + plugins
requirements.txt               # compiled from requirements.in, pinned by hash
tests/                         # rules of the deploy workflow (pytest), with their own locked requirements
docs/
β”œβ”€β”€ index.md                   # landing / showcase
β”œβ”€β”€ CNAME                      # the custom domain for reference; the Pages settings hold the live value
β”œβ”€β”€ stylesheets/extra.css      # the download block's own styles
β”œβ”€β”€ javascripts/download.js    # fills the download block from the update feed
β”œβ”€β”€ getting-started/           # installation, agent connection, configuration
β”œβ”€β”€ guides/                    # how to use it, best practices, safety, troubleshooting
β”œβ”€β”€ tools/                     # tools overview and one page per tool group
β”œβ”€β”€ licensing/                 # user-facing licensing how-to
β”œβ”€β”€ legal/                     # legal overview and the Standard License Agreement
└── changelog.md               # public changelog
.github/workflows/deploy-docs.yml   # rules, build and deploy to GitHub Pages
SECURITY.md Β· CODE_OF_CONDUCT.md Β· LICENSE

How it deploys

The deploy workflow has three jobs:

  • rules checks the workflow and the Dependabot config with the tests in tests/.

  • build fetches the brand theme at the pinned commit with a read-only deploy key (the repository secret BRAND_DEPLOY_KEY) and runs mkdocs build --strict. On main it uploads the site for GitHub Pages; on pull requests and manual runs from other branches it uploads it as the docs-site artifact, which you can download and inspect.

  • deploy publishes the Pages artifact, from main only.

rules and build run on every pull request and on every push to main; pull requests from forks run rules only. The custom domain docs.twincatmcp.qubernetic.com is set in the repository's Pages settings.

After changing requirements.in, regenerate the lock:

uv pip compile --generate-hashes --python-version 3.12 --python-platform x86_64-unknown-linux-gnu requirements.in -o requirements.txt

mkdocs-material stays at the version the brand theme is built for; it moves only together with the brand pin.

Dependabot opens weekly pull requests into develop for the pinned actions and for the two requirement files, leaving out mkdocs-material and the brand submodule. Its pull requests get no Actions secrets, so build fetches the theme with the Dependabot secret BRAND_DEPLOY_KEY, which holds a second read-only deploy key on qubernetic/brand. Dependabot reads its config from main, so a change to .github/dependabot.yml takes effect with the next release. It regenerates the locks with pip-compile for the Python in .python-version.

Contributing

  • Branching: Gitflow. Work on feature/* and open a PR into develop; main is the published site.

  • Commits: Conventional Commits (docs:, feat:, fix:, chore:, …).

  • CI runs mkdocs build --strict. A broken link or nav entry fails the build, and on main a failed build stops the deploy. Without access to the theme you can still run the workflow rules: uv run --with-requirements tests/requirements.txt pytest -q tests.

⚠️ This is a public repository

Only curated, user-facing content belongs here. Never add:

  • how licensing is enforced under the hood (token issuance/validation, machine binding, replay protection);

  • TwinCAT Automation-Interface implementation details or internal type names;

  • internal source, samples, or planning documents;

  • the name of any prior employer or third party.

When in doubt, leave it out: this content is world-readable.

License

Β© 2026 Csaba BirΓ³ (Qubernetic). All rights reserved. See LICENSE. Documentation is published for use with the TwinCat-MCP product; redistribution or derivative works require permission.


A Qubernetic product Β· we build the future

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server for validating, auto-fixing, and scaffolding TwinCAT 3 XML files using deterministic code quality tools and IEC 61131-3 OOP checks. It enables AI assistants to perform structural validation, apply safe fixes, and generate canonical code skeletons for industrial automation projects.
      16
      40
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server that connects AI assistants to Siemens TIA Portal via the Openness API. AI-assisted PLC programming, project management, hardware configuration, cross-reference analysis, and deployment. 19 tools, 230 actions.
      67
      -