mcp
v2.0.0Model Context Protocol server for NetworkTables, built on @ntcore-ts/client
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
nt_guide NetworkTables MCP guide
Call this first if unfamiliar. Explains workflow, tool choice (nt_get vs nt_get_decoded vs nt_subscribe), write-gate status, and safety rules. Read-only.
nt_connect Connect to NetworkTables
Connect to an NT4 server. Provide either team (mDNS/team IP) OR host (e.g. localhost for sim). Default port 5810. Starts topic inventory. Prefer this before list/get/subscribe.
| Parameter | Type | Description |
|---|---|---|
host | string | Hostname or IP (e.g. localhost, 127.0.0.1). Mutually exclusive with team |
platform | string | Address resolution when using team (default roborio) |
port | integer | NT4 port (default 5810) |
team | integer | FRC team number (mutually exclusive with host) |
timeout_ms | integer | Connection wait timeout in ms (default 10000) |
nt_disconnect Disconnect from NetworkTables
Close the NT connection and clear the topic inventory cache.
nt_connection_info Connection info
Return connected/connecting flags, endpoint, RTT, and write-gate status. Read-only.
nt_list_topics List NetworkTables topics
List announced topics from the inventory cache (name, type, properties). Filter with prefix (e.g. /MyTable/). Call nt_connect first. Prefer over guessing topic names. Read-only.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max topics to return (default 500) |
prefix | string | Only topics starting with this prefix |
nt_get Get topic value
Read one topic value. Best for scalars/arrays/json. For struct:/proto: topics prefer nt_get_decoded. Topic must be known via nt_list_topics. Read-only.
| Parameter | Type | Description |
|---|---|---|
topic * | string | Full topic name, e.g. /MyTable/Gyro |
nt_get_multiple Get multiple topic values
Batch nt_get for up to 50 topics. Read-only.
| Parameter | Type | Description |
|---|---|---|
topics * | array | Topic names to read |
nt_get_decoded Get decoded struct/protobuf topic
Decode a struct: or proto: topic into a JSON object using @ntcore-ts/client. Prefer this over nt_get for Pose2d and other structured types. Optional type_hint like struct:Pose2d. Read-only.
| Parameter | Type | Description |
|---|---|---|
topic * | string | Full topic name |
type_hint | string | Override wire type, e.g. struct:Pose2d or proto:Pose2d |
nt_list_struct_types List struct types
List built-in WPILib geometry struct types and any discovered from /.schema/struct:* or live topics. Read-only.
nt_subscribe Timed subscribe / sample
Sample topic updates under prefixes for duration_seconds. Use format=summary for min/max/mean/last/rate (preferred evidence). format=samples returns capped point lists. Prefer over repeated nt_get for dynamics. Read-only.
| Parameter | Type | Description |
|---|---|---|
prefixes * | array | Topic prefixes to sample (e.g. ["/MyTable/"]) |
change_epsilon | number | Epsilon for change_only numerics (default 1e-9) |
change_only | boolean | Skip numeric changes at or below change_epsilon |
duration_seconds | number | How long to sample (default 2, max 30) |
format | string | summary (default) or samples |
sample_interval_ms | number | Min ms between stored samples per topic (0 = every change) |
nt_set_write_mode Enable or disable NT writes
Session write gate. Enabling REQUIRES confirm=true. Also enabled when NT_ALLOW_WRITES=1 at process start. Does not bypass path allowlist. Destructive.
| Parameter | Type | Description |
|---|---|---|
enabled * | boolean | true to allow nt_set / nt_set_multiple |
confirm | boolean | Must be true when enabling writes |
nt_set Set / publish a topic value
Publish a value to one topic. Fails if write gate is off, topic is outside NT_WRITE_ALLOWLIST, or types mismatch. Prefer expected_type when known. Destructive — can affect robot behavior if code is listening. Cannot enable/disable via FMS/DS.
| Parameter | Type | Description |
|---|---|---|
topic * | string | Full topic name |
value * | Value to publish (JSON-compatible for scalars/structs) | |
expected_type | string | NT type string, e.g. double or struct:Pose2d |
nt_set_multiple Set / publish multiple topics
Batch nt_set. Same write-gate and allowlist rules. Destructive.
| Parameter | Type | Description |
|---|---|---|
updates * | array |