Skip to content

server:diagnostics for owners, behind view_diagnostics (GRYT-2005) - #358

Merged
grytchat merged 1 commit into
mainfrom
claude/GRYT-2005-mcp
Nov 3, 2026
Merged

grytchat merged 1 commit into
mainfrom
claude/GRYT-2005-mcp

Conversation

@grytchat

@grytchat grytchat commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Part of the Gryt MCP (GRYT-2005). This adds what the MCP's server_status reads: a server:diagnostics event behind a new view_diagnostics permission.

It returns:

  • who's in each voice channel, by nickname, with mute, deafen, camera, screen shares and the latency stats their client already reports
  • the server version, uptime and online count
  • the SFU connection state
  • the SFU's own gryt_sfu_* numbers, read from SFU_METRICS_URL. Null when it's unset or the SFU doesn't answer within 2 seconds

view_diagnostics is owner-only to begin with, like manage_bots: admins don't get it, and the backfill (schema 11) gives it to roles holding manage_server. A bot gets it only when it asks and an owner leaves it ticked.

The self-hosted bundle sets SFU_METRICS_URL to the SFU's metrics listener on 127.0.0.1, and example.env documents it, commented out.

Look at

  • What collectDiagnostics exposes. Nicknames only, with no user ids and no IPs. Latency is what each client already sends to the others in its room.
  • SFU_METRICS_URL is fetched server-side. It comes from the operator's env, not from a request, so it isn't an SSRF surface.
  • No rate limit on the event, since only owner-level callers reach it. Say if you want one anyway.

Tested

  • the gate test (refuses without view_diagnostics, accepts with it), backfill and migration tests, and a parser test for the metrics text
  • end to end with a real SFU and the MCP from bot#19: server_status returned live gryt_sfu_* numbers. Nobody was in voice, so the room list was empty.

Client label: client#1141. Docs: docs#181. Should go out on beta first.

🤖 Generated with Claude Code

Live voice rooms (who, mute state, latency, camera and screens), the SFU
connection state and the SFU's own gryt_sfu_* metrics, for an owner or a
bot an owner has given view_diagnostics. It's what the Gryt MCP reads
when someone asks their AI why voice is bad.

- view_diagnostics is owner-only to begin with, like manage_bots, and the
  backfill gives it to roles holding manage_server.
- SFU numbers come from SFU_METRICS_URL. Unset or unreachable means
  sfuMetrics is null; nothing else changes. The self-hosted bundle sets
  it to the SFU's metrics listener on 127.0.0.1.
- Nicknames only. No ids, no IPs.

GRYT-2005

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grytchat
grytchat merged commit 7670798 into main Nov 3, 2026
7 checks passed
@grytchat
grytchat deleted the claude/GRYT-2005-mcp branch November 3, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant