Skip to main content
Glama
advantagescope-mcp

advantagescope-mcp

by YianXie
README.md
# advantagescope-mcp

A local, read-only MCP server that lets AI agents such as Claude read FRC robot telemetry: the data
AdvantageScope shows, without going through AdvantageScope. It works with:

- **Live data** from a running simulation (NetworkTables 4), recorded from the moment the agent session starts.
- **CTRE `.hoot` logs**, including the one a simulation is still writing.
- **WPILib `.wpilog` logs**.

It never publishes to NetworkTables and never changes a log.

## Tools

| Tool | What it does |
|---|---|
| `status` | Is a sim connected, how much is recorded, which log is newest |
| `list_logs` | Saved logs, newest first |
| `list_signals` | Signal names in a source |
| `read_signals` | Values over a time range, condensed but keeping spikes |
| `signal_stats` | Min, max, time-weighted mean and so on, or time spent in each state |
| `find_events` | When a signal was above, below or equal to a value, or changed |

A source is `live`, `latest` (the newest log) or a log's path. Struct fields are addressed like signals:
`DriveState/Pose/translation/x`. Times are seconds from the start of the source; `start=-10` means the last 10 seconds.

## Setup

Needs [uv](https://docs.astral.sh/uv/) and, for `.hoot` logs, AdvantageScope, which downloads CTRE's `owlet` converter
the first time it opens a log of each format version.

```bash
claude mcp add --scope user advantagescope -- uv run --directory /Users/ianxie/Projects/FRC/advantagescope-mcp advantagescope-mcp
```

Start a new Claude session afterwards.

## Settings

Environment variables, all optional:

| Variable | Default |
|---|---|
| `ASMCP_NT_ADDRESS` | `127.0.0.1:5810` |
| `ASMCP_LOG_DIRS` | Extra log folders, separated by `:`. `/Users/ianxie/Projects/FRC/*/logs` is always included |
| `ASMCP_CACHE_DIR` | `~/Library/Caches/advantagescope-mcp` |
| `ASMCP_OWLET_DIR` | `~/Library/Application Support/AdvantageScope/owlet` |

## Limits

- Tested with the simulation only, not a real robot.
- Live data keeps the last 10 minutes, up to 200 MB, and starts over when the sim restarts.
- A project that writes no log in simulation has no history from before the session started.
- Live and log times use different zero points and do not line up.
- Each question about a `.hoot` log that is still growing extracts it again, which takes longer the longer the run
  (about 9 s after 30 minutes). Finished logs are cached.
- If the connection to a running sim drops and comes back, the gap in live data is not marked.
- The cache of extracted `.hoot` signals is limited to 2 GB. It is safe to delete.

## Development

```bash
uv run pytest
```

TDQS

A3.8/5.0

Scored across 6 tools

Disambiguation4/5

Each tool has a clearly different action: status reports connection state, list_logs/list_signals enumerate, read_signals returns raw time series, signal_stats aggregates, and find_events searches conditions. The only mild overlap is between signal_stats (min/max with times) and find_events (condition-based time ranges), which could occasionally be confused for 'when did X exceed Y' questions.

Naming Consistency4/5

Four tools follow a clear verb_noun pattern (list_logs, list_signals, read_signals, find_events), which is predictable and readable. The deviations are 'status' (bare noun, no verb) and 'signal_stats' (noun_noun), which are minor but break the otherwise consistent convention.

Tool Count5/5

Six tools is well within the ideal range and each earns its place across the discover-read-analyze workflow (status, logs, signals, values, stats, events). Nothing feels redundant or padded for a focused telemetry log analysis server.

Completeness4/5

The surface covers the full read-only lifecycle: check availability, enumerate logs and signals, read values, summarize, and search events, which covers core telemetry analysis needs. Minor gaps exist—no direct multi-log comparison tool (users must call signal_stats twice) and no metadata/export or plotting operation—but these are workable around.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues