# Programatic or MCP querying of data

**URL:** <https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338>\
**Category:** Cloud Dashboard\
**Tags:** agent-development\
**Created:** [June 4, 2026, 1:52pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338 "2026-06-04T13:52:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Lowe](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/benjamin_lowe/32/314_2.png) [@Benjamin\_Lowe](https://community.livekit.io/u/Benjamin_Lowe)\
**Post date:** [June 4, 2026, 1:52pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/1 "2026-06-04T13:52:44Z")

</div>

Is there any way to programmatically query (via API or MCP server) all the data shown under the livekit dashboard session which shows things like packets lost for a given participant?

When diagnosing if a user bug report was due to network connectivity issues, that would be very useful.

---

<div class="post-metadata">

**Author:** ![CWilson](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/cwilson/32/135_2.png) [@CWilson](https://community.livekit.io/u/CWilson)\
**Post date:** [June 4, 2026, 5:12pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/2 "2026-06-04T17:12:44Z")

</div>

It is a good suggestion and has been discussed. But currently that is not available.

---

<div class="post-metadata">

**Author:** ![Muhammad\_Usman\_Bashir](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/muhammad_usman_bashir/32/1149_2.png) [@Muhammad\_Usman\_Bashir](https://community.livekit.io/u/Muhammad_Usman_Bashir)\
**Post date:** [June 5, 2026, 5:18pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/3 "2026-06-05T17:18:11Z")

</div>

@Benjamin_Lowe, CWilson’s right that the dashboard telemetry isn’t exposed via API today. The closest existing programmatic signal is per-participant ConnectionQuality events from the client SDKs (`enum: Excellent / Good / Poor / Lost / Unknown`) which fire on quality state changes:

```auto
  participant.on(ParticipantEvent.ConnectionQualityChanged,
    (quality: ConnectionQuality) => {
      console.log(participant.identity, 'quality:', quality);
    }
  );

```

[[livekit/client-sdk-js …/Participant.ts](https://github.com/livekit/client-sdk-js/blob/main/src/room/participant/Participant.ts) ]

It’s qualitative not quantitative (no packet-loss numbers), but enough to correlate with bug reports if you log it to your own backend. For raw `packet-loss / jitter / RTT`, the underlying WebRTC `getStats()` is reachable via SDK internals but not officially exposed on the Participant API, so you’d be polling from your own client wrapper and shipping the data to your backend yourself.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Lowe](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/benjamin_lowe/32/314_2.png) [@Benjamin\_Lowe](https://community.livekit.io/u/Benjamin_Lowe)\
**Post date:** [June 5, 2026, 7:37pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/4 "2026-06-05T19:37:48Z")

</div>

I see thank you - I would love to be able to query this data so hope that feature comes in future.

Incidently @Muhammad_Usman_Bashir In the Javascript client SDK the avatar shows a icon showing connection strength over the avatar of the agent and the avatar of the user - do we expect those to always be in sync (equal to) the agent side ConnectionQualityChanged events? We noticed some oddity recently that one user always gets 1 bar of “signal” shown on the agent avatar, despite experiencing no problems with the call (and agent showing no issues when other users talk to the same worker node).

---

<div class="post-metadata">

**Author:** ![Benjamin\_Lowe](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/benjamin_lowe/32/314_2.png) [@Benjamin\_Lowe](https://community.livekit.io/u/Benjamin_Lowe)\
**Post date:** [June 5, 2026, 7:44pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/5 "2026-06-05T19:44:36Z")

</div>

We currently log server side ConnectionQualityChanged events, but how do we log the initial connection quality? I see some cases where it seems that ConnectionQualityChanged never fires (like the prior session where my colleague saw locally poor agent connection strength throughout the call according to the client), so we have no log of the connection health server side as no ConnectionQualityChanged was emitted.

```python
python

@property

def connection_quality(self) → ConnectionQuality:

“”"The participant’s most recently reported connection quality.

Returns \`\`ConnectionQuality.QUALITY_UNKNOWN\`\` until the first

connection-quality update is received. Updated automatically whenever a

\`\`connection_quality_changed\`\` event fires for this participant.

“”"

return self._connection_quality 

```

We are also investigating adding the official livekit connection test [Add connection check helper by lukasIO · Pull Request #489 · livekit/client-sdk-js · GitHub](https://github.com/livekit/client-sdk-js/pull/489) , but it takes up to 30 seconds to measure the jitter etc. so its challenging for us to think how best to fit it into the user journey without it being obtrusive

---

<div class="post-metadata">

**Author:** ![Muhammad\_Usman\_Bashir](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/muhammad_usman_bashir/32/1149_2.png) [@Muhammad\_Usman\_Bashir](https://community.livekit.io/u/Muhammad_Usman_Bashir)\
**Post date:** [June 5, 2026, 9:07pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/6 "2026-06-05T21:07:11Z")

</div>

@Benjamin_Lowe, Two things.

The components-js `ConnectionQualityIndicator` reads `participant.connectionQuality` (the server’s per-participant view), so asymmetry is expected: one user’s stuck `1-bar` is usually their endpoint (ISP packet loss, browser throttling, device under-reporting RTCP), not the agent. Other participants experiencing nothing wrong confirms that.

For the initial-quality logging gap: connection\_quality returns `QUALITY_UNKNOWN` until first update, and updates only fire on changes. Poll on a timer:

```auto
  import asyncio

  async def log_initial_quality(participant, delay=5.0):
      await asyncio.sleep(delay)
      logger.info(
          "initial_quality",
          participant=participant.identity,
          quality=participant.connection_quality,
      )

  @session.on("participant_connected")
  def on_participant(p):
      asyncio.create_task(log_initial_quality(p))

```

For the `30s` connection check: it’s composable. Run individual fast checks (checkWebsocket, checkWebRTC) inline at session start, defer slower ones (checkTURN, checkReconnect) to background [[livekit/client-sdk-js …/ConnectionCheck.ts](https://github.com/livekit/client-sdk-js/blob/main/src/connectionHelper/ConnectionCheck.ts) ].

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/system/32/26_2.png) [@system](https://community.livekit.io/u/system)\
**Post date:** [June 20, 2026, 9:07pm UTC](https://community.livekit.io/t/programatic-or-mcp-querying-of-data/1338/7 "2026-06-20T21:07:29Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
