nt-mcp-server
nt-mcp-server
一个独立的MCP服务器,用于读取、写入和监控FRC NetworkTables数据。它让AI代理能够通过NetworkTables协议与机器人的网络表进行通信。主要目标是本地RobotPy模拟(python -m robotpy sim,位于127.0.0.1:5810)。
固定依赖(fastmcp==3.4.7,pyntcore==2026.2.2)。
运行服务器
uv run nt-mcp-server或者,从没有uv shim的检出中运行:
python -m nt_mcp_server服务器运行在stdio上,这就是MCP客户端(如opencode)与之通信的方式。
Related MCP server: agent-comm
连接到RobotPy模拟NetworkTables
在服务器能够读取或写入任何有用数据之前,模拟必须正在运行。从它自己的项目和venv中启动:
cd <path-to-try-robotpy> && .venv\Scripts\activate && python -m robotpy sim服务器默认连接到127.0.0.1:5810,这是模拟监听的地址。
连接到真实机器人NetworkTables
在大多数情况下,只需记录NetworkTables并使用mcp分析记录即可。
如果您想实时连接到真实机器人的NetworkTables,您的设备上需要有2个网络适配器:一个用于互联网,另一个用于机器人通信。一种方法是使用无线适配器连接Wi-Fi,并使用以太网电缆连接到机器人。或者,您可以获得一个USB网络适配器作为第二个适配器。无论哪种情况,您可能都需要配置设备的网络路由。
将NetworkTables记录到NDJSON(离线)
nt-recorder CLI连接到实时的NT4服务器,并将值事件写入带时间戳的.ndjson文件。它在开发笔记本上运行,并从模拟或机器人读取NT;无需修改机器人端。
uv run nt-recorder --prefixes /SmartDashboard/ --output-dir recordings选项:
--prefixes— 要订阅的主题前缀(默认:/)--output-dir— 输出文件的目录(默认:./recordings)--duration— 记录N秒后退出(默认:运行直到Ctrl+C)--team— 通过团队编号连接,而不是服务器IP/端口--server-ip/--server-port— NT4服务器地址(默认:127.0.0.1:5810)--identity— 客户端身份字符串(默认:nt-recorder)--quiet— 抑制状态输出到stderr
输出文件命名为nt-record-<YYYY-MM-DDTHHMMSSZ>.ndjson(无冒号,Windows安全)。每行是{"time": float, "topic": str, "value": jsonable}。退出代码:0干净退出,1连接失败,2磁盘/IO错误。
工具
服务器暴露了17个工具(13个实时+4个离线)。每个实时工具响应都包含一个connected标志。
实时工具
工具 | 描述 |
| 启动NT4客户端并等待实时连接。返回 |
| 停止NT4客户端并拆除持久订阅。返回 |
| 返回连接状态: |
| 返回一个主题的JSON规范化值。响应: |
| 返回所有请求的主题。响应: |
| 返回主题元数据。响应: |
| 发布一个值。响应: |
| 写入每个 |
| 列出主题名称,按 |
| 在 |
| 打开持久订阅。响应: |
| 从持久订阅中读取缓冲的样本。响应: |
| 停止持久订阅。响应: |
离线记录工具
工具 | 描述 |
| 列出记录。每个条目包括 |
| 返回记录的长度、总样本数、主题数和文件元数据。 |
| 返回一个主题的事件历史。支持 |
| 列出记录中的唯一主题名称,按 |
| 返回前缀下所有主题的事件。支持 |
离线工具从NT_RECORDINGS_DIR环境变量设置的目录中读取(默认为./recordings)。记录仅限本地——记录器在开发笔记本上运行,并从模拟/机器人读取NT;无需修改机器人端。
在任何代理中注册
该服务器是一个可从git运行的uvx包,因此任何MCP客户端都可以在没有本地检出或预构建venv的情况下启动它。按需运行:
uvx --from git+https://github.com/Mzzj114/nt-mcp-server.git nt-mcp-server或者安装控制台脚本一次,然后随处运行:
uv tool install "git+https://github.com/Mzzj114/nt-mcp-server.git"
uvx nt-mcp-server将此条目添加到您的代理的MCP配置中(此处显示为opencode的项目级opencode.jsonc):
{
"mcp": {
"nt": {
"type": "local",
"command": [
"uvx",
"--from",
"git+https://github.com/Mzzj114/nt-mcp-server.git",
"nt-mcp-server"
],
"enabled": true
}
}
}使用opencode mcp list从项目根目录验证:nt服务器应显示为已连接。
开发
Python 3.14.0 venv在
.venv中;依赖从requirements.txt安装(fastmcp==3.4.7,pyntrack==2026.2.2)。测试:
uv run pytest tests/ -v
许可证
本项目采用MIT许可证。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to interact with the SpaceTraders API, managing agents, fleets, contracts, and trading operations in the SpaceTraders universe.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.1305MIT
- AlicenseAqualityDmaintenanceMCP server that injects verified FTC documentation and code examples into AI assistants, enabling teams to write correct, competition-ready Java robot code through natural language.3162MIT
- AlicenseCqualityCmaintenanceMCP server for Inductive Automation Ignition, enabling AI assistants to browse and write tags, query history and alarms, manage projects, and deploy Perspective views through natural language.431MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mzzj114/nt-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server