Repository navigation
feat(mcp-apps): experimental inline view for Alexandria results (off by default) - #522
Draft
nickscamara wants to merge 10 commits into
Draft
nickscamara wants to merge 10 commits into
nickscamara wants to merge 10 commits into
Conversation
…by default) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md # src/index.ts # src/server.ts
…ria-results Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spike, draft. This server returns no UI today. It adds one MCP Apps view behind a flag so we can try server-provided inline UI for Alexandria in ChatGPT and Claude.
What the clients need (Oct 2026)
There are two separate things called "inline UI".
io.modelcontextprotocol/ui, stable 2026-01-26): ChatGPT and Claude both render it. A tool declares_meta.ui.resourceUripointing at aui://resource served astext/html;profile=mcp-app. The host renders it in a sandboxed iframe and sends it the tool result over theui/*postMessage bridge. ChatGPT also acceptsopenai/outputTemplateandwindow.openaias aliases, but recommends the standard keys. Claude's help center says it uses a connector's interactive interface when one fits, and generates its own visuals only otherwise.What this PR adds
When
FIRECRAWL_MCP_APPS=trueis set (ormcpApps: trueforcreateFirecrawlMcpServerembedders):firecrawl_scrapegets_meta.ui.resourceUri = "ui://firecrawl/alexandria-results.html", added next to the existinganthropic/alwaysLoad.ui/initializehandshake and readsstructuredContentfromui/notifications/tool-result. It renders each Alexandria call as a table (up to 50 rows and 6 scalar columns). When one column is numeric it adds a bar chart, and when a call fails it shows the error. It follows the host's theme variables and reports its size._meta.ui.The screenshot comes from a local host harness that runs the real
ui/initializehandshake andtool-resultflow with a FRED result. It is not a ChatGPT or Claude session: testing in those needs this build deployed behind a connector.Known limits before this could leave the flag
firecrawl_scrapecall, not just Alexandria ones.resourceUriis static per tool, so URL scrapes also get the frame, which renders empty. In Claude, that may also take the place of its own generated visual. A clean fix means splitting Alexandria execution into its own tool or switching the binding per call, which changes the public tool contract. That is a separate proposal, not part of this PR.io.modelcontextprotocol/ui. This prototype uses a process flag instead.Tests
tests/mcp-apps.test.mjs:uimetadata and no resources are listed.resources/read(mime type,_meta.ui.prefersBorder, no external assets) are checked, and an Alexandria call still returns the same result.find-toolscalls, flattens nested records, charts numeric columns and shows errors.tsc,lintandpnpm test(170 tests) pass locally.Summary by cubic
Adds an experimental MCP Apps view that renders Alexandria results from
firecrawl_scrapein hosts like ChatGPT and Claude. It's off by default, and tool inputs, outputs, and text content are unchanged.New Features
FIRECRAWL_MCP_APPS=true(ormcpApps: truefor embedders), the scrape tool declares_meta.ui.resourceUriand the server servesui://firecrawl/alexandria-results.htmlastext/html;profile=mcp-app.ui/initializehandshake, renders each Alexandria call as a table, adds a bar chart when one column is numeric, shows call errors, and follows host theme variables.Known Limits
firecrawl_scrapecall, not just Alexandria ones, so URL scrapes render an empty frame.io.modelcontextprotocol/ui, whereas this uses a process flag.Written for commit f634922. Summary will update on new commits.