About Svelte Grab
Svelte Grab is an MCP server published by HeiCg in the Developer Tools category: svelte 5 reimplementation of react-grab — Alt+Click any element to inspect components, state, styles, accessibility, errors, and performance. A complete dev tool suite for coding agents. Conduid read 22 tools from its source: get_a11y_report, get_element_context, get_error_context, get_profiler_report, get_session_history, get_style_context and 16 more. It is published to npm as svelte-grab and starts with npx.
The repository has 39 stars and 4 forks, is licensed MIT, and its last commit was on 13 Nov 2026. The latest release is v1.4.2 (16 Mar 2026): Bug Fixes freezePseudoStates: Remove pointer-events: none on <html> that broke Alt+Click targeting — event.target always resolved to <html> instead of the actual clicked… It follows v1.4.1 (11 Mar 2026), and the 5 most recent releases go back to v1.2.0 (5 Mar 2026). It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass No dynamic code execution and Scoped permissions. Its topics include component-inspector, svelte, developer-experience, coding-agent, devtools and css-inspector.
Install
claude mcp add svelte-grab -- npx svelte-grab mcpnpx svelte-grab mcpgit clone https://github.com/HeiCg/svelte-grabTools (22)
get_a11y_reportLast accessibility audit from SvelteA11yReporter.get_element_contextLast grabbed context, non-blocking (cleared after reading).get_error_contextConsole errors and warnings captured by SvelteErrorContext.get_profiler_reportLast render profile from SvelteRenderProfiler.get_session_historyRecent interactions (up to 20) with timestamps and prompts.get_style_contextLast CSS analysis from SvelteStyleGrab.list_available_toolsWhich of the `get_*` tools have data and when it was captured.ui_annotationsThe comments the human left on elements with annotation mode, with refs ready for `ui_inspect`.| Parameter | Type | Description |
|---|---|---|
| clear | boolean | Mark the returned annotations as consumed (default false: they stay pending). |
| tabId | string | Target tab id from ui_tabs. Defaults to the active (last focused) tab. |
ui_component_impactBefore editing a shared component: its instances on the page, importers from the Vite module graph and whether to edit it or the usage site.| Parameter | Type | Description |
|---|---|---|
| ref * | string | Ref (eN) or ui:// stable key of an element rendered by the component. |
| tabId | string | Target tab id from ui_tabs. Defaults to the active (last focused) tab. |
ui_findFind elements by `text`, `role`, `name`, `component`, `file` or CSS `selector`; returns refs with component, source, box and visibility.| Parameter | Type | Description |
|---|---|---|
| component | string | Svelte component name, e.g. "Card". |
| file | string | Source file (path or suffix), e.g. "src/lib/Card.svelte". |
| limit | number | Maximum number of matches. |
| name | string | Accessible name. |
| role | string | ARIA role (explicit or implicit), e.g. "button". |
| selector | string | CSS selector. |
| tabId | string | Target tab id from ui_tabs. Defaults to the active (last focused) tab. |
| text | string | Visible text content to match. |
ui_inspectFull context for one ref: component, source, stack, props, `inspectable()` state, layout, matched styles, a11y and other instances.| Parameter | Type | Description |
|---|---|---|
| include | array | Sections to return (default all): stack, props, state, styles, layout, a11y, usage. COMPONENT and SOURCE are always included. |
| ref * | string | Element ref (eN) or ui:// stable key from ui_snapshot / ui_find. |
| tabId | string | Target tab id from ui_tabs. Defaults to the active (last focused) tab. |
ui_leak_checkRepeats actions (e.g. open then close) and reports detached elements still alive after a forced GC, by component and `file:line`. Without `--cdp` the result is `INCONCLUSIVE`.| Parameter | Type | Description |
|---|---|---|
| actions | array | Actions per iteration, in order (max ${MAX_RUN_ACTIONS}), e.g. [open toggle, close toggle]. |
| iterations | number | How many times to run the actions (default ${DEFAULT_LEAK_ITERATIONS}, max ${MAX_LEAK_ITERATIONS}). |
| tabId | string | |
| waitMs | number | Settle time after each iteration, after 2 frames (default ${DEFAULT_SETTLE_MS}, max ${MAX_SETTLE_MS}). |
ui_networkWhat a screen loads: every request with the `file:line` and component that started it, totals, first- vs third-party, duplicates, slowest, failed; `reload: true` measures the initial load.| Parameter | Type | Description |
|---|---|---|
| filter | object | "first-party", "third-party", or an origin/host substring. |
| includeBodies | boolean | Include redacted, truncated (2 KB) same-origin JSON response bodies (captured from now on / after reload). |
| reload | boolean | Reload the tab and report the requests of the fresh page load. |
| since | number | Only requests started at or after this epoch ms (reload implies the new page load). |
| tabId | string | |
| waitMs | number | Wait before reporting, in ms (reload: default ${DEFAULT_NETWORK_WAIT_MS} after the tab reconnects;otherwise default 0; max ${MAX_NETWORK_WAIT_MS}). |
ui_perf_metricsCDP mode (`--cdp`): Chrome counters (DOM nodes, listeners, heap, layouts, style recalcs, script/task time) before and after an in-page action, as deltas.| Parameter | Type | Description |
|---|---|---|
| ref | string | Shorthand for action { ref, type: "click" }. |
| tabId | string | |
| waitMs | number | Settle time after the action, after 2 frames (default ${DEFAULT_SETTLE_MS}, max ${MAX_SETTLE_MS}). |
ui_profileWhich components mutate the DOM over a short window (optionally while clicking/typing): `HOT <Component>` or `QUIET`, mutations/sec, bursts, FPS, long frames.| Parameter | Type | Description |
|---|---|---|
| action | object | Ref (eN) or ui:// stable key of the element to act on. |
| component | string | Only count mutations inside instances of this component (e.g. "TodoList"). |
| durationMs | number | Recording window in ms (default ${DEFAULT_PROFILE_MS}, ${MIN_PROFILE_MS}..${MAX_PROFILE_MS}). |
| ref | string | Only count mutations inside this element (eN or ui:// key). |
| tabId | string |
ui_security_scanRuntime security checks: secrets in URLs or sent to third parties, tokens in Web Storage, JS-readable auth cookies, sensitive SvelteKit page data, headers. Secrets are always redacted.| Parameter | Type | Description |
|---|---|---|
| checks | array | Checks to run (default all): ${UI_SECURITY_CHECKS.join(', ')}. |
| tabId | string |
ui_snapshotCompact tree of the live UI: one line per element with Svelte metadata or an a11y role/name (`eN <role> "<name>" <Component> <file:line>`). Start here.| Parameter | Type | Description |
|---|---|---|
| detail | string | "minimal" (default) or "normal" (adds box + classes). |
| maxNodes | number | Maximum nodes in the tree (default 200). |
| scope | string | "viewport", "page", or a ref (eN or ui:// key) to snapshot only that subtree. |
| tabId | string | Target tab id from ui_tabs. Defaults to the active (last focused) tab. |
ui_tabsList the browser tabs connected to the server; `ui_*` tools target the last focused one unless given `tabId`.| Parameter | Type | Description |
|---|---|---|
| outputSchema * | array |
ui_verifyPASS/WARN/FAIL checks on one element after an edit: visible, overflow, console errors, a11y, contrast.| Parameter | Type | Description |
|---|---|---|
| checks | array | Checks to run (default all): visible, overflow, console, a11y, contrast. |
| ref * | string | Element ref (eN) or ui:// stable key from ui_snapshot / ui_find. |
| since | number | Epoch ms for the console check (default: the last HMR update, else runtime start). |
| tabId | string | Target tab id from ui_tabs. Defaults to the active (last focused) tab. |
ui_wait_for_hmrCall right after an edit: waits for the Vite HMR update (or full reload) of those files, re-resolves refs and reports Vite errors.| Parameter | Type | Description |
|---|---|---|
| files | array | Edited files (path or suffix, e.g. "Card.svelte"). Any update counts when omitted. |
| since | number | Epoch ms: also accept an update that already happened at or after this time. |
| tabId | string | |
| timeoutMs | number | How long to wait in ms (default ${DEFAULT_HMR_WAIT_MS}, max ${MAX_HMR_WAIT_MS}). |
undo_last_actionUndo instruction with the original context of the last request.watch_for_grabBlock until the human Alt+Clicks an element and sends a prompt from the page; returns stack, HTML preview and the instruction.Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 11K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by package-lock.json.
- !No dynamic code executionScanned 127 source files and found 2 calls to eval or shell execution, in src/cli/audit/rules/code.ts:165 among others. Review how tool inputs reach them before granting credentials.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio and Streamable HTTPsrc/mcp/server.ts:972, src/mcp/server.ts:405
- Starts other programs
- 3 callssrc/cli/audit/deps.ts:19, src/relay/providers/copilot.ts:57, src/relay/providers/cursor.ts:67
- Outbound network calls
- 8 callssrc/lib/core/agent-client.ts:107, src/lib/runtime/connection.ts:141, src/lib/runtime/impact.ts:139
- Writes or deletes files
- No file writes or deletes
- Lockfile
- package-lock.json
Pattern matches on the source text of 127 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 11K words, fetched a month ago. The original in the repository is authoritative.
Read full README