Repository navigation
h5p-mcp-app: the card's own origin in each chat's form - #330
Merged
Merged
Conversation
Claude refuses a card whose _meta.ui.domain is not its own hash of the connector's address. domain is now written only as openai/widgetDomain, which ChatGPT reads; other chats pick their own.
Claude's ui.domain is the first 32 hex of the SHA-256 of the connector's address with .claudemcpcontent.com, computed from the address each request was sent to; with it, a site framed in the card may keep localStorage. ChatGPT's stays domain, as openai/widgetDomain. The card's address now hashes its policy too, Claude's origin aside, so a chat that keeps the card by its address gets the changed one.
alekswebnet
force-pushed
the
fix/mcp-app-claude-domain
branch
from
December 2, 2026 10:28
19ff71a to
163513e
Compare
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
Author
|
@coderabbitai review |
Action not completed
|
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.
Summary
Closes #329. In Claude, a server given
--domainshowed[mcp-ext-apps-host] ui.domain validation failedand no card: the option, ChatGPT's origin, was written to_meta.ui.domaintoo, which Claude accepts only in its own form. Claude's docs: a bad value shows an error in place of the app, and a site framed in the card keepslocalStorageonly with a valid one.Changes
_meta.ui.domainis Claude's: the first 32 hex of the SHA-256 of the connector's address with.claudemcpcontent.com, computed from the address each request was sent to (<origin>/mcp, query and all).domainstays ChatGPT's, written asopenai/widgetDomainalone.--help, the README and the rule indesign/mcp.mdsay so; thedomaincheck keeps its reason.Verification
pnpm --filter @missing-elements/h5p-mcp-app test: 33 passed. Typecheck,pnpm comments, and oxlint with chore: oxlint with type-aware rules, in CI (#325) #326's config: clean.tests/app.test.ts: Claude's origin forhttps://example.com/mcpis the one Claude's documentation gives,c3d80a4ed901ee05b21755a88273b4a4.claudemcpcontent.com; in the listing and on the card, with and withoutdomain; from the command's own address.By hand, once released and deployed: the card shows in Claude, and plays in it where Claude lets the play page's origin in; ChatGPT plays as before.
Tests added or updated where behavior changed
Documentation updated where public behavior or deployment changed
Relevant type checks, tests, and builds pass
No security-sensitive details or credentials are included
Screenshots or reproduction
Add the server as a custom connector in Claude web with
--domain https://lessons.example, and ask it to play an activity: the console shows the validation error and no card. With this change the card'sui.domainis Claude's for the connector's address.Summary by cubic
Makes the card's
domainoption ChatGPT-only, and gives Claude the origin it expects, so a card configured with adomainno longer shows an error in Claude.domainis written only asopenai/widgetDomain, which ChatGPT reads;_meta.ui.domainis now always Claude's hash of the connector's address it was asked at, which also lets a site framed in the card keeplocalStorage.--helpoutput, README,design/mcp.md, and tests.Written for commit 163513e. Summary will update on new commits.