u-OS MCP Server
Provides an SSH shell proxy to execute commands on the device's Linux shell without separate SSH setup.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Unofficial, community-made project. It is not affiliated with, endorsed by or supported by Weidmüller, and Weidmüller is not responsible for it. Report problems with this tool here, not to Weidmüller support. u-OS and Weidmüller are trademarks of Weidmüller Interface GmbH & Co. KG.
Some tools change a device's configuration, reboot it or factory-reset it. Use them at your own risk.
About The Project
An MCP server for Weidmüller u-OS controllers. It gives an AI assistant five capabilities:
Administration API: network, security, logging, system info, updates, reboot, factory reset
Variable Data Hub API: read and write I/O variables, list providers
SSH shell proxy: run commands on the device's Linux shell without separate SSH setup
Documentation and nuance: a documentation index plus the rules and traps an agent gets wrong, attached to the tool results they apply to
Support Center and downloads: search firmware, apps, CODESYS and release notes, list the App Hub catalogue, and download files to the PC, with release-note PDFs converted to text
30 tools in total. OAuth2 tokens are cached and refreshed automatically. TLS verification is off for devices, because u-OS uses self-signed certificates on the LAN, and on for the Support Center tools.
Built With
Python 3.10 or later
Related MCP server: opcua-gateway
Getting Started
Prerequisites
A u-OS device reachable over HTTPS from the PC that runs the server.
An OAuth2 client on the device, for the REST tools. In the u-OS web UI, go to Settings, then OAuth2, and create a client with the
client_credentialsgrant type. Grant allu-os-adm.*andhub.*scopes.For
ssh_exec: SSH enabled on the device (u-OS Administration, Security, SSH toggle) and the device's SSH login.Windows, for the standalone bundle. To run from source on any OS, uv.
The Support Center tools need none of the above. They only need Internet access.
Installation
Standalone bundle (no install required)
Download
uos-mcp-server-v1.7.0-standalone-win64.zipfrom the latest release and unzip it wherever you keep tools:C:\Tools\uos-mcp-server\ uos-mcp-server.exe <- point your MCP client at this python\ <- bundled Python runtime uos_mcp_server.py <- the server (readable, editable) uos_nuance.py <- shipped u-OS rules and traps (readable, editable) run.bat <- fallback launcher README.md steering\ <- generated, for clients that support steeringPut that folder anywhere you like.
uos-mcp-server.exeworks out where it lives and finds the runtime next to itself, so no paths are baked in.Add the server to your MCP config (Kiro:
.kiro/settings/mcp.json, VS Code: equivalent):{ "mcpServers": { "u-os": { "command": "C:\\Tools\\uos-mcp-server\\uos-mcp-server.exe", "env": { "UOS_BASE_URL": "https://192.168.10.202", "UOS_CLIENT_ID": "<your-client-id>", "UOS_CLIENT_SECRET": "<your-client-secret>", "UOS_SSH_USER": "admin", "UOS_SSH_PASSWORD": "<device-password>" } } } }One path, no
args. No Python install, no uv, no pip. The bundled runtime has everything.
If a client rejects the executable for any reason, invoke the interpreter directly instead:
"command": "C:\\Tools\\uos-mcp-server\\python\\python.exe",
"args": ["-E", "-s", "-u", "C:\\Tools\\uos-mcp-server\\uos_mcp_server.py"]-E -s stop a Python installation already on the machine from leaking PYTHONHOME or PYTHONPATH into the bundled runtime. -u unbuffers stdio, which MCP uses as its transport. uos-mcp-server.exe applies all three for you.
There is also run.bat, which does the same thing. Prefer the .exe: some MCP clients refuse to spawn .bat or .cmd files without a shell.
Run from source
Requires uv. Replace the command and args with:
"command": "uv",
"args": ["run", "C:\\path\\to\\uos_mcp_server.py"]uv run installs the dependencies on first launch.
Usage
Start with device_summary. It gives the model the nameplate, system info, network, security, update settings and Data Hub providers in one call.
Environment variables
Variable | Required | Description |
| Yes, for one device | Device URL, e.g. |
| For the REST tools | OAuth2 client ID |
| For the REST tools | OAuth2 client secret |
| No | SSH username (default: |
| For | SSH password |
| No | Path to SSH private key (alternative to password) |
| No | JSON file with several devices. When set, the six variables above are ignored. See Several devices |
| No | Documentation base URL (default: the u-OS beta wiki) |
| No | JSON file overriding or extending the shipped nuance set |
| No | Where |
A device needs a URL and at least one login: the API client for the REST tools, or the SSH login for ssh_exec. A tool whose login is missing returns an error that names the device and the missing setting.
Several devices
To manage several devices from one server, put them in a JSON file and point UOS_DEVICES_FILE at it. Each key is the device name the agent uses:
{
"wea": {
"url": "https://192.168.1.1",
"client_id": "<client-id>",
"client_secret": "<client-secret>",
"ssh_user": "admin",
"ssh_password": "<device-password>"
},
"m4000": {
"url": "https://192.168.1.101",
"client_id": "<client-id>",
"client_secret": "<client-secret>",
"ssh_password": "<device-password>"
}
}Fields per device are url, client_id, client_secret, ssh_user (default admin), ssh_password and ssh_key_path, with the same meaning as the variables above.
Every device tool takes a
deviceargument. With more than one device configured it is required, so asystem_rebootorfactory_resetnever lands on a device by default.list_devicesreturns each device's name and URL and which logins it has. It never returns credentials.Calls to different devices can run in parallel. Each device keeps its own token, and nuance is filtered against that device's own model and firmware.
The server checks the file at startup and refuses to start on a mistake, naming the device and the field: a missing
url, half an API client, no login at all, or an unknown field.Keep the file outside this repository. It holds credentials.
The file is read once at startup. Restart the server after editing it.
Administration API tools
Tool | Description |
| All core device info in one call (nameplate, CPU, network, security, update config, hub providers) |
| Digital nameplate (model, serial, firmware version) |
| CPU architecture, RAM, firmware |
| Storage devices |
| Network configuration |
| Live network state (actual IPs, routes, link status) |
| Replace full network config (field-order sensitive, prefer PATCH) |
| Partial network update via JSON merge patch (RFC 7396) |
| Security settings (root access, SSH toggle) |
| Update security settings |
| Update/signed-update settings |
| Change update settings |
| Log entries (paginated, filterable by source) |
| List log sources (systemd services) |
| Trigger log report generation (tar.gz) |
| Download a generated report |
| Poll long-running operation status |
| Reboot the device (takes ~2 minutes) |
| Erase all user data. Destructive. |
| The configured devices and which logins each has |
Variable Data Hub tools
Tool | Description |
| List all Data Hub providers, as |
| List variables from a provider (with optional prefix filter) |
| Read a single variable |
| Write multiple variables |
| Write a single variable |
If no I/O provider (u_os_sbm) appears, the I/O Configurator hasn't scanned and deployed yet. Open the u-OS web UI at /io-configurator/#/overview, click Scan, then Deploy.
Variable naming for I/O: <module_type>_<slot>.process_data.channel_<N>.<di|ai|ao>. Channels are 0-indexed: physical channel 1 = channel_0.
Support Center tools
These talk to Weidmüller's public download sources, not to a device, so they take no device argument and need no login. They verify TLS.
Tool | Description |
| Search the Support Center for firmware, apps, CODESYS and release notes. |
| The App Hub catalogue (the offline app list), filtered by device or app |
| Download a file to the PC. Release-note PDFs are also converted to text. |
| List the files inside a remote zip without downloading it, e.g. which devices a CODESYS runtime zip carries |
Nothing is installed on a device. Installing a downloaded .swu stays a deliberate step for the user.
How support_download treats files:
Downloads come only over HTTPS from
assets.dam.weidmueller.comanddrknsbrvasos2.cloudfront.net. Anything else is refused before a request is made.The file is written to
<name>.partand renamed only when its size matches the server'sContent-Length, and its SHA-256 matchessha256if one was passed. A failed download leaves nothing behind.The result always carries the file's path and SHA-256.
A PDF is never modified. With
pdf_to_text(the default), its text goes to<name>.pdf.txtnext to it and is returned inline, page by page, in layout mode so table columns stay apart.pages_without_textcounts pages with no text layer, such as scans, and the result then says to read the PDF. Passpdf_to_text: falseto skip conversion.
SSH shell proxy
The ssh_exec tool runs commands directly on the device's Linux shell. No separate SSH client setup, no key exchange dance, no "how do I SSH into u-OS" questions.
Prerequisites
SSH must be enabled on the device (u-OS Administration, Security, SSH toggle).
The device needs an SSH login:
UOS_SSH_PASSWORDin the MCP config env, orssh_passwordin its entry in the devices file.
What you can do
Inspect files:
cat,ls,df -h,free -m,top -bn1Network diagnostics:
ip addr,ip link,ip route,pingOS info:
uname -a,cat /etc/os-release,fw_printenvService status:
systemctl status <service>Container management (with sudo):
sudo docker ps,sudo docker logs <name>
What you cannot do: install an application
This is a shell for inspecting and diagnosing, not for installing. The root filesystem is a Yocto build mounted read-only, and there is no usable package manager: apt and pip are absent, and the opkg binary that does exist ships with no feeds configured. An application reaches u-OS as a container-based .swu add-on: a manifest.json describing an existing Docker image, packaged with uc-aom-packager and installed through the add-on manager.
That distinction is worth stating precisely rather than loosely. An earlier version of this rule simply said there was no opkg, which is false on hardware, and a rule an agent can disprove in one command is a rule it will discard wholesale.
Models reach for a native install anyway, because that is what a Linux box usually wants. So when a command looks like one, ssh_exec attaches the app_deployment nuance to its result, the same way it returns sudo guidance when sudo fails. apt-get: not found reads like a missing tool rather than the wrong approach entirely, and that is exactly the moment the correction is worth something.
sudo
The admin user does not have passwordless sudo by default. If a command needs root, the tool returns structured guidance with instructions to enable it. AI models should always try sudo commands rather than refusing. The tool handles the error.
To enable passwordless sudo (run once on the device):
sudo sh -c 'echo "admin ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/admin-nopasswd && chmod 440 /etc/sudoers.d/admin-nopasswd'Device specifics
DALOS (Yocto-based Linux, as
/etc/os-releasereports it), not Debian/Ubuntu. No apt.Network interfaces:
eth-x4througheth-x7,usb-x1. Noteth0.Kernel: 6.6 PREEMPT_RT, aarch64.
Documentation and nuance
Two resources, with a deliberate split between them.
docs://u-os-wiki is an index of documentation pages. Version numbers, part numbers, supported-version tables and the app catalogue are not duplicated into this server. That is reference data, it changes with every product, and a copy compiled into a server is a copy that goes stale without anyone noticing. Point UOS_DOCS_URL elsewhere if your documentation lives somewhere else. The index also links the add-on manifest schema and the packager user guide, so an agent told not to install natively has somewhere to go instead.
docs://u-os-nuance is the part that has to ship: short behavioural rules and traps that an agent cannot discover from the API and has been observed getting wrong. For example, downgrading u-OS 2.3.0 or later requires a factory reset first, and there is no API call that reveals that.
The dividing line is rules and traps ship, tables and catalogues link.
How nuance reaches the model
Not by hoping it reads a resource. Entries carry triggers, and the server attaches the matching ones to tool results at the point they become relevant. It's the same mechanism ssh_exec uses to return sudo guidance exactly when sudo fails. Calling factory_reset returns the destructive-action warning alongside the result, get_update_config returns the upgrade rules, and get_system_info returns the architecture rule, because the CPU architecture it reports is what decides which .swu an add-on has to be built for.
Most triggers fire on every call to the tools they are wired to. app_deployment on ssh_exec is the exception: it fires only when the command looks like a native install, because attaching packaging rules to every shell command would be noise.
Entries are also filtered against the device in front of the agent, not the product line: applies_to is a firmware version range and models is an optional list of product types or order codes. Both are read once and cached together. An entry whose version or model cannot be confirmed is still shown, marked version_unverified or model_unverified, because withholding a blocker is worse than showing one that may not apply.
Scoping by model is not cosmetic. Before it existed, a note saying u-OS 2.8.0 was withdrawn for the UC20-M3000 and M4000 fired on every device, which on a UC20-WL2000-AC means telling the user not to install the release that is current and correct for it.
Version detection deliberately does not hardcode an API path, so it matches on key names instead. That has one trap worth knowing if you extend it: a pattern loose enough to catch SoftwareVersion also catches HardwareVersion, and on the nameplate the hardware key comes first. Firmware-specific keys are therefore searched across the whole payload before a bare version is considered, with hardware, manifest, schema, protocol, API, kernel and python keys excluded outright. Getting this wrong does not soften the filtering, it inverts it.
Editing the nuance set
Everything lives in uos_nuance.py, as data. It ships in the bundle as plain text, so a deployed install can be corrected in place without a rebuild. Each entry records the observed failure that earned its place, so entries can be pruned later rather than accumulating forever. The bar for a new entry is an observed agent failure.
An entry needs id, applies_to, triggers, severity and text. Add models when the rule is about particular hardware, and leave it off when the rule is true of every device. Anything that names a product type in its text and not in models will be shown to devices it does not describe.
To patch without touching the bundle, point UOS_NUANCE_FILE at a JSON file. Entries sharing an id with a built-in replace it, and new ids are appended. A malformed override never takes the server down. It falls back to the built-in set.
steering/u-os-nuance.md in the bundle is generated from uos_nuance.py during the build, for clients that support steering files. Nothing depends on it. The server carries the same content itself.
Notes
Credentials live in the MCP config env vars or the devices file, never in source.
set_network_config(PUT) is field-order sensitive. Preferupdate_network_config(PATCH) for partial changes.device_summaryruns six API calls in parallel to give the model a full picture in one shot.
Roadmap
Administration API, Data Hub and SSH tools
Several devices from one server
Nuance attached to the tool results it applies to
Support Center search and downloads, with release-note PDFs as text
Cache the App Hub catalogue between calls
Read an app's manifest from its
.swuwithout downloading itBackground downloads, for clients that time out on large firmware files
See the open issues for proposed features and known issues.
Contributing
Issues and pull requests are welcome. For anything bigger than a small fix, open an issue first so we can agree on the approach. The project rules are in AGENTS.md, which AI coding agents read on their own.
Fork the project
Create your feature branch (
git checkout -b feature/my-change)Commit your changes (
git commit -m 'Add my change')Push to the branch (
git push origin feature/my-change)Open a pull request
Development
uos_mcp_server.py <- the server, single file, the thing that matters
uos_nuance.py <- shipped u-OS rules and traps, pure data plus a predicate
AGENTS.md <- project rules for AI coding agents
check_devices.py <- offline self-check for device handling
check_support.py <- offline self-check for the Support Center tools
launcher\ <- C# source for uos-mcp-server.exe, compiled during build
build.ps1 <- bump version, build portable bundle, produce release zip
deploy.ps1 <- install a built bundle to its runtime location
dist\ <- gitignored in full
standalone\ <- BUILD STAGING. assembled bundle. never run from here
uos-mcp-server-v<ver>-standalone-win64.zip <- the deliverable, attached to each GitHub releaseBefore a pull request, run the checks with the dev venv's Python. Both run offline.
uvx ruff check .
.venv\Scripts\python.exe check_devices.py
.venv\Scripts\python.exe check_support.pyBuild and deploy
.\build.ps1 -Version "1.2.0" # bumps version, assembles dist\standalone\, makes the zip
.\deploy.ps1 # installs dist\standalone\ to C:\Tools\uos-mcp-serverbuild.ps1 needs uv and 7-Zip on PATH. It downloads a trimmed portable CPython, installs the four dependencies into it, compiles the launcher, verifies both the imports and a live MCP handshake through the launcher, and zips the result.
The launcher is compiled with the .NET Framework csc.exe that ships inside Windows, so it adds no build prerequisite and produces a ~7 KB dependency-free exe.
The runtime lives outside this repo, at C:\Tools\uos-mcp-server by default. That separation is deliberate. When the MCP server ran directly out of dist\standalone\, every rebuild tried to delete a directory whose DLLs the running server had open. The build would fail, or leave an orphaned dist\standalone-old-<pid>\ folder behind. Keeping the runtime at an external prefix means a build never touches files that are in use.
deploy.ps1 options:
Option | Effect |
(none) | Install |
| Install from the release zip instead, exactly as an external user receives it |
| Install somewhere else |
| Deploy even if something is running from the target |
The deploy moves the old install aside, copies the new one in, then verifies it by importing the dependencies with the deployed interpreter. If either step fails it puts the previous install back, so a bad deploy does not leave you without a working server.
Disable the u-OS MCP server in your client before deploying over a live install, or the copy will fail on locked files. deploy.ps1 checks for this and refuses rather than half-overwriting the runtime.
Why the launcher is hand-rolled
pip and uv can generate a uos-mcp-server.exe from a [project.scripts] entry point. Those generated launchers are unusable here: each embeds an absolute path to the interpreter that existed at install time. Build in a temp directory, zip, extract to C:\Tools, and the launcher fails with uv trampoline failed to canonicalize script path.
launcher\launcher.cs resolves its own module path at runtime instead, so the bundle stays movable. For the same reason build.ps1 deletes python\Scripts\ from the bundle: everything in there is one of those absolute-path trampolines and none of it works once shipped.
Top contributors:
License
Distributed under the MIT License. See LICENSE for more information.
The standalone bundle also ships Python and third-party packages under their own licenses, each in python\Lib\site-packages\*.dist-info. Among them: pypdf (BSD-3-Clause), AsyncSSH (EPL-2.0 or GPL-2.0-or-later) and certifi (MPL-2.0).
Contact
Christopher Deloglos, @cdelog
Project Link: https://github.com/cdelog/u-os-mcp-server
Acknowledgments
Model Context Protocol and its Python SDK
python-build-standalone, the portable runtime in the bundle
Weidmüller's public u-OS API specifications and add-on packager documentation
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Connect your AI to your own devices, 3D printers, factory tools and a shared agent task pool.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects AI agents to OPC UA-enabled industrial systems for real-time monitoring and control of operational data. It enables users to read, write, and browse industrial device nodes through natural language interactions.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover, browse, read, search, and safely write OPC UA industrial device data within controlled edge networks, with guarded two-phase writes and evidence-based root-cause diagnostics.1Apache 2.0
- 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.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and applications to interact with UniFi network infrastructure through the UniFi Network Controller API, supporting device, client, network, firewall, QoS, backup, multi-site, and topology management.Apache 2.0