Logix Tag MCP
logix-tag-mcp is a Python MCP server that lets a coding agent such as Claude Code or VS Code Chat read live tag values from a running Rockwell Logix PLC's (CompactLogix, ControlLogix, etc.). It talks to the controller over EtherNet/IP with pycomm3.
It pairs with l5x-mcp. The agent reads the logic offline with l5x-mcp and checks the live values here while you debug online. Tag names can be passed exactly as l5x-mcp shows them, as a bare program tag name plus its program.
The server is read-only by default. The write_tag tool is only registered when the server is started with writes enabled. See Writing tags.
Quick start
logix-tag-mcp needs network access to the controller on EtherNet/IP port TCP 44818.
uv is the recommended way to install and run logix-tag-mcp. uvx downloads and caches the package, so nothing needs to be installed in a specific folder or environment.
uvx logix-tag-mcp --help
The server is normally started by your MCP client. See Register the MCP server.
There is no default controller. Every tool that talks to a controller takes a required host argument, for example 192.168.1.10, or 192.168.1.10/1 for a processor in slot 1. The agent asks you for the address when it does not know it.
Install as a tool with uv (optional)
uv can also install logix-tag-mcp as a tool. This puts logix-tag-mcp on your PATH.
uv tool install logix-tag-mcp
Updating
uvx caches the package, so refresh it to pick up a new release with uvx --refresh logix-tag-mcp --help. MCP clients configured with uvx logix-tag-mcp use the new version after you restart them. With uv tool install, run uv tool upgrade logix-tag-mcp.
Register the MCP server
Claude Code
-s user registers the server for all your projects. Leave it out to add it to the current project only.
claude mcp add -s user logix-tags -- uvx logix-tag-mcp
If you installed it with uv tool install, replace uvx logix-tag-mcp with logix-tag-mcp. Server options go after the command, and environment variables go in -e options before --. For example:
claude mcp add -s user logix-tags -e LOGIX_TAG_MCP_ALLOWED_HOSTS=192.168.1.10 -- uvx logix-tag-mcp
Other MCP clients
Other clients need the same command and arguments. This example is a VS Code .vscode/mcp.json:
{
"servers": {
"logix-tags": {
"type": "stdio",
"command": "uvx",
"args": ["logix-tag-mcp"]
}
}
}
With uv tool install, use "command": "logix-tag-mcp" and no args. Claude Code also reads a project .mcp.json. See .mcp.json.example.
Configuration
| Env var | CLI flag | Meaning |
|---|---|---|
LOGIX_TAG_MCP_TIMEOUT |
--timeout |
Socket timeout in seconds. Default: 5. |
LOGIX_TAG_MCP_ALLOWED_HOSTS |
--allowed-hosts |
Comma-separated hosts the server may connect to. Other hosts are refused. Default: any host. |
LOGIX_TAG_MCP_LOG_DIR |
--log-dir |
Folder for logger files and the write audit log. Relative paths start at the folder the server runs in. Default: logix-tag-mcp-logs. |
LOGIX_TAG_MCP_ENABLE_WRITES |
--enable-writes |
Register the write_tag tool. Default: off. |
LOGIX_TAG_MCP_WRITE_ALLOWLIST |
--write-allowlist |
Comma-separated glob patterns. When set, only matching tags can be written. Default: none. |
Flags take precedence over environment variables. Boolean variables accept 1, true, yes or on. Restart the server after changing its configuration.
Tools
Discovery tools
| Tool | Description |
|---|---|
controller_info |
Controller name, product, firmware, serial number, key switch, programs, tasks, modules, tag count and clock. |
list_tags |
Paged tag list, filtered by name or glob, program and data type. Returns full names that read_tags accepts. |
get_data_type |
Members of a UDT, AOI, module or built-in type. |
refresh_tag_list |
Upload the tag list and data types again after a download or online edit. |
Read tools
| Tool | Description |
|---|---|
read_tags |
Read any number of tags, members, bits, array elements or whole arrays in one batch. Each tag succeeds or fails on its own. |
read_struct |
Read a struct whole, or member by member up to 3 levels deep when the controller refuses the whole read. members filters large types such as axes. |
sample_tags |
Watch tags for up to 30 seconds and return only the changes, with timestamps. |
Logger tools
| Tool | Description |
|---|---|
start_logger |
Log tags to a JSONL file on a background thread with its own connection. Logs on change or every sample, with an optional deadband. |
list_loggers |
Status of all loggers. |
get_logger_data |
Logged rows, filtered by time and tag, paged. |
get_logger_summary |
Per tag statistics and communication outages. Numbers get minimum, maximum and time-weighted mean. BOOLs get edges and time true and false. Other types get change counts. |
export_logger_csv |
Write a wide, forward-filled CSV next to the JSONL file for opening in Excel. |
stop_logger |
Stop a logger. |
Up to 5 loggers can run at once, with 100 tags each. The minimum interval is 50 ms. A logger runs for 1 hour by default and 24 hours at most. Loggers keep running through a lost connection and record comm_error and comm_restored events.
Writing tags
write_tag is only registered when writes are enabled. It changes values in a running machine, which can start motion or change machine state. Enable it only when you mean to, and set an allowlist:
claude mcp add logix-tags \
-e LOGIX_TAG_MCP_ENABLE_WRITES=1 \
-e "LOGIX_TAG_MCP_WRITE_ALLOWLIST=Program:MainProgram.Setpoint*" -- \
uvx logix-tag-mcp
How write_tag works:
- It refuses tags outside the allowlist, Read Only tags, and whole structs or arrays. Write members or elements instead.
- It checks the value against the tag type. BOOL takes only true, false, 0 or 1. Integers are range-checked. REALs must be finite. Strings are length-checked.
- It reads the current value first. With
expected_current, it refuses the write if the value has changed. This check is not atomic, so logic can change the value between the check and the write. - It sends the write once and never retries it. If the connection drops during the write, the result says the write may or may not have been applied.
- It reads the value back and warns if it differs. A difference usually means logic overwrites the tag every scan.
- It appends every attempt, including refusals, to
writes.jsonlin the log folder.
Tag names and l5x-mcp
Online, program tags are named Program:<program>.<tag>. l5x-mcp shows them by bare name with a program scope. Pass the bare name with program and the server resolves it the way Logix does. It looks for a program tag first, then a controller tag.
read_tags(host="192.168.1.10", tags=["Timer1.DN", "Motor1_Run"], program="MainProgram")
# Timer1.DN resolves to Program:MainProgram.Timer1.DN
# Motor1_Run resolves to the controller tag, because MainProgram has no tag with that name
Fully qualified names such as Program:MainProgram.Timer1 and Local:1:I.Pt00.Data are used unchanged.
Controller behavior
- Tags with External Access set to None are not visible over the network. They read as if they do not exist.
l5x-mcpshows each tag'sexternal_access. - The controller refuses whole reads of AOI instances, axes and module I/O structs such as
Local:1:I.read_tagsandread_structfall back to reading their members. AOI local tags cannot be read, only parameters. - BOOL arrays are stored as DWORDs. The server shows and reads them as BOOL arrays, so
Tag[5]is bit 5. - The controller clock is reported as the controller holds it, without timezone conversion.
- A dropped connection is reconnected on the next call. While the controller is unreachable, each call fails after about one timeout.
Development
Install from source
git clone https://github.com/zwood16/logix-tag-mcp.git
cd logix-tag-mcp
uv sync
Running tests
This project uses pytest for tests and ruff for linting. Both are dev dependencies:
uv run pytest
uv run ruff check
uv run ruff format
The unit tests use a fake driver and need no hardware. Tests that need a real controller are marked integration and are skipped unless LOGIX_TAG_MCP_TEST_HOST is set to the controller address. Run only the offline tests, as the publish workflows do, with:
uv run pytest -m "not integration"
To use a source checkout with Claude Code, register uv run --project /path/to/logix-tag-mcp --no-sync logix-tag-mcp. Use --project, not --directory, so the server still starts in your project folder.
Metadata
Release files for logix-tag-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| logix_tag_mcp-0.1.0.tar.gz | 36.4 kB | With provenance | Details for logix_tag_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| logix_tag_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for logix_tag_mcp-0.1.0-py3-none-any.whl |
Total release size: 76.9 kB
Release files / logix_tag_mcp-0.1.0.tar.gz
| Download URL | logix_tag_mcp-0.1.0.tar.gz |
|---|---|
| Size | 36.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f8bc232f00ff5f83c0a96a71ac680eae964b64703d400ffe29cc9c60ac45614
|
|
BLAKE2b-256 checksum How to use checksums |
ab61cde246bd9aaa5eef9cd7d4cdd697efd566e072c63f7104232d846a8ece15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logRelease files / logix_tag_mcp-0.1.0-py3-none-any.whl
| Download URL | logix_tag_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 40.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dc7521c62d6c5a9c888b7b8ba1311c85b17f4b7f4304000764c04cd40967ef4
|
|
BLAKE2b-256 checksum How to use checksums |
262ac22ca305e38b700891a45e971a5bdb38289620f94f3e7711af9776bca0cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logSecurity for logix-tag-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for logix_tag_mcp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.