Skip to main content
Glama
README.md
# TwinCat-MCP Documentation

[![Deploy docs](https://github.com/qubernetic/TwinCat-MCP-Docs/actions/workflows/deploy-docs.yml/badge.svg)](https://github.com/qubernetic/TwinCat-MCP-Docs/actions/workflows/deploy-docs.yml)
[![Docs](https://img.shields.io/badge/docs-live-22A8E0)](https://docs.twincatmcp.qubernetic.com)
[![License](https://img.shields.io/badge/license-proprietary-lightgrey)](LICENSE)

Source for the **public user documentation** of [TwinCat-MCP](https://docs.twincatmcp.qubernetic.com), 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](https://docs.twincatmcp.qubernetic.com)**

Built with [MkDocs Material](https://squidfunk.github.io/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:

```bash
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:

```bash
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](https://docs.astral.sh/uv/):

```bash
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:

```bash
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`.

## 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](.github/workflows/deploy-docs.yml) 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:

```bash
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](https://www.conventionalcommits.org/) (`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](LICENSE).
Documentation is published for use with the TwinCat-MCP product; redistribution
or derivative works require permission.

---

<sub>A <a href="https://qubernetic.com">Qubernetic</a> product ยท *we build the future*</sub>