radar-mcp

v1.27.2
@slack/radar-mcp Checked 3 days ago Published 4 days ago

MCP server and web dashboard for debugging Slack on Android and iOS Simulator

Platform-agnostic MCP server and web dashboard for on-device debugging of mobile apps. Gives Claude Code direct access to network calls, RTM events, analytics (clogs), screenshots, logs, and more from a running debug build. Ships with Android device support (ADB) and initial iOS Simulator support; the DeviceTransport interface keeps platform-specific host behavior isolated. The dashboard and the agent tools are set up separately. install-app gives you the dock app (see Install it to your dock below); the tools need registering in every client you use.

Summary extracted from the README.

slack-radar-mcp

Platform-agnostic MCP server and web dashboard for on-device debugging of mobile apps.

Gives Claude Code direct access to network calls, RTM events, analytics (clogs), screenshots, logs, and more from a running debug build. Ships with Android device support (ADB) and initial iOS Simulator support; the DeviceTransport interface keeps platform-specific host behavior isolated.

For Slack engineers. The npm package is published publicly as a distribution convenience, but the source repository, issue tracker, and support live on Slack's internal GitHub Enterprise. External users can install the package but should not expect support or source access. The tool only functions against a Slack debug build, which is not distributed externally.

Installation

The dashboard and the agent tools are set up separately. install-app gives you the dock app (see Install it to your dock below); the tools need registering in every client you use.

For Claude Code, the recommended path is the marketplace plugin:

/plugin install slack-radar@slack-android-marketplace
/slack-radar-setup

Or register it in Claude Code manually:

slack claude mcp add -s user slack-radar-mcp -- npx -y @slack/radar-mcp@latest

Every other MCP client registers servers its own way, in its own config format, but the entry is the same shape everywhere: a command of npx, with the arguments -y and @slack/radar-mcp@latest. Check your client's own documentation for which file that entry belongs in and what syntax it expects.

Restart the client for the tools to appear, whichever one you registered with.

Web Dashboard

The package also ships a browser-based dashboard that shows the same live device data without Claude Code in the loop.

npx @slack/radar-mcp web

Or with a global install:

npm install -g @slack/radar-mcp
slack-radar

Opens http://localhost:8100 automatically. Set SLACK_RADAR_WEB_PORT to use a different port. (slack-radar-web still works as a direct alias.) Tabs:

  • Live — network, RTM, analytics clogs, traces, Slack-app logcat and Switchboard voice records in one timeline (level ≥ applies to the logcat lines). The rate and sparkline count every source together, so a voice session raises them the way RTM traffic does
  • Network — calls per second vs response time, every call listed, slow ones flagged
  • RTM — real-time websocket events
  • Clogs — analytics events, click one to see its payload
  • Traces — performance trace spans with durations, click one for its timing and tags
  • Logs — device logcat, filtered to the Slack app. app switches app or shows all apps; level ≥ sets the lowest level to show (VERBOSE shows everything; the choice follows you between Logs and Live and waits while you visit another tab)
  • Switchboard — the Slackbot voice transport's own records: session begin and end, connection, mic and speaking state changes, every websocket frame (← in, → out) with type and size, phase timings, player diagnostics (re-arms, jitter trims, read stalls, pre-ready drops), mic/playback level meter batches, and timed voice turns (how long Slackbot took to start answering, e.g. 1840 ms, no card), and whether each spoken turn got saved to the DM (saved, thread, saved (line moved on), thread for a late save whose line already moved on (a server resend counts again), or dropped: missing field with the reason; the session panel counts each of the four outcomes). Click a row for the rest of its fields; no level, so hide noise with the filter box or exclude, and the kinds chips on the toolbar (including levels) turn one kind of record off at a time. Records arrive once a Slackbot voice session starts. A debug build that declares its sources and lacks the plugin hides the tab; one too old to declare them shows it empty. Above the feed, a session panel draws the newest session: connection, mic and speaking pills, a pill naming the server's own id for the call (reading "pending" once a build known to report one has not sent it yet, and showing nothing at all on a build never known to), the handshake waterfall, model/you tracks with markers for re-arms, tts.stop and focus loss, mic and playback level sparklines once the device reports them, and four stat cards, at a 60 s, 5 min or whole session zoom. Export pages the device, then merges in the dashboard's own live stream copy (up to 50000 records per session); it can stop early (for example an old build, the size cap, the page limit, or the device going quiet), and the downloaded report's notes say why anything is missing. The tab's feed shows the same call as the panel, so a new call replaces both. Earlier calls still show on Live and in search.
  • Database — read-only browser for the on-device SQLite stores (pick a database, then a table, or run a read-only query). See the data-handling note below.
  • Preferences — read-only browser for the on-device SharedPreferences files (pick a file, browse its keys, or search across every file at once).
  • Feature Flags — live view of every feature flag and experiment the Slack app knows about, with its current effective value (ON/OFF for toggles, group name for experiments), its scope, and whether it is locally overridden; updates as they change on the device. Filter by name.
  • Test cases — pick a built-in or saved case, set repeat and rate, Run it on the device and Stop it, read the per-type counts with p50, p90, p99 and max times, copy the settled summary as JSON, and delete a saved case. Shown on builds that serve test_runs.
  • Custom — a tab Claude builds on request. Ask a Claude Code session in your terminal for a view the pre-built tabs do not cover (e.g. "graph calls per second and flag the slow ones"); it authors the view via the open_radar_dashboard tool and it appears here. A Custom view can carry exclude terms to hide noisy rows; add more with the exclude… control on the feed toolbar or the Filters panel (comma-separated there), or have the agent set them in the spec (one phrase per term, no commas or line breaks). A log view narrowed to one tag is the same kind of ask: "show me only the <Tag> logs, DEBUG and up, without the noisy lines" becomes a spec with source: log, match: {package, tag}, minLevel and exclude, opened as a Custom tab. Persists until you refresh the page; exclude terms are remembered in the browser only on the pre-built tabs.

Each tab has a filter / sort / pause / clear feed and a payload inspector, most a live rate, Network and Traces a graph. Clear empties the dashboard's own view only, so the device keeps its buffers and a reconnect or a source switch backfills recent records again (ask a Claude Code session for clear_buffers to wipe the device too). The filter box takes space-separated terms that must all match, -term to exclude, /pattern/ for regex, and "quoted phrases" for spaces or a literal - or / (curly quotes count too, and pasting text with spaces quotes it for you, unless you are mid-word or the text starts in filter syntax). -term is page-wide and gone on reload; to keep an exclusion, use the exclude… control on the feed toolbar (one term, then Enter), the exclude row in the Filters panel (comma separated) or an agent's exclude on the spec: the terms show above the feed as removable chips, are saved with the tab, and on a pre-built tab are remembered in the browser when you come back; a spec an agent pushes lands as written and does not touch that memory. An exclude term written field:value (say kind:frame, the Switchboard record's own kind field; no space after the colon) hides rows whose field equals the value, case-insensitive, and a field no row carries hides nothing; plain terms match by substring, and the Switchboard tab's kind chips toggle those kind: terms for you. The ? at the right edge of the box opens a short legend under it. A phrase that itself contains a quote character goes in /regex/ form instead, where quotes are plain text. Committed terms turn into removable pills; a leading - is now the exclude operator (the old box matched it as plain text), and quoting restores the literal. Regex flags are optional and short (i/m/s/g, 1-2 letters only, so an ambiguous tail like /api/im reads as flags, noted in the tooltip); typos like /error/x become part of the pattern and match literally, and quoting any /…/ term matches it literally. Invalid regexes and incomplete typing (e.g. /foo() are ignored (the term turns amber) instead of blanking the feed. On the Live tab a row type name (log, clog, trace, rtm, network, switchboard) also matches rows of that type, and the -log form excludes by row type only, so it hides logcat lines without touching a logout clog (quote it, -"log", to exclude by text instead). Switching tabs replays what you have already seen this session (the browser caches it, bounded by count and age) so the view does not reset to empty. ADB forwarding and device activation are handled for you; a reconnect control re-arms after a device sleep. The device-side session shuts down after its idle timeout, and an open dashboard tab now recovers that on its own: the header says there is no radar session on the device and re-enables it, once right away (or on the minute, if the session just came back and died again) and then at most once a minute, giving up after three failed attempts (a session that dies again within a minute of coming back counts as a failed attempt), or at once if the attached device changed, so the next press is yours. Only a tab you are looking at does this (a background tab never arms a device you let idle out), never a dashboard an agent opened, and ✋ stop auto re-enable in the header turns it off for dashboards at this address if you would rather do it by hand (SLACK_RADAR_NO_ARM=1 on the process turns it off for that process, along with the arm at launch). The dashboard follows your system light/dark setting by default; the theme toggle in the header overrides it and is remembered. A form-encoded request body is shown decoded, field by field, JSON fields expanded; Copy cURL still carries the raw bytes. A field whose JSON nests too deep stays as text with a note saying so, and a request body the device cap cut shows a truncation banner.

Install it to your dock (macOS)

To open Radar from the dock instead of a terminal:

npx @slack/radar-mcp install-app

That writes ~/Applications/Slack Radar.app. Open it once, then right-click its dock icon and choose Options > Keep in Dock.

The dashboard port is baked into the app at install time. To use a port other than 8100, set it when you install, for example SLACK_RADAR_WEB_PORT=8101 npx @slack/radar-mcp install-app, and set the same SLACK_RADAR_WEB_PORT in your MCP server config so the tools and the app use the same dashboard. In Claude Code that is -e on the add command:

slack claude mcp add -s user slack-radar-mcp -e SLACK_RADAR_WEB_PORT=8101 -- npx -y @slack/radar-mcp@latest

If the server is already added, run slack claude mcp remove -s user slack-radar-mcp first, since add refuses a name that already exists. In a JSON config the port goes in the server entry's "env" object, as "env": { "SLACK_RADAR_WEB_PORT": "8101" }.

The native app also updates itself: when a newer version of the package is published, a launch rebuilds it in the background, and the update takes effect the next time you open it. That rebuild keeps the port the app was built with, or uses 8100 when that cannot be read. To change the port, run install-app again with the new SLACK_RADAR_WEB_PORT. Use Check for Updates… in the app's menu to check and install right away instead of waiting for the next launch.

Clicking it starts the dashboard if it is not already running (the server auto-closes about 6 minutes after the last tab closes, so this is the usual case), waits for the port, then shows it. If an older dashboard is still holding the port and nobody is using it, the app asks that one to stop first, so an upgrade does not leave you looking at the version you replaced. Quitting the app stops the dashboard it started, unless a Claude Code session or another window is still using it; a dashboard that was already running when the app launched is never stopped. If Xcode's command line tools are installed (xcode-select --install), install-app compiles a small native window for this: its own dock icon, its own process, no browser tab, no tab bar. Without a Swift toolchain it falls back to opening your default browser instead.

If the window cannot start the dashboard after a node upgrade, the app is holding a node path that the upgrade moved. Run this, then quit and reopen the app. It keeps the port the app already has; to change it, put SLACK_RADAR_WEB_PORT=<port> in front, matching your MCP server config.

npx -y @slack/radar-mcp@latest install-app

Screen overlay

A ▣ Screen button opens a side panel that mirrors the live device screen, with a full-resolution screenshot and a screen recording. It is off by default and opens to a consent notice first, because it shows whatever is on the phone (open DMs, message content, notifications).

  • Screenshot needs no extra tools: Android uses screencap, and iOS Simulator uses xcrun simctl io.
  • Live mirror uses the Android screenrecord stream (needs ffmpeg). For iOS Simulator, Radar polls native screenshots at 1fps — no ffmpeg dependency.
  • Recording uses ffmpeg on Android and simctl recordVideo on iOS Simulator. If ffmpeg is missing on Android, the panel shows the install command. ffmpeg is not bundled and is never installed for you.

Prerequisites

  • Node.js 18+
  • ADB for Android, or Xcode (full installation, not just command-line tools) for iOS Simulator
  • A debug build of Slack installed on the device (must include the slack-radar modules)

Environment Variables

All optional. Set them on the process that runs the MCP server or the dashboard. One further variable, SLACK_RADAR_INITIAL_SPEC, is set automatically when a tool spawns the dashboard and is not meant to be set by hand.

Variable Effect
SLACK_RADAR_WEB_PORT Port the dashboard listens on. Default 8100. The dock app bakes it in at install time, so set it when you run install-app.
SLACK_RADAR_DEVICE_PORT Host port forwarded to the device-side server. Default 8099.
SLACK_RADAR_DEBUG_PACKAGE The Slack debug package to arm, like com.Slack.intune.debug. Set it when two Slack debug builds run on one profile; it must be a Slack debug app id, like com.Slack.intune.debug or com.Slack.debug. Auto-detect knows the four shipped ids (com.Slack.internal.debug, com.Slack.intune.debug, com.Slack.prototype.debug, com.Slack.debug); any other debug app id needs this variable. Unset, Radar uses the one shipped debug build running, else com.Slack.internal.debug. The build is decided when the session enables or switches profile and held through re-arms; if it has gone by a re-arm, the re-arm sends nothing to another build, and when nothing else answers the session asks you to enable again.
SLACK_RADAR_NO_AUTO_CLOSE=1 Keep the dashboard running forever instead of closing it once every tab is gone.
SLACK_RADAR_ALLOWED_HOSTS Extra Host values the dashboard will answer, comma-separated (radar.local,myhost:8100). Only needed when you reach it by a name other than localhost. See Security.
SLACK_RADAR_NO_ARM=1 Never arm the device without a press: skips the arm at launch and turns off a tab's automatic re-enable. A Reconnect press still arms.
SLACK_RADAR_NO_OPEN=1 Do not open a browser window on launch. Set automatically when an MCP tool spawns the dashboard.
SLACK_RADAR_NO_FFMPEG=1 Pretend ffmpeg is absent, so screen recording degrades to screenshots.
SLACK_RADAR_PLATFORM Transport to use: android (the default) or ios. Radar does not probe or infer a different platform.
SLACK_RADAR_IOS_SIMULATOR_UDID Pin a specific iOS Simulator by UDID instead of auto-selecting the sole booted one.

Session Management

Radar starts disabled each session. All tools except ping return an error until enabled. export_switchboard_session also works after an auto-disable if this process streamed the call live.

Command Effect
/radar-enable Activates ADB forwarding, device broadcast, SSE stream. A repeat on a live session checks the device first and runs the full setup again when that check fails or the last activation did not land, the device, token or profile changed, the timeout changes, or Radar is in open mode. For a clean reset run /radar-disable, then /radar-enable.
/radar-disable Tears down stream, clears local buffers. Tools return "not active" error.

Auto-enable: When you ask Claude an obvious device question (clogs, network calls, screenshots, app state, RTM events, logs), Claude calls the tool first and enables only when a tool says Radar is not active or Session disabled. It enables once without asking and retries. If the enable or the retry fails it tells you and stops. One such answer per fresh session is expected.

Auto-disable: When the device-side radar shuts down after idle (default 5 min), the next tool call failure flips the session to disabled. Claude re-enables once without asking, then retries. If the enable or the retry fails it tells you and stops. export_switchboard_session still works after this: it builds the report from the live stream copy alone, with no device call, as long as this process streamed the call live. An explicit /radar-disable or clear_buffers wipes that copy.

Tools

Tool Description
ping Health check. Returns uptime, buffer sizes, remaining session time, stream status, the Radar MCP version (mcp_version), and which app/profile is bound (android_user_id, profile personal/secondary, package). Use timeout_minutes to extend sessions.
get_recent_network_calls HTTP call summaries: method, URL, status code, duration. Filterable by URL substring and status code.
get_network_call_detail Full request/response headers and bodies for a specific call (gzip/brotli decompressed). A form-encoded request body (by the record's request_content_type, or by shape on a build without it) also comes back decoded in request_body_decoded, JSON-valued fields parsed. A body, or its decoded copy, over 64 KB skips the decoded copy and request_body_decoded_omitted says so; a field left unparsed is named in request_body_decoded_unparsed. request_body stays the raw bytes; request_body_truncated: true means the device cap cut it (a build that reports the cut itself is believed, otherwise it is read from the body's shape).
query_session The whole session from the host event spool (network, RTM, clogs, traces, switchboard), newest first, byte-capped, with a cursor to page older. An id read returns the full record, pulling the body from the device once and caching it; a network record gets the same decoded-form fields as get_network_call_detail; a body that cannot be pulled falls back to the summary with a note.
get_recent_rtm_events RTM event summaries: type, direction, channel, timestamp. Filterable by type, direction, channel. Uses subtypes (e.g. message_changed, not message).
get_rtm_event_detail Full RTM event JSON payload for a specific event.
get_recent_clogs Analytics event summaries: name and timestamp. Filterable by event name substring. Persists from app start.
get_clog_detail Full clog JSON payload for a specific event.
get_recent_traces Performance trace/span summaries: trace name, span name, duration. Filterable by name substring.
get_trace_detail Full trace/span detail for a specific trace, including tags.
get_switchboard_sessions Slackbot voice (switchboard) sessions the device still holds, newest first: session_id, team_id, began_at, ended_at, record and frame counts, the newest state and audio levels, server_session_id (the server's own name for the session, null until it names one; absent on an older build), turns (turn count, the newest response time and its clock, null before the first turn; absent on an older build), and saved_turn_counts (saved turns per outcome; absent on an older build means not counted, not zero). Ids restart with the app process.
get_switchboard_session One voice session's summary plus its records, oldest first: state transitions, control frames (frame) in and out, player stutter events, phase startup timings, session begin/end/ready (ready carries server_session_id), levels (batched mic/playback meter ticks), turn (one timed voice turn: response_ms and clock), and saved_turn (whether a spoken turn got saved to the DM: outcome (applied, no_line, missing_field, other_session) and has_thread; the summary's saved_turn_counts counts each outcome, and absent on an older device build means not counted, not zero). Narrow with kind; limit is how many of the newest records come back (default 50, max 2000 per request; the device may hold more, paged with before_id), filtered by kind first, so a kind page is the newest limit records of that kind. reconnect_try (one voice reconnect try: trigger (restart, drop, settings), try and outcome (ready, retry, refused, gave_up)); a Reconnecting state's cause is its trigger, and the summary's server_session_ids lists every ready id. card (one move of a voice card the server is waiting on: card_kind, event, by, card_id; a card shown or carried and not taken down since was still up at the session's last record).
export_switchboard_session Write one voice session's summary and its records to a plain-text report under ~/.slack-radar/exports/, permissions 0700/0600 like capture_snapshot. Pages the device, then merges in the live stream copy; the export can stop early (for example an old build, the 32 MB size cap, the page limit, or the device stopping answering), and the report notes say why anything is missing. An unknown id (404, unreachable, or too large to read) errors unless this process streamed the call live, then the report comes from the live stream copy alone, whichever process ran the export, since this MCP server and the web dashboard each keep their own. Defaults to newest when id is omitted; returns the file path and a summary.
wait_for_events Block until matching events arrive via SSE stream. Idle-timeout based, not polling.
search Full-text search across network, RTM, clog, and trace buffers.
get_app_state Current Activity/Fragment state via dumpsys. Shows visible screen, parameters, tab state.
get_recent_logs Recent device logs, optionally filtered by tag (omit tag for all lines). Android reads the app's own debug buffer first, falling back to logcat (app_buffer / logcat_capture / logcat_ring); iOS Simulator reads a bounded live unified-log capture. The result's source identifies which one served it.
list_profiles List the Android users and profiles on the device (personal, work, and so on).
activate_for_user Activate radar for a specific Android user or profile.
capture_snapshot Bundle the current network, RTM, clog, and trace buffers, feature flags, voice-session summaries, details of failed network calls, and device and app facts, plus an optional screenshot, into one saved snapshot for a bug report or repro. summary.md is the short digest to read first. Auth headers, cookies and token-shaped strings are blanked by default (best effort); redact=false keeps them raw.
screenshot Capture device screen as PNG. 720px default, full_res=true for full resolution.
record_screen Record short screen video (MP4). Default 5s, max 30s.
list_databases List the app's on-device SQLite databases. Read-only.
list_tables List the tables in a given on-device database, with row counts. Read-only.
query_database Run a read-only query (SELECT, WITH, EXPLAIN, VALUES, PRAGMA) against a copy of an on-device database pulled to the host.
list_prefs List the app's on-device SharedPreferences files. Read-only.
get_prefs Read a preferences file's keys and values, optionally filtered to specific keys.
search_prefs Search preference keys and values across every file by a substring.
list_feature_flags List every feature flag with its latest effective value and override status; toggle rows also carry session_enabled, the flag's own value the app runs now: the first-read value for a flag already read this session, or the value a read returns now for one not yet read. Optionally filtered to just the overridden ones. Experiment rows also carry session_group_name ("" is no group, absent is not known). Boolean toggles carry enabled; multi-variant experiments carry type: "experiment" and a group_name string (the effective variant, e.g. "treatment_a") instead.
search_feature_flags Case-insensitive substring search on feature flag names, against the same live list as list_feature_flags. Rows carry the same type/group_name fields for experiments.
get_feature_flag Look up one feature flag by its exact key. Returns one row per scope (authenticated/unauthenticated) and per signed-in org, since each workspace resolves its own value; pass org_id to narrow to one workspace. An experiment row carries type: "experiment" and its group_name variant rather than a boolean enabled.
run_test_case Replay a built-in or hand-written case. Pass case, optional repeat and rate_per_second (null for burst). Requires a debug build serving test_runs.
get_test_run Read run_id, or list the last ten when omitted. Optional wait_seconds (max 45) polls until settled. It bounds when the last read may start; every read then gets 3 seconds.
stop_test_run Stop run_id. Its counts stay readable with get_test_run.
save_test_case Save captured RTM events as a replay case. Pass name and ids from get_recent_rtm_events, optional repeat, rate_per_second and overwrite.
list_test_cases List built-in and saved cases with repeat, rate, event count and type counts. A file that cannot load shows its error.
clear_buffers Clear all captured buffers (network, RTM, clog, trace, settled test runs) on the device and locally, and the switchboard copy export_switchboard_session falls back to. The session event spool query_session reads is kept.
open_radar_dashboard Author or refine a custom live dashboard tab from a spec (source, filters, widgets, alerts). Suggested when a request is not covered by the pre-built tabs; not auto-invoked. Returns the dashboard URL; debug builds only, local only.
_radar_session_enable Enable radar for the session. A repeat on a live session checks the device first.
_radar_session_disable Disable radar for the session. Called by /radar-disable skill.

Test cases

The dashboard's Test cases tab runs the built-in and saved cases below.

Replay frames go into the app's own message handler on the device, not over the socket. Use a quiet workspace and a debug build that serves the test_runs source. Open a screen in a signed-in team first.

message_changed and message_replied seed a message, then edit it or update its reply count. Each event carries about 4 KB of made-up text. Both default to repeat: 100, rate_per_second: 10, so they send 200 frames over about 20 seconds. The rate counts every frame, including the seed. Frames per run = repeat × events.

Write custom cases to ~/.slack-radar/test-cases/<name>.json, then pass the name or name.json. A file named like a built-in replaces it. Names use 1 to 64 letters, digits, underscores or hyphens. The file must be regular, at most 256 KB, and contain an object with an events array and a required rate_per_second key. Null means burst. Repeat defaults to 1. Call arguments override repeat and rate, including a null rate, but cannot rescue a file missing the rate key.

Save a case from traffic with save_test_case. Only server-sent message, message_changed and message_replied frames are kept. The file holds test channel, user, timestamp and file ids and same-length filler text, so it carries none of the real ones. Every iteration replays the updates against one seeded message, so edits to several different messages share that one message. The dashboard's RTM tab does the same for the rows you select (Save as test case), into the same folder, so the case runs with run_test_case.

Placeholder Device fills it with
{{test_channel}} The test channel
{{seq_ts}} A run timestamp shared by a seed and its update
{{frame_ts}} A timestamp for each frame
{{seq_uuid}} A client message id shared by a seed and its update
{{seq}} The iteration number

This is a full message_changed file with the filler shortened.

{
  "repeat": 100,
  "rate_per_second": 10,
  "events": [
    {"type":"message","channel":"{{test_channel}}","ts":"{{seq_ts}}","client_msg_id":"{{seq_uuid}}","text":"seed {{seq}}","user":"UZRDR0000001"},
    {"type":"message","subtype":"message_changed","channel":"{{test_channel}}","message":{"ts":"{{seq_ts}}","text":"edit {{seq}}","client_msg_id":"{{seq_uuid}}"}}
  ]
}

The device accepts only message, message_changed and message_replied frames. Every channel must use {{test_channel}}. Timestamp fields must use run timestamps, thread_ts must equal ts, and client_msg_id must use {{seq_uuid}}. File ids must be test ids. User can be any id except your signed-in user. Leave out event_ts. The device rejects real channel and timestamp values and unresolved placeholders. Caps are 10,000 frames, 1 to 1,000 frames a second (or null burst), two minutes, 64 MB total UTF-8 template text and a 256 KB request body. Lower repeat does not shrink an oversized request body.

After run_test_case, call get_test_run(run_id, wait_seconds) until settled is true. A terminal state alone is not settled. The device waits two quiet seconds after the later of the run's end and its last counted event, and while frames are still pending it holds the run unsettled, at most ten seconds after the end; frames still pending at the cap count as ignored. A settling 409's N ms left is the quiet time left, or the hold time left once quiet. A frame already in its handler when a flush lands (the app backgrounded) gets a flushed span, which resolves it, so it neither holds the run nor reads as ignored; a frame still queued at that moment gets no span, so it holds the run to the ten second cap and reads as ignored. A capped wait returns a note to call again. List with no run_id if a run was evicted from the last ten (eleven while one is starting) or clear_buffers dropped it.

Trust summary only after settle. ok and failed count handler outcomes. by_type has per-type sent, ok, failed, p50_ms, p90_ms, p99_ms and max_ms. Percentiles need 100 counted events per type. Max needs one. Read dotted labels with bracket keys, such as summary.by_type["MESSAGE.MESSAGE_CHANGED"].

elapsed_ms, achieved_rate, drain_ms, held_ms and late_sends are null before terminal. Drain is the last counted event minus the last send, null without an event or for a negative gap. Achieved rate includes the test-channel clear, so it can read low on a short burst. other_events counts other types and run types past their cap. other_failed means another handler threw. failed_label names a failed run type, which stops sending. flushed counts flush spans. Stop reasons are requested, time_cap, workspace_gone, run_failed, handler_failed or null. Error can be the cause's class name if its message is null. Sweep rates 10, 50, 100 and 1000 with repeat 100 to compare settled summaries.

A 400 names the refused frame with frame_index and template_index (0-based) and seq (1-based). A 409 active names active_run_id to wait for or stop. A 409 settling names milliseconds left to wait before retrying. Stop returns 202 while stopping, 200 once terminal, 404 unknown, or 409 while starting. When the start reply is lost (a resend's own listed-id 409, or a start that was sent and got no answer), the tool reads the run back and returns a listed run; a starting one carries a note that its frames are still being checked. A 404 on that read means the device holds no retained run: the frame check refused it, the request never arrived, or a run that did start settled and was then evicted or cleared, so the error says to call run_test_case again. A failed read-back says the run may have started: read it with get_test_run before starting another, and a 404 there most likely means it never started, so call run_test_case again. Builds declaring sources without test_runs are gated. Older builds without sources return the device's route error.

Architecture

Mobile debug build (device)
  +-- Local socket (platform-specific)
        +-- HTTP endpoints + SSE streaming
              |
              | port forwarding (adb forward / iproxy / etc.)
              |
@slack/radar-mcp (Node.js, runs on developer machine)
  +-- src/shared/       DeviceTransport, AndroidTransport, SSE stream, constants
  +-- src/mcp/          MCP stdio server (Claude Code entry point)
  +-- src/web/          HTTP proxy server + browser dashboard
        +-- public/     Static HTML/CSS/JS served to the browser

All device-specific logic lives behind the DeviceTransport interface (src/shared/transport.ts). Buffers, SSE streaming, session management, and the HTTP wire protocol are platform-agnostic: the wire format is plain GET /api/<resource> with JSON, and adb appears only in the transport.

Consuming the wire from your own tooling: the dashboard's HTTP+SSE surface is documented as a read contract in docs/wire-contract.md (Oracle Surface v1) — named routes, SSE frame grammar, backfill/dedupe recipe, the auto-close trap, and an executable preflight (scripts/preflight.mjs, which lives in this repo rather than the published package, and is meant to be copied into your own harness).

Adding a new platform: implement DeviceTransport in src/shared/<platform>.ts and add a case to createTransport() in src/mcp/index.ts. The device-shaped operations (screenshot, screen recording, app state, device logs) are optional members, so implement what the platform supports and leave the rest absent; callers report each absent capability as "not supported on platform X". Two things stay Android-only for now and are guarded rather than abstracted: the dashboard (its flow assumes a device to arm) and adb port forwarding.

Security

  • No TCP port on device. Uses platform-specific local sockets, only reachable via port forwarding. Requires physical USB or explicit debug pairing.

  • Per-user device token. The first Radar process that needs the token (MCP or dashboard) mints it at ~/.slack-radar/radar-token, mode 0600, one per OS user. Every request carries it as X-Radar-Token; a device build with the token check answers 401 to anything else. How an enable hands it to the device:

    • First Radar checks ps for a debug build running as the target Android user. Nothing running there: nothing is written or sent, and the enable fails with "no debug build of the Slack app is running in Android user N; open it there and retry" (just "...is running; open it and retry" when ps saw no build and no user was asked for), from /radar-enable, activate_for_user and the dashboard alike. Open Slack in that profile first; activate_for_user only picks the profile, it cannot start the app.
    • File path (the default): the token goes over stdin with run-as into the app's private files/slack-radar/enable-token (mode 0600), then slack.debug.ENABLE_RADAR_TOKEN_FILE is sent with no token extra; the app reads and deletes the file inside the broadcast. This path keeps the token off every command line.
    • Argv fallback, the old ENABLE_RADAR --es radar_token enable, visible in ps and adbd's log while it runs, when a debug build is running (or ps could not tell) and one of these holds:
      • the run-as write failed, timed out or printed no written verdict (the build is not debuggable in that profile, or this adb cannot run run-as --user); Radar removes anything that landed first. The device's ping says nothing about this case: token_file: true only means the build has the action;
      • the file was still there after the broadcast: the build predates the action, or the app failed to delete it; Radar removes it, checks ps once more, and sends nothing if the app has stopped meanwhile. The enable result (_radar_session_enable, activate_for_user) carries token_via_argv with the reason when the token rode argv; the key is absent when it did not.
    • One argv enable exposes the long-lived token. token_via_argv covers only the enable that returned it; a background re-arm (any Radar tool call, the dashboard boot arm) or a dashboard enable can fall back too, and an argv broadcast that fails after am ran can still have exposed the token. To check from outside, watch adb shell ps -A | grep radar_token during the enable.
    • What it stops: a browser page that reaches the forwarded port (DNS rebinding, or any page you visit), and another app on the device connecting to the abstract socket. Neither can read your ~/.slack-radar.
    • What it does not stop: anything with adb access. The adb server on 127.0.0.1:5037 has no auth, so any local process can send a tokenless ENABLE_RADAR and put the device back in open mode, read the private token file with run-as in the moment before the app consumes it, or see the token in host or device ps during an argv fallback. Processes running as you can read the host file. The token keeps honest sessions apart; it does not lock out adb.
    • Open mode is deliberate: an ENABLE_RADAR broadcast with no radar_token extra (an older Radar MCP or dashboard, or a hand-typed am broadcast) turns the check off so older builds keep working. ENABLE_RADAR_TOKEN_FILE never opens a tokenless session: a refused file is logged and the session kept as it was, and a build that predates the action drops the broadcast. The MCP warns on every enable result and every ping that finds the device in open mode. The dashboard does not warn.
    • The token is never logged and never appears in an error. A failed broadcast reports adb's exit code and the first line of its stderr, with any token-shaped text redacted.
    • The file is never replaced on a 401. Delete it only when a message says the file itself is unusable; then re-enable every other Radar session so they pick up the new one.
    • Known limit: the dashboard forwards every device route (/api, /flags, /backfill, /detail) to the device with the token attached. Reads need only a local Host header; writes need an X-Radar-Dashboard: 1 header or a JSON Content-Type. Any local process can send all of these, so while a dashboard runs, any local process reaches the device through it, writes included. Stop the dashboard when you are not using it.
    • After upgrading: restart Claude Code and any open dashboard so every process sends the token, then run /radar-enable.
  • Debug builds only. Release builds bind a no-op implementation. Server code is eliminated at compile time.

  • Lazy activation. Dormant until explicitly triggered.

  • Auto-shutdown. Device-side server shuts down after idle timeout (default 5 minutes). Zero cost when unused.

  • Dashboard auto-close. Once a dashboard has been opened in a browser, the process shuts itself down about 6 minutes after the last tab closes, so a dashboard you walked away from does not linger. Opening a dashboard again (open_radar_dashboard, which writes a spec) pushes that deadline out by another grace window, but nothing else does: the other MCP tools read the device directly and never touch the dashboard, so a long agent session with no tab open will still close on schedule. Reopen it, or use the opt-out below, if you want it to stay. Two more exceptions: a dashboard that no tab has ever opened (one an agent spawned and nobody visited) stays up until you visit it once or stop it, because there is no "last tab closed" moment to measure from; and when you first upgrade to a version that has auto-close, reload any tab that was already open, because page code from before this feature does not report itself as present, so it will not keep the process alive even while you are looking at it. Reloading once is enough; later upgrades do not need it. Click ⏻ Stop dashboard in the header to stop it immediately instead (click twice to confirm, since it kills the process with no undo). Set SLACK_RADAR_NO_AUTO_CLOSE=1 to turn auto-close off entirely.

  • Keep-alive is not forgeable from a web page. Only the dashboard's own client and the MCP can postpone auto-close. A write to /setspec or /enable has to carry X-Radar-Dashboard: 1, or a content-type whose type is exactly application/json; the /health presence ping requires the header specifically, since a content-type says nothing about a request with no body. A cross-origin request cannot set either one without a CORS preflight it will fail. A request without either still works and still writes, it just does not extend the process lifetime, so curl -X POST .../setspec -H 'Content-Type: text/plain' sets the spec but will not stop the dashboard closing on schedule; use -H 'Content-Type: application/json' if you want it to count. This is a CSRF guard, not authentication: any local process can send either header, and the port is loopback-only by design.

  • Loopback Host only. The dashboard answers a request only when its Host header names this machine (localhost, 127.0.0.1, [::1], 0.0.0.0, with or without a port). Anything else gets a 403 whose body names the host it refused and how to allow it. Binding to 127.0.0.1 alone is not enough: a page that resolves its own domain to 127.0.0.1 connects locally, counts as same-origin in the browser, and could otherwise set the header above and stop your dashboard. If you reach the dashboard by some other name — a /etc/hosts alias, a container or Codespaces forwarded URL, your machine's LAN hostname — list it in SLACK_RADAR_ALLOWED_HOSTS (comma-separated, host or host:port). A plain SSH or VS Code port forward needs nothing, because the Host stays localhost.

Headless snapshot

radar-mcp snapshot saves the same snapshot as capture_snapshot without an MCP client, for a test run or CI job. It is Android only (it needs adb and a debug build on a device or emulator); iOS and the webapp are not supported. It arms Radar on the device, writes the bundle and prints one JSON line (path, zip_path, summary_path, counts, run_window, redacted, warnings, errors, privacy_notice). Everything else goes to stderr.

# when the run starts: remember the device clock
radar-mcp snapshot --start --serial emulator-5554

# ... run the test ...

# when it ends: bundle only what happened since the start
radar-mcp snapshot --serial emulator-5554 --out /tmp/run-1
Flag What it does
--serial <id> Device to use. Needed when more than one is attached.
--out <dir> Where to write the snapshot. Default ~/.slack-radar/snapshots. A directory you pass is never chmodded.
--start Only records the start of the run (~/.slack-radar/snapshot-starts/<serial>.json, mode 0600) and prints since_ms. Cannot be combined with --since, --out or --detail-url.
--since <epoch-ms> Keep events from this time on. This is the device clock, the same clock as the since_ms that --start prints, not the host clock. Beats the start marker.
--detail-url <text> Also keep the headers and bodies of calls whose URL contains this text, even when they succeeded (repeatable). Failed calls are always kept.
--timeout-minutes <n> 1 to 1440, default 60. Radar turns itself off after this long with no call, and turning Radar off, or on again, empties the network, RTM and voice-session buffers, so set it longer than your run.
--no-redact Keep tokens and auth headers as the device sent them.

Without a start marker (or --since) the snapshot holds the whole buffers. A marker is deleted once its snapshot is written. If Radar restarted during the run, or the marker is more than 24 hours old, the errors list says so.

Exit codes: 0 when bundle.json and summary.md were written (a missing zip tool is an errors line and a null zip_path), 1 when the device could not be picked, Radar would not start or the bundle was not written, 2 for bad usage. --help prints the usage on stdout and exits 0.

Redaction blanks the value of Authorization, Cookie and Set-Cookie headers and of any header whose name contains token, secret, password, cookie, auth, session or signature. Inside text, bodies and the log it blanks Bearer values, xox?- tokens, and name=value or JSON string pairs whose name matches that list; other fields are not blanked by name. This covers the bundle, the log and summary.md, not screenshot.png. It is pattern matching and best effort; auth also hits author, a blank too many being the safe side.

On a shared host:

  • Each run forwards its own free port, so parallel emulators need nothing extra; SLACK_RADAR_DEVICE_PORT still forces one. Pass --serial when several devices are attached.
  • The Radar token is one per OS user, not per run, and Radar stays on until its idle timeout after the end snapshot.

Data Capture

What gets captured depends on the in-app server implementation. The MCP server is agnostic to the data source. The Android implementation captures:

  • Network calls: OkHttp interceptor. Ring buffer: 400 calls.
  • RTM events: WebSocket listener. Ring buffer: 2000 events.
  • Clogs: Analytics interceptor. Ring buffer: 1000 events. Persists across radar activation cycles.
  • Traces: Performance span observer. Ring buffer: 2000 spans. Persists across radar activation cycles.
  • Test runs: Made-up RTM replay frames sent to the app's handler. The device keeps the last ten run summaries, with settled counts and per-type timings.
  • SQLite database (Database tab, web dashboard only): when you open a database, a read-only plaintext copy of that on-device store (message text, request/response bodies, user/channel/team IDs) is pulled to a temp directory on your own machine (os.tmpdir()/slack-radar-db-<port>, files mode 0600). Auto-deleted when the dashboard process stops.
  • SharedPreferences (list_prefs/get_prefs/search_prefs, and the Preferences tab): read directly off the device over adb, no local copy written. Files can contain feature flag overrides, cached team/org/channel IDs, and other app state.
  • Feature flags (list_feature_flags/search_feature_flags/get_feature_flag): read directly off the device over adb, no local copy written. Shows every flag's latest effective value, the flag's own value the app runs now (the first-read value once a flag has been read this session) where the build reports it, and whether it is locally overridden.

A snapshot (capture_snapshot) writes summary.md (a short digest), bundle.json, the device log tail (the app's own log buffer, or logcat from every app on the device) and an optional screenshot to ~/.slack-radar/snapshots/, mode 0700/0600. bundle.json holds the list buffers, feature flags, voice-session summaries, the headers and bodies (cut to 4 KB and 8 KB) of failed network calls, and device and app facts. By default it blanks the values of Authorization, Cookie and Set-Cookie headers and of headers whose name contains token, secret, password, cookie, auth, session or signature, plus Bearer values, xox?- tokens and name=value or JSON string pairs with such a name inside text and bodies, then says so in the bundle's privacy notice. screenshot.png is never redacted. This is pattern matching and best effort: a secret in an odd shape can slip through, and auth also blanks author, a blank too many being the safe side. Pass redact=false for raw values, only for a bundle that stays on your machine.

The network, RTM, clog, and trace captures are in-memory ring buffers. The Database tab is the exception: it writes a plaintext copy of the selected on-device database to a temp file on your host for the duration of the session. Review before sharing anything from it.

What gets captured, in detail

This tool captures unredacted network traffic from your debug Slack build, including:

  • URL query parameters (tokens can appear here)
  • Authorization headers and cookies
  • Set-Cookie response headers (session tokens)
  • Request and response bodies, up to 256 KB per body, for JSON, form, text, and XML content types
  • RTM WebSocket payloads (every sent and received message)
  • Analytics (clog) events serialized as JSON
  • Screenshots and short screen recordings on demand
  • Device logs (the app's own debug buffer, with a logcat fallback), optionally filtered by tag
  • SharedPreferences files, including feature flag overrides and cached team/org/channel IDs

Auth tokens and session cookies will appear in captured data. Captured data flows to your MCP client (Claude Code), which may send relevant portions to the configured AI provider per its own data handling policy.

Use against workspaces you are signed into as yourself

The tool is intended for debugging the Slack Android app against your own sessions. Do not share captured data (screenshots, log exports, tool transcripts) externally without first redacting auth material. Treat anything radar captures with the same care you would treat a curl transcript of an authenticated API call.

Local Development

npm install
npm run build        # Compile TypeScript + copy static assets to dist/
npm start            # Run the MCP server (stdio transport)
npm run start:web    # Run the web dashboard
npm run watch        # TypeScript compiler in watch mode
npm test             # Unit tests
npm run test:smoke   # Smoke tests
npm run test:all     # Both

Radar uses the Android transport by default. Choose the iOS transport explicitly when working with a Simulator:

npm run start:web
SLACK_RADAR_PLATFORM=ios npm run start:web
# Equivalent: npm run start:web -- --platform=ios

Within the selected platform, Radar chooses the sole running device or shows the device picker when several are available. It never probes the other platform. iOS supports live Simulator logs through MCP and the dashboard, screenshots, screen mirroring, and recording via simctl. After verifying that the shared host port belongs to the selected iOS app, Radar also enables the HTTP tools for network calls, RTM events, clogs, traces, and feature flags.

iOS Simulator logs

Enable the MCP session before you reproduce the issue, then call get_recent_logs. Capture starts at enable and covers unified logs from subsystems under com.tinyspeck; nothing logged before that point can be recovered. Results report source: "ios_unified_capture".

  • tag is a case-sensitive substring match on a line's category. Lines logged without a category use their subsystem, or failing that the process name. grep searches every field of the line (message, tag, subsystem, process, level, pid), ignoring case.
  • Levels map Debug → DEBUG, Info and Default → INFO, Error → ERROR and Fault → FATAL. Unified logging has no warning level, so a WARN filter matches nothing on iOS.
  • The dashboard Live and Logs tabs run their own capture, separate from the MCP session's, and replay what it has retained when you reconnect.

Physical iOS devices are not supported yet.

Log retention

Android logcat and iOS unified-log capture share one host ring per process: up to 20,000 records or about 10 MiB, whichever comes first, with the oldest records dropped first. A single record over 1 MiB is discarded.

Troubleshooting

"ADB port forwarding failed" Ensure a device is connected (adb devices should show exactly one device). If using wireless debug, confirm the pairing is active.

"Radar not responding" The device-side server may have auto-shut down. Use /radar-enable to restart it.

"Session disabled" Two consecutive connection failures disable the session. Use /radar-enable to reconnect.

"The device is in open mode" An older Radar MCP or dashboard, or a manual am broadcast, enabled the device without a token. If an older Radar MCP or dashboard is still running, stop it, then run /radar-enable. After an enable, the warning names this enable's failed broadcast or the profile mismatch instead. The MCP warns on every enable result and every ping that finds the device open; the dashboard does not warn.

"The device holds a different token than this session's" (the dashboard says "This device answered to a different Radar token") Another Radar session enabled the device after you did: another machine or OS user, a session using a token file you deleted, or Radar enabled in a different profile. Stop that session, or run /radar-enable in it so it picks up the new file, or make sure the Slack debug build runs in the profile you want (list_profiles shows which do), then run /radar-enable here (on the dashboard, press Reconnect). Deleting ~/.slack-radar/radar-token never fixes this.

Devices with more than one user (e.g. a work profile) The MCP server auto-detects the Android user ID via ps and targets the broadcast accordingly. No manual --user flag needed while ps finds the app running in that profile; open it there first, and use activate_for_user when ps cannot tell. When Slack debug builds run in several profiles, SLACK_RADAR_DEBUG_PACKAGE wins in every one. Unset, an enable arms the build the last enable chose (com.Slack.internal.debug on the first enable) wherever it runs, a non-zero profile first, and takes another shipped debug build only when that preferred one runs in no profile. Re-arms stay on the build the enable armed, and activate_for_user arms another profile. In the dashboard's Logs tab, the package filter narrows logcat to the Slack app; clear the chip or pick another package to widen it.

Tools not appearing after setup Restart your Claude Code session. MCP servers are registered at session start.

Port already in use (web dashboard) If a Radar dashboard is already running on the port, launching again just opens it. If the port is held by another program, run Radar on a different port with SLACK_RADAR_WEB_PORT=8101 npx @slack/radar-mcp web.

The dashboard shows the version you just replaced That badge reports the version of the process serving the port, not the app or package you installed. Installing does not touch a server that is already running, so an older dashboard can keep serving after an upgrade.

The open_radar_dashboard tool checks this too. stale_dashboard: true means the dashboard server is older than this MCP server. A dashboard older than 1.6.0 reports no version, so it also gets stale_dashboard: true, just without dashboard_version. stale_mcp: true means the dashboard server is newer. Both come with mcp_version. When either version could not be read, stale_dashboard is null, stale_mcp is absent, and the null covers both directions.

The app also leaves an older dashboard alone on purpose when somebody else is using it, either a Claude Code session or another window with it open. A refresh (⌘R in the app window, or Retry on its failure page) tries to take it from a window, or from a dashboard too old to say who is using it, and never from a Claude Code session the dashboard names; taking it costs that window its page, and everyone the server's pulled databases, device pin and logcat ring. ~/Library/Logs/slack-radar-dashboard.log names which one it found, and what a refresh will do about it.

The app window also says so in a strip at the top of the page when a launch or refresh keeps an older dashboard, or takes one from somebody. The strip has a short version of the log line and can be dismissed. If a refresh asked the older one to stop and the new dashboard then does not come up, the failure page says instead that the older one was asked to stop.

Ask the two surfaces separately. The installed dock app:

defaults read ~/Applications/Slack\ Radar.app/Contents/Info.plist CFBundleShortVersionString

And whatever is actually serving, with the dashboard open. A GET with the headers printed, not curl -sI: a HEAD only answers on the release that carries this change and later, and the dashboard you are diagnosing is an older one by definition.

curl -s -D - -o /dev/null http://127.0.0.1:8100/spec | grep -i x-radar-version

Use your own port if you set SLACK_RADAR_WEB_PORT. Against the wrong port both commands print nothing, which looks the same as a dashboard that is not there.

Two different versions is the answer. Stop the old dashboard, then quit the app and open it again:

curl -s -X POST -H 'X-Radar-Dashboard: 1' http://127.0.0.1:8100/shutdown

If it comes back older, the dashboard is being started by your Claude Code session, so restart that to reload its MCP server. Where npm enforces a minimum release age, @latest will not resolve to a release for its first week; pin the version in your MCP registration to get it sooner.