Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
45c7b97
feat(mcp): Pass tool _meta through and list MCP Apps UI resources
sentry-junior[bot] Nov 19, 2026
8c20c22
feat(mcp): Add render_sentry_chart for full time series charts
sentry-junior[bot] Nov 19, 2026
027ac6e
feat(mcp): Render render_sentry_chart inline in MCP Apps hosts
sentry-junior[bot] Nov 19, 2026
a83a6fe
docs(mcp): Verify the chart view as an MCP Apps host
sentry-junior[bot] Nov 19, 2026
8b60aaa
build(mcp-server): Make room in the bundle budget for the chart view
sentry-junior[bot] Nov 19, 2026
f326b4f
fix(mcp): Handle cancelled calls, http links, and one-bucket series i…
sentry-junior[bot] Nov 19, 2026
11df7a8
fix(mcp): Chart every accessible project when projectSlug is omitted
sentry-junior[bot] Nov 19, 2026
3f626b4
fix(mcp): Plot negative values inside the chart
sentry-junior[bot] Nov 19, 2026
504f732
fix(mcp): Keep the group-by column in grouped errors chart links
sentry-junior[bot] Nov 19, 2026
8e4c04d
fix(mcp): Place the chart tooltip in CSS pixels
sentry-junior[bot] Nov 19, 2026
022ad7f
perf(mcp): Talk to MCP Apps hosts with a hand-written bridge in the c…
sentry-junior[bot] Nov 20, 2026
996eb16
build(mcp): Drop the runtime ext-apps dependency
sentry-junior[bot] Nov 20, 2026
761111c
build(mcp-server): Restore the 3.75 MiB bundle budget
sentry-junior[bot] Nov 20, 2026
553faed
perf(mcp): Load a view's HTML on its first resources/read
sentry-junior[bot] Nov 20, 2026
57bdc49
test(mcp): Check MCP Apps views against their rules
sentry-junior[bot] Nov 20, 2026
facaee2
build(mcp): Lint against runtime imports of the ext-apps SDK
sentry-junior[bot] Nov 20, 2026
6767d96
test(verify-toolkit): Drive the rest of the MCP Apps lifecycle
sentry-junior[bot] Nov 20, 2026
2e2e83b
docs(mcp): Add design principles for MCP Apps views
sentry-junior[bot] Nov 20, 2026
42df212
build(mcp-server): Record the measured bundle size
sentry-junior[bot] Nov 20, 2026
f8b8242
refactor(mcp): Record each view's byte budget on its resource
sentry-junior[bot] Nov 20, 2026
a7250df
feat(mcp): Measure MCP Apps views as hosts read them
sentry-junior[bot] Nov 20, 2026
4a8a40a
ci(token-cost): Report MCP Apps view sizes
sentry-junior[bot] Nov 20, 2026
3b32e93
feat(mcp): Ship MCP Apps views to experimental sessions only
sentry-junior[bot] Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .agents/skills/verify-toolkit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ node .agents/skills/verify-toolkit/scripts/check-results.mjs subset WIDE_DIR DIR
node .agents/skills/verify-toolkit/scripts/check-results.mjs local DIR
```

`scripts/mcp-apps-host.mjs` acts as an MCP Apps host for
`render_sentry_chart` on the mock server: it reads the tool's `ui://` view,
mounts it in headless Chromium through the ext-apps `AppBridge`, and writes
screenshots, `host-log.json`, and `checks.txt` to `--out`:

```bash
node .agents/skills/verify-toolkit/scripts/mcp-apps-host.mjs --out DIR
```

`scripts/sentry-offline.mjs` runs one CLI command with the same offline env,
and writes `command.txt`, `stdout.txt`, `stderr.txt`, and `exit-code.txt`:

Expand Down
2 changes: 2 additions & 0 deletions .agents/skills/verify-toolkit/map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@ out of the map.
- `mcp-access.md` covers who can start `sentry mcp` and what a session
reaches: login, skills, and org scope.
- `cli.md` covers CLI behavior with no login and with a token.
- `mcp-apps.md` covers what an MCP Apps host gets for `render_sentry_chart`:
the `ui://` view, rendering, theme, and calls back through the host.
- `sentry-local.md` covers `sentry local`: verifying an app's SDK, querying a
retained session, hiding session credentials, and stopping the daemon.
44 changes: 44 additions & 0 deletions .agents/skills/verify-toolkit/map/mcp-apps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# MCP Apps chart view

What an MCP Apps host (Claude, VS Code, ChatGPT) gets for `render_sentry_chart`:
the tool names a `ui://` view in `tools/list`, the view reads back as one
self-contained HTML document, and the view renders the tool result, follows
the host theme, and calls the tool again through the host. The goals are in
`design/mcp-apps.md`.

## Claims

- `tool-meta` `render_sentry_chart` sets `_meta.ui.resourceUri` to a `ui://` URI and `_meta["openai/outputTemplate"]` to the same URI, with no deprecated flat `ui/resourceUri` key. Proof: `drive`.
- `view-resource` `resources/list` lists that URI, and `resources/read` returns it with mime type `text/html;profile=mcp-app` and an HTML document. Proof: `drive`.
- `view-listing` A session that cannot call `render_sentry_chart`, including every stable (non-experimental) session, lists no resources and no resources capability. Proof: `test` with `pnpm --filter @sentry/mcp-core exec vitest run src/server.ui-resources.test.ts`.
- `view-renders` Mounted through the ext-apps AppBridge, which also checks the view's hand-written MCP Apps bridge against the reference host, the view draws the series, shows a tooltip on hover, and hides its empty state. Proof: `drive`.
- `view-theme` The view follows the host's light or dark theme. Proof: `drive`.
- `range-roundtrip` The range picker calls `render_sentry_chart` through the host with the new period and redraws without remounting. Proof: `drive`.
- `open-link` "Open in Sentry" asks the host to open the result's Sentry URL with `ui/open-link`. Proof: `drive`.
- `grouped` A `groupBy` result draws one series per top group, with a legend. Proof: `drive`.
- `lifecycle` The view follows a `host-context-changed` theme change, shows a cancelled state on `ui/notifications/tool-cancelled`, and answers `ui/resource-teardown`. Proof: `drive`.
- `default-csp` The view loads and runs under the spec's default CSP with no console errors, so it needs no `csp` domains. Proof: `drive`.

## How to get to it

- An MCP Apps host that lists `render_sentry_chart` and reads its `ui://` resource, over stdio (`sentry mcp --experimental`, `npx @sentry/mcp-server --experimental`) or remote HTTP in experimental mode. Stable sessions list neither the tool nor the view.
- A host with no MCP Apps support gets the same tool with a text and structured result only.

## Driving it with mcp-apps-host.mjs

Preconditions:

- Launch from `../SKILL.md` has run on this checkout, and `$VERIFY_RUN` is set.
- A Chromium build for playwright-core is installed. If the script cannot launch it, run `pnpm --filter @sentry/mcp-core exec playwright-core install chromium-headless-shell`.

- **Every `drive` claim: act as the host.** Run `node .agents/skills/verify-toolkit/scripts/mcp-apps-host.mjs --out "$VERIFY_RUN/mcp-apps"`. It starts the mock server, calls the tool, reads the view, and mounts it in headless Chromium inside a host page that uses `AppBridge`. Every line it prints, also in `checks.txt`, is `PASS`. The screenshots `chart-light.png`, `chart-dark.png`, `chart-range-7d.png`, and `chart-grouped-dark.png` show each state. `host-log.json` holds the view's `tools/call` and `ui/open-link` requests to the host.

## Gotchas

- The mock server answers from built packages. Rerun `pnpm run build` after changing mcp-core or the mocks, or the script drives stale code.
- The view is generated. After changing `packages/mcp-core/chart-app/`, run `pnpm --filter @sentry/mcp-core generate-chart-app`, then build.
- The host page sets the default CSP with a meta tag in `srcdoc`. Real hosts serve the view from a sandbox origin with CSP headers.

## Gaps

- `real-hosts` Rendering in Claude, VS Code, ChatGPT, and Codex desktop needs those apps with a live server; this map drives only the reference AppBridge. Use `mcp-qa` for real hosts.
Loading
Loading