Skip to main content

tialink-mcp (Python)

stdio ↔ Streamable HTTP bridge for TiaLink — the TIA Portal MCP gateway by 汇智网 (hubwiz.com).

TiaLink serves MCP over Streamable HTTP at http://<gateway-host>:8080/mcp. Most clients can speak that directly. Some hosts — and every one-click desktop bundle — can only launch a stdio server. This package is the adapter between the two: newline-delimited JSON-RPC on stdin, HTTP on the other side, replies written back to stdout.

MCP client (stdio only)  ──stdin/stdout──▶  tialink-mcp  ──HTTP──▶  TiaLink gateway (/mcp)
                                                                     └──▶ TIA Portal Openness

⚠️ This package is the adapter, not the product. It needs a licensed TiaLink gateway already running on a Windows machine with TIA Portal V17–V21. Without one it fails on the first request — by design. It contains no TIA Portal logic and unlocks nothing.

Install

uvx tialink-mcp --check                     # one-shot, no install (recommended)
pipx run tialink-mcp --check
pip install tialink-mcp                     # or install it globally

Zero runtime dependencies; Python 3.9+.

Use

MCP clients that can launch a command:

Field Value
command uvx
args ["tialink-mcp"]
env TIALINK_URL (default http://127.0.0.1:8080/mcp), TIALINK_TOKEN (only if the gateway was configured with a token)

claude_desktop_config.json / mcp.json:

{
  "mcpServers": {
    "tialink": {
      "command": "uvx",
      "args": ["tialink-mcp"],
      "env": { "TIALINK_URL": "http://127.0.0.1:8080/mcp" }
    }
  }
}

Pre-flight check

Before wiring anything into a client, ask the gateway who it is:

TIALINK_URL=http://192.168.1.78:8080/mcp TIALINK_TOKEN=... tialink-mcp --check
✓ gateway reachable
  server      : TiaLink <version>
  protocol    : 2025-06-18
  capabilities: tools, resources
  session id  : <session>
  tools       : 41
    - project.open
    - block.create
    ...

If it fails:

Symptom Meaning
cannot reach … — Connection refused Gateway not running, or wrong host/port. It listens on the machine where TiaLink is installed.
HTTP 401 / 403 TIALINK_TOKEN missing or wrong (header is Authorization: Bearer <token>).
HTTP 404 Wrong path — the endpoint is /mcp, not the host root.
did not answer within … ms Compile/download/simulation calls can take minutes; raise TIALINK_TIMEOUT_MS.

Environment variables

Variable Default Purpose
TIALINK_URL http://127.0.0.1:8080/mcp Gateway endpoint
TIALINK_TOKEN (empty) Bearer token, if the gateway requires one
TIALINK_TIMEOUT_MS 600000 (10 min) Per-request timeout
TIALINK_QUIET (unset) 1 silences diagnostics on stderr

stdout carries the MCP protocol only; every diagnostic goes to stderr, so logs can never corrupt the stream.

Other distributions of the same adapter

Ecosystem Install Notes
npm npx tialink-mcp Node ≥ 18, no dependencies
Python (this package) uvx tialink-mcp Python ≥ 3.9, no dependencies

Development

PYTHONPATH=src python -m unittest discover -s tests -v   # 8 end-to-end tests, fake gateway included
PYTHONPATH=src python -m tialink_mcp --help

License

MIT for this bridge and its packaging only — see LICENSE. The TiaLink engine is commercial software and is not covered by that licence. TiaLink is not affiliated with or endorsed by Siemens.

Metadata

Release files for tialink-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)

Source distribution for tialink-mcp 0.1.0
File Size Uploaded Provenance Actions
tialink_mcp-0.1.0.tar.gz 12.7 kB Without provenance Details for tialink_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tialink-mcp 0.1.0
File Interpreter ABI Platform Actions
tialink_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for tialink_mcp-0.1.0-py3-none-any.whl

Total release size: 23.0 kB

Security for tialink-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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page