anthropics / anthropics/claude-ai-mcp

[Regression] ui/message from an MCP App no longer reaches the model on claude.ai (worked 2026-07-19, dropped by 2026-07-21)

Aperta
#660 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Nessun dato sulla lingua
Stelle
471
Fork
76
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Summary

An MCP App (custom connector, remote Streamable HTTP server) sends `ui/message`
(`role: "user"`) from its iframe after in-card navigation, so the model knows what the
user is looking at. On **2026-07-19** claude.ai honored this: the payload surfaced
silently as widget context (the UI showed a "Reading widget context" step on the next
user turn, and the model answered questions about the in-card view correctly). By
**2026-07-21**, in the same browser + client surface, the identical template's
`ui/message` no longer reaches the model: no widget-context step appears, and the
model answers from its stale prior context.

`ui/update-model-context` is also still dropped (#102), so there is currently **no
app→model context channel at all** on claude.ai.

## Evidence it isn't the app

- **Same client surface both dates**: claude.ai in the same desktop browser; connector
freshly re-added before the failing test.
- **Template current**: our server's telemetry logged claude.ai fetching the UI
resource (`resources/read`, 39 KB) seconds before the render, and the served bundle
verifiably contains the `ui/message` sender.
- **The interaction worked end-to-end except the last leg**: the user tapped a cast
member inside the card; the iframe's app-initiated `tools/call` reached our server
(logged: 1,885 ms, 10 KB result, no error), the card rendered the resulting view,
and the iframe then sent both `ui/message` and `ui/update-model-context` (verified
by our harness against the exact deployed bundle). The model's next-turn answer
showed no knowledge of any of it, and no widget-context indicator appeared.
- The same flow, same code path, produced the "Reading widget context" behavior on
2026-07-19 (tested repeatedly, including season-switch and person-pivot variants).

## Repro

1. Connect an MCP App server whose iframe, after render, sends
`{"jsonrpc":"2.0","id":N,"method":"ui/message","params":{"role":"user","content":{"type":"text","text":"On screen now: …"}}}`
in response to a user click (post-handshake, post-first-render).
2. Click the in-card control; confirm (server-side) the app's `tools/call` executed.
3. On the next user turn, ask the model what the user is looking at.

**Expected** (per the MCP Apps spec, `ui/message`: "Host SHOULD add the message to the
conversation context"): the payload is available to the model on the next turn — as it
was on 2026-07-19.
**Actual**: the payload is dropped silently; no error, no consent prompt, no
widget-context step.

## Questions

1. Is this an intentional change (e.g. the 2026-07-28 RC's "every UI-initiated action
goes through the same audit and consent path" direction) or a regression?
2. If intentional: what is the supported way for an app to inform the model of
in-iframe navigation, given `ui/update-model-context` is also dropped (#102)? If a
consent path now gates `ui/message`, it currently surfaces no prompt — the message
is silently discarded, which the spec's "MAY request user consent" doesn't seem to
cover.
3. If a regression: can the 2026-07-19 behavior (silent widget-context attachment) be
restored?

## Environment

- claude.ai (web, desktop browser), custom connector (remote MCP, Streamable HTTP + OAuth)
- MCP Apps per the 2026-01-26 extension spec; handshake `ui/initialize` →
`ui/notifications/initialized`; `protocolVersion: "2026-01-26"`
- App→host `tools/call`: working. `ui/open-link`: untested. `ui/message` +
`ui/update-model-context`: not surfaced to the model.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.