Repository navigation
feat(mcp-apps): MCP Apps foundation - #551
Conversation
Coverage Report for CI Build 44076893253Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.003%) to 98.073%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
commit: |
| import listProjectsHtml from '@supabase/mcp-ui/list-projects.html'; | ||
| import listTablesHtml from '@supabase/mcp-ui/list-tables.html'; | ||
|
|
||
| export const LIST_PROJECTS_UI_URI = 'ui://supabase/list-projects'; |
There was a problem hiding this comment.
Something to be aware of with these URIs: hosts cache view HTML by ui:// URI (spec), so there's a trade-off on whether to version them (e.g. ui://supabase/list-projects/v1):
- If we don't version them, we rely on the host to refresh. After a schema change, a cached view can render the new result wrong for a few hours (ChatGPT caches widgets for ~hours).
- If we version them on schema changes, it fixes the caching, but adds an unwritten dependency between the server release and the views. If the views end up built elsewhere (e.g. supabase/supabase), the local MCP server would serve the new URI and break until the new view is published.
The second one is what OpenAI recommends,
Treat the resource URI as a cache key. When you make a breaking change to the HTML, JavaScript, or CSS, publish a new URI and update every tool that references it.
Not for this PR, but whichever we pick should be written down in CONTRIBUTING's "Breaking changes".
There was a problem hiding this comment.
Yeah this is a good point. There might be a way we can automate cache key in the future (hash on output schema)
| }, | ||
| }); | ||
|
|
||
| useHostStyles(app, app?.getHostContext()); |
There was a problem hiding this comment.
nit: useHostStyles covers the theme, variables and fonts, but not safeAreaInsets (Host Context), so views may get clipped on mobile hosts.
The ext-apps add-app-to-server skill applies them as body padding in onhostcontextchanged.
The chances of someone create a new project/branch from their phone are low but not 0 :lol:
There was a problem hiding this comment.
I think we definitely want to support mobile 👍 cc @charislam to consider in future PRs (this is mostly example/placeholder logic, feel free to remove/improve)
|
I know the views are placeholders, so this is only about the shared tokens in With One gap and two small things:
Hosts that send Caveat: this was headless Chrome on a re-creation using this exact |
Rodriguespn
left a comment
There was a problem hiding this comment.
Looks good, thanks for putting this together @gregnr 🙌
Co-Authored-By: Claude <[email protected]>
…issues Co-Authored-By: Claude <[email protected]>
… theme Co-Authored-By: Claude <[email protected]>
…h MCP Inspector (#568) Removes the `list_projects` and `list_tables` POC views so the create_project view can land on its own, and replaces the mcp-ui mock host with MCP Inspector. Context: [team-ai Slack thread](https://supabase.slack.com/archives/C0CHSAX7C6L/p1794916780779019?thread_ts=1794577334.284539&cid=C0CHSAX7C6L). The flag-gated MCP Apps plumbing from #551 stays. ## How to review this PR 1. [`73895ef`](73895ef) `fix(mcp-ui)`: `vite build --app` succeeds with zero views. Otherwise Vite tries to build a root `index.html` that doesn't exist. 2. [`3425dfb`](3425dfb) `fix(dev)`: `pnpm dev:http` stays up with zero views. Otherwise the view watcher exits and stops every watcher. 3. [`555298d`](555298d) `refactor(mcp-apps)`: removes the two views and their tool links. `server.apps.test.ts` now derives the view URIs from `getAppResources()`, so it covers whichever views exist. 4. [`057e481`](057e481) `refactor(mcp-ui)`: deletes `packages/mcp-ui/dev/` and adds `pnpm inspector`, which opens Inspector against `pnpm dev:http` with `?experimental_apps=true`, the token header and the modern protocol. The zero-view guards come first, so every commit builds on its own. Adding the Inspector also lifts the shared `hono` in the lockfile from 4.13.5 to 4.13.19, and most of the lockfile diff is the Inspector itself. Verified that every commit passes the mcp-ui build and the server typecheck, that `server.apps.test.ts` passes, that `pnpm dev:http` stays up with no views, and that `pnpm inspector` connects on the 2026-07-28 protocol. --------- Co-authored-by: Claude <[email protected]>
🤖 I have created a release *beep* *boop* --- <details><summary>mcp-utils: 0.11.0</summary> ## [0.11.0](mcp-utils-v0.10.0...mcp-utils-v0.11.0) (2026-11-17) ### Features * **mcp-apps:** MCP Apps foundation ([#551](#551)) ([0dbacba](0dbacba)) </details> <details><summary>mcp-server-supabase: 0.18.0</summary> ## [0.18.0](mcp-server-supabase-v0.17.0...mcp-server-supabase-v0.18.0) (2026-11-17) ### Features * **mcp-apps:** MCP Apps foundation ([#551](#551)) ([0dbacba](0dbacba)) </details> <details><summary>mcp-server-postgrest: 0.2.1</summary> ## [0.2.1](mcp-server-postgrest-v0.2.0...mcp-server-postgrest-v0.2.1) (2026-11-17) ### Bug Fixes * **postgrest:** add deprecation notice and BYO-MCP migration pointer ([#570](#570)) ([029e2a5](029e2a5)) * **postgrest:** report HTTP error responses as tool errors ([#541](#541)) ([ffa50d2](ffa50d2)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
This is the foundation for MCP Apps (not the final product). It sets up the tooling end to end and proves it with two basic views (
list_tablesandlist_projects). The views are placeholders that the frontend team will edit or remove. Goal is to set up the foundation that the frontend team can use to build the tool UI interfaces with.As-is nothing changes in production unless
experimentalAppsis turned on. With it off the server behaves exactly like today (noui://resources, no extension capability and no_meta.uion tools).When it's on (the
experimentalAppsoption, or?experimental_apps=trueon the local--httpURL), the two tools link to their views for modern-era clients (2026-07-28) that advertise the MCP Apps extension. Legacy-era clients are intentionally not supported because their capabilities can't be reliably known on each request.The views live in a new private package
packages/mcp-ui(Vite and React) to keep frontend dependencies out of the server package. Each view builds to one self-contained HTML file that the server inlines at build time, which adds about 430 KB per view to the server bundle (about 120 KB gzipped).Also made some changes to mcp-utils:
_metathroughresourcescallback receivesctx(liketools)Closes AI-1492