Skip to content

feat(mcp-apps): MCP Apps foundation - #551

Merged
Rodriguespn merged 6 commits into
mainfrom
feat/mcp-apps-tooling
Nov 17, 2026
Merged

Rodriguespn merged 6 commits into
mainfrom
feat/mcp-apps-tooling

Conversation

@gregnr

@gregnr gregnr commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

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_tables and list_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.

image

As-is nothing changes in production unless experimentalApps is turned on. With it off the server behaves exactly like today (no ui:// resources, no extension capability and no _meta.ui on tools).

When it's on (the experimentalApps option, or ?experimental_apps=true on the local --http URL), 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:

  • Tools and resources pass _meta through
  • Servers can advertise extensions in their capabilities
  • The resources callback receives ctx (like tools)

Closes AI-1492

@coveralls

coveralls commented Nov 12, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 44076893253

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.003%) to 98.073%

Details

  • Coverage increased (+0.003%) from the base build.
  • Patch coverage: 92 of 92 lines across 9 files are fully covered (100%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
packages/mcp-server-supabase/src/tools/database-operation-tools.ts 2 98.64%

Coverage Stats

Coverage Status
Relevant Lines: 6316
Covered Lines: 6217
Line Coverage: 98.43%
Relevant Branches: 1365
Covered Branches: 1316
Branch Coverage: 96.41%
Branches in Coverage %: Yes
Coverage Strength: 294.13 hits per line

💛 - Coveralls

Comment thread package.json Resolved
@Rodriguespn Rodriguespn added the publish-preview Runs `publish-preview` workflow to publish preview packages via https://pkg.pr.new/ label Nov 13, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/@supabase/mcp-server-postgrest@48302d9
pnpm add https://pkg.pr.new/@supabase/mcp-server-supabase@48302d9
pnpm add https://pkg.pr.new/@supabase/mcp-utils@48302d9

commit: 48302d9

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

@gregnr gregnr Nov 16, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@vineethpawar

Copy link
Copy Markdown

I know the views are placeholders, so this is only about the shared tokens in src/shared/styles.css that the frontend team will build on. I checked them against a light and a dark host.

With theme in the host context they hold up: nothing stays light in dark mode, and a live hostcontextchanged switch repaints correctly.

One gap and two small things:

  1. Until the theme arrives, or if a host never sends it (theme is optional in McpUiHostContext), the document's color-scheme is normal. In a dark host that triggers the opaque backdrop your MockHost comment describes, so the loading message shows as a white strip. :root { color-scheme: light dark; } plus a prefers-color-scheme: dark block for the status fallbacks fixed it when the OS matched the host. Trade-off: a light host on a dark OS with no theme would get a dark strip instead.
  2. The tertiary fallback (currentColor at 50%, lines 11 to 14) measured 4.0:1 on white, under AA's 4.5:1 for the 12px headers. 60% gave 5.7:1 light and 6.9:1 dark.
  3. The light success and warning fallbacks (lines 19 and 20) measured about 4.4:1 on their 10% tint. #166534 and #92400e gave about 6.1:1.

Hosts that send --color-text-* override 2 and 3.

Caveat: this was headless Chrome on a re-creation using this exact styles.css, the views' markup and fixtures, and the ext-apps v2.0.4 theme logic, not the built bundle or a real host's proxy iframe, so minifier effects aren't covered. Happy to share the harness.

@gregnr
gregnr marked this pull request as ready for review November 16, 2026 20:42
@gregnr
gregnr requested a review from a team as a code owner November 16, 2026 20:42

@Rodriguespn Rodriguespn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for putting this together @gregnr 🙌

@Rodriguespn
Rodriguespn merged commit 0dbacba into main Nov 17, 2026
6 checks passed
@supabase-releaser supabase-releaser Bot mentioned this pull request Nov 17, 2026
Rodriguespn added a commit that referenced this pull request Nov 17, 2026
…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]>
Rodriguespn pushed a commit that referenced this pull request Nov 17, 2026
🤖 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish-preview Runs `publish-preview` workflow to publish preview packages via https://pkg.pr.new/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants