tia-portal-mcp: Instructions file for Codex

AGENTS.md

tia-portal-mcp AGENTS.md is an instructions file for Codex, OpenCode from Czarnak/tia-portal-mcp. It costs 6,577 tokens per session, scanned A, original, MIT.

Project instructions for tia-portal-mcp, a Windows-only Model Context Protocol server for Siemens TIA Portal V21. It explains the split between the .NET host process and the .NET Framework worker that communicates with TIA Portal.

In plain words
What is it for?
Building, testing, or extending the tia-portal-mcp server and its Siemens TIA Portal integrations. They cover the host-worker boundary, newline-delimited JSON communication, worker restarts, and read-only versus read-write operation.
Why use it?
The split is required because Siemens’ Openness libraries cannot run directly in the .NET 8 host. Following these instructions prevents unsupported process usage and explains how crashes, builds, and test stubs are handled.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is Czarnak/tia-portal-mcp's own configuration. It tells Codex and OpenCode how to work on tia-portal-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tia-portal-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Czarnak/tia-portal-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Czarnak/tia-portal-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/Czarnak/tia-portal-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tia-portal-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/czarnak/tia-portal-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/czarnak/tia-portal-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/czarnak/tia-portal-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/czarnak/tia-portal-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tia-portal-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/czarnak/tia-portal-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/czarnak/tia-portal-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,577 This file is loaded in full into every session.
When invoked 6,577 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.06577 $0.06577
Opus 5.5 $0.02631 $0.02631
Sonnet 5.5 $0.01315 $0.01315
Haiku 4.5 $0.00658 $0.00658

Measured yesterday against content hash 9ac29c3cbb7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tia-portal-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project overview

MCP server for Siemens TIA Portal V21. Exposes 8 tools in read-only, 19 in read-write (startup default), and the same 19 in full mode. Read-write permits in-project edits, compile, and lifecycle with one confirmation prompt per actual lifecycle call. Full runs lifecycle without server elicitation and adds no tools or operations; PLC run/stop was removed. The installer defaults to read-only. Windows-only, requires TIA Portal V21 with Openness enabled. Content tools (content reads and writes, compile_check, and every lifecycle tool except open_project/create_project) act only on the bound project and fail closed with binding_conflict when unbound; only bind_project and open_project accept a public projectPath, and get_project_status takes no arguments.

Two-process architecture (critical to understand)

bind_project retains default/null/explicit bind behavior and adds six explicit inspections: list_portals, list_server_connections, list_server_groups, list_server_projects, list_local_sessions, get_lock_state. Current counts are 8/19/19; PR3 had 7/17/17. Discovery never adopts; inventory uses persistent Portal-only attachment, never switches/adopts/opens a project. Selectors are exact raw-key validated; root group requires {isRoot:true,name:null}. Verified foreign-PID refusal is local/NotSent and preserves binding/cursors; genuine context/transport loss still invalidates. Sessions cover currentMachineCurrentUser; locks are non-atomic observations. Typed inspection is conditional inside the budgeted binding value (60,000/180,000 characters by default), not a new envelope. Inspection adds no lifecycle elicitation/write audit or session mutation. See Multiuser reference. PR3 received exact live authorization on 2026-10-06. All six inspection actions succeeded against three disposable session copies and a standalone AP21; all five remote inventories also succeeded with zero open projects. Healthy verified binding/cursors and worker-loss invalidation/recovery were observed. The maintainer accepted PR3 live testing as finished and passed on 2026-10-06; unexecuted cases are retained as non-blocking evidence limitations in the live acceptance report.

Read the full file on GitHub · 232 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +2 lines · +547 tokens per session 9ac29c3cbb7e
  2. 2d ago Changed · +1 lines · +13 tokens per session 3711950058ef
  3. 3d ago Changed · +6 lines · +99 tokens per session 7c02f443f496
  4. 4d ago Changed · +127 tokens per session e8acb008dfae
  5. 5d ago Changed · +92 tokens per session 3e97a85a4fd0
  6. 7d ago Changed · +1 lines · +333 tokens per session cb7c5e9dc3b5
  7. 11d ago Changed · +1 lines · +254 tokens per session 826328e281d5
  8. 12d ago Changed · +1 lines · +68 tokens per session 121b41917f41
  9. 13d ago Changed · +6 lines · +447 tokens per session 7ecbc57574eb
  10. 15d ago First seen · 214 lines · 4,597 tokens per session scan A 38bfdec5ee66

Subscribe to this mod's changes

tia-portal-mcp AGENTS.md is an instructions file published in the GitHub repository Czarnak/tia-portal-mcp (95 stars, last pushed yesterday), licensed MIT. It adds 6,577 tokens to every session, about $0.0263 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories