| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Placeholder commit to open a draft PR. See plan in session workspace. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Per the MCP Apps 2026-01-26 spec, servers SHOULD check client capabilities before advertising UI-enabled tools. Extend the inventory strip gate to remove _meta.ui not only when the feature flag is off, but also when the request context explicitly reports the client lacks UI support (HasUISupport returns supported=false, ok=true). When the capability is unknown (ok=false, e.g. stdio paths), fall through to the existing feature-flag gate so existing behaviour is preserved. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Explicitly set prefersBorder on every UI resource — false for the get_me profile card, true for the issue/PR write forms — since hosts' defaults vary. * Declare an empty csp on issue_write_ui and pr_write_ui to document that they need no external origins. * Point spec link comment at the stable 2026-01-26 location. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Declare appCapabilities.availableDisplayModes (defaults to ["inline"]) during initialization, as required by the new spec. * Track McpUiHostContext (and its updates via onhostcontextchanged) and thread it into AppProvider, which now picks up host-supplied theme + CSS style variables and projects them onto the root element so Primer components inherit host theming. * Add setModelContext and openLink helpers to useMcpApp. issue-write and pr-write call setModelContext on a successful submission so the agent has the new entity in its next-turn context; get-me uses openLink for the profile's external blog link. The pinned @modelcontextprotocol/ext-apps ^1.7.2 was already resolved to 1.7.2 in the lockfile, so no dependency bump is required for the new HostContext / openLink / updateModelContext APIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
This PR aligns the MCP Apps implementation with the stable 2026-01-26 spec across server-side tool metadata handling, UI resource metadata, and React app host integration.
Changes:
| File | Description |
|---|---|
| pkg/inventory/registry.go | Centralizes _meta.ui strip logic using feature flag and UI capability context. |
| pkg/inventory/registry_test.go | Adds truth-table coverage for the new strip predicate. |
| pkg/http/handler_test.go | Verifies UI metadata is stripped/preserved based on client UI capability context. |
| pkg/github/ui_resources.go | Adds stable-spec UI resource metadata for CSP and border preference. |
| ui/src/hooks/useMcpApp.ts | Adds display mode capabilities, host context tracking, model context updates, and host link opening. |
| ui/src/components/AppProvider.tsx | Applies host theme and CSS variables to Primer rendering. |
| ui/src/apps/get-me/App.tsx | Threads host context and routes blog links through ui/open-link. |
| ui/src/apps/issue-write/App.tsx | Threads host context and updates model context after issue create/update. |
| ui/src/apps/pr-write/App.tsx | Threads host context and updates model context after PR creation. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Aligns this repository's MCP Apps implementation with the stable 2026-01-26 spec (https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx).
Server (Go)
Views (React, ui/)
Testing
Companion PR on github-mcp-server-remote: https://github.com/github/github-mcp-server-remote/pull/849