How do I query my agents’ traces from inside VS Code?
Rius lets you query your agents’ traces from VS Code by adding its MCP server to .vscode/mcp.json and signing in with your Rius account. You then ask Copilot Chat questions in plain language and it answers from your real telemetry: trace lists, cost and token summaries, span waterfalls and alerts. The server is a streamable HTTP endpoint, so there is nothing to install.
How it works
The Rius MCP server is an endpoint that your AI client connects to for querying your telemetry. In VS Code (Copilot), you register it in .vscode/mcp.json and select it in the Copilot Chat Agent view. Copilot then picks the right Rius tool for each question you ask.
- Transport and URL: streamable HTTP at
https://mcp.eu.console.rius-glassflow.com/mcp. - Sign-in: on a machine where you can open a browser, you sign in with your Rius account over OAuth, and VS Code handles the flow. The tools see the workspaces your user can access and act with your role.
- Headless option: a read-scoped API key sent as an
Authorizationheader replaces the OAuth flow. That key reaches only the one workspace it was created in. - Separate from tracing: this server is for querying. It is a different sign-in from the one that sends traces to Rius. The SDK’s
mcpintegration, which traces your agent’s own outgoing MCP tool calls, is a different thing and neither requires the other.
The full connection options are on the MCP page.
Set it up
-
Create
.vscode/mcp.jsonin your project. VS Code usesserversas the top-level key, notmcpServers:{ "servers": { "rius": { "type": "http", "url": "https://mcp.eu.console.rius-glassflow.com/mcp" } } } -
Open Copilot Chat, switch to the Agent view and select the
riusserver. -
Sign in. The browser sign-in opens the first time a session uses the server. Use your Rius account (GitHub, Google, or work email and password). Finish the flow in the browser, because a client can show the server as connected before sign-in is complete and list no tools until it is.
-
Verify the connection by asking:
Who am I in Rius, and which workspaces can I access?
Copilot should call the
get_metool and answer with your email and a workspace table. -
If sign-in loops or reports an auth error, remove and re-add the server. A stale cached token after a long idle period is the usual cause.
Without a browser. For a headless setup, mint a read-scoped key from the Connect an agent button on the console’s MCP page, or from Settings → API keys with the Query data (read) capability. Then send it as a bearer token in the server’s headers. VS Code can prompt for the key instead of storing it in the file. Ingest keys, which is what the SDK uses, can’t query through the MCP server and return a 403 about a missing scope. The key is shown once, so store it as a secret.
What you get
You ask in the chat panel where you already work, and Copilot calls Rius tools for the answer. Examples of what you can ask:
- Traces: “Summarize my agent traffic over the last 24 hours.” You get traces, LLM calls, error rate, cost, tokens and latency percentiles. “List the failed runs from this week and show me what went wrong in the worst one” returns a filtered trace list and then a span waterfall. Tools such as
list_agent_traces,get_agent_trace,list_spansandagent_traces_summarycover this. - Cost: “Which service is spending the most right now?” The metrics tools, such as
workspace_metrics_overview, answer from cost and token data. Costs are list-price estimates in US dollars. - Agents and users:
list_agents,agent_error_groups,compare_agent_versions,list_usersandlist_silent_failureslet you ask which agents fail, how two versions compare, and who your agents served. - Alerts:
list_alerts,get_alertandlist_alert_rulesread your alerts and rules. With an OAuth session as an admin, you can also create or update alert rules and channels from chat. Acknowledging a firing alert stays a person’s action, so a key never does it.
Every tool carries hints that say whether it only reads or changes something. Clients that honor the hints can auto-approve reads and ask you to confirm writes. Rius records the tool, outcome, latency and structural arguments of each call for 30 days, and never stores tool results.
Nothing the MCP server offers can create, rename or delete workspaces, or change members. Those stay in the console.
When something else fits
- If your client only supports stdio servers, bridge to the remote URL with
npx mcp-remote https://mcp.eu.console.rius-glassflow.com/mcp. - If you also want your coding agent’s own sessions traced, the Rius plugin covers Claude Code, Codex (beta) and Cursor (beta). See Coding agents.
- For browsing a trace visually or managing members and workspaces, use the console.