nt-mcp-server AGENTS.md

nt-mcp-server AGENTS.md is an instructions file for Codex, OpenCode from Mzzj114/nt-mcp-server. It costs 982 tokens per session, scanned A, original, MIT.

Project instructions for an MCP server that lets AI agents read, write, and monitor FRC NetworkTables, a robot data system, while working with a local RobotPy simulator.

In plain words
What is it for?
Use them when developing, testing, or debugging the server, its recording tool, or integrations with an MCP client such as opencode.
Why use it?
They explain how the server is structured, how to run it, and which NT4 details can cause debugging problems.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/mzzj114/nt-mcp-server/agents-md
Clone the repo
git clone --depth 1 https://github.com/Mzzj114/nt-mcp-server

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 nt-mcp-server AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mzzj114/nt-mcp-server/agents-md.svg)](https://agentmods.dev/instructions/mzzj114/nt-mcp-server/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/mzzj114/nt-mcp-server/agents-md"><img src="https://agentmods.dev/badge/instructions/mzzj114/nt-mcp-server/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 982 This file is loaded in full into every session.
When invoked 982 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00982 $0.00982
Opus 5 $0.00491 $0.00491
Sonnet 5 $0.00196 $0.00196
Haiku 4.5 $0.00098 $0.00098

Measured 3d ago against content hash 0e172ac1e5cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

nt-mcp-server 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 3d ago.

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 · 45 lines

How it starts

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

AGENTS.md

MCP server exposing FRC NetworkTables (NT4) to AI agents. Reads/writes/monitors a robot's network tables; primary target is a local RobotPy sim (python -m robotpy sim on 127.0.0.1:5810).

Run

uv run nt-mcp-server          # stdio MCP server (equiv: python -m nt_mcp_server)
uv run nt-recorder --prefixes /SmartDashboard/ --output-dir recordings   # standalone CLI, not an MCP tool

Server runs on stdio — MCP clients (opencode) launch it via opencode.jsonc (uv run nt-mcp-server). It connects to 127.0.0.1:5810 by default. Live NT is optional; offline tools work without any connection.

Architecture

Package nt_mcp_server/ (4 modules, strict layering — each lower layer knows nothing about the one above):

  • __init__.py — FastMCP mcp instance + all 17 tool definitions. Imports no ntcore. Tools delegate to the module-level manager = NTManager(). Sync tools (nt_set, nt_disconnect, etc.) are plain functions; read tools are async.
  • nt_manager.pyNTManager: pure NT4 client lifecycle + reads/writes/subscribe streams. No MCP/FastMCP imports. Lazy default instance via ntcore.NetworkTableInstance.getDefault().
  • nt_recorder.py — two unrelated pieces: the nt-recorder CLI (argparse main), and the synchronous offline NDJSON reader API (list_recordings, get_history, subscribe_offline, …) used by the offline MCP tools.
  • nt_types.py — value normalization (to_jsonable), homogeneous-list classification, summaries. Pure, no connection state.

17 tools = 13 live + 4 offline (nt_list_recordings, nt_get_recording_info, nt_get_history/nt_subscribe_offline/nt_list_topics_offline). Every live tool response carries a top-level connected flag; disconnected reads return {"connected": false, "error": ...} instead.

NT4 gotchas (cost real debugging time)

  • An NT4 client only receives a topic/value once it has a matching subscription. NTManager keeps a topics-only subscription on "/" so the topic store stays populated; first list_topics/get after connect polls briefly for the server to announce topics. Don't assume topics exist before syncing.
  • nt_set dispatches on Python type (bool before int). Writes to an already-typed topic warn on mismatch; strict_type_check=True refuses the write (ok=False). NT itself also refuses cross-type writes.
  • Offline tools read from NT_RECORDINGS_DIR env var (default ./recordings). Recordings are plain NDJSON: {"time": float, "topic": str, "value": jsonable}; filenames are Windows-safe (nt-record-<YYYY-MM-DDTHHMMSSZ>.ndjson). Never call reader functions on a recording an active Recorder is still writing.

Read the full file on GitHub · 45 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. 3d ago First seen · 45 lines · 982 tokens per session scan A 0e172ac1e5cf

Subscribe to this mod's changes

nt-mcp-server AGENTS.md is an instructions file published in the GitHub repository Mzzj114/nt-mcp-server (0 stars, last pushed 2d ago), licensed MIT. It adds 982 tokens to every session, about $0.0049 per session on Opus 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-31.