Commit graph

101 commits

Author SHA1 Message Date
Guangya Liu
1311fe8479
Updated ext-apps readme (#22) 2025-11-25 03:19:30 +00:00
Olivier Chafik
3e5ec1ae0b
build: use workspaces for example subfolders (#23)
* use npm workspaces

* Update package.json
2025-11-25 03:14:14 +00:00
Olivier Chafik
b4c6019d47
example-host: fix sandboxing setup (#21)
* example-host: prevent accidental non-iframing of sandbox (or iframing in prod)

* fix sandbox isolation + "test in prod"

* Update package.json

* Update sandbox.ts
2025-11-25 02:45:55 +00:00
Olivier Chafik
ca09c415bf
setup ci & presubmit (#20)
* ci & presubmit

* Update ci.yml
2025-11-25 02:40:48 +00:00
Olivier Chafik
3df49c38dc
fix iframe resizing (#19)
* reshuffle build / start scripts

* fix resize logic

* prettier

* extract RESOURCE_URI_META_KEY constant

* Update message-transport.ts

* Update package.json
2025-11-25 02:39:33 +00:00
Olivier Chafik
0e62ceca92
Merge pull request #5 from modelcontextprotocol/sep-fixes
Various SEP fixes
2025-11-25 02:24:18 +00:00
Olivier Chafik
1fc5e3439e
Merge pull request #18 from modelcontextprotocol/fix/resources-requests
Add ReadResourceRequestSchema forwarding for resources capability
2025-11-25 00:53:45 +00:00
Olivier Chafik
807c9a1df5
Merge pull request #17 from modelcontextprotocol/fix/optional-params-initialized-notification
Make params optional in McpUiInitializedNotificationSchema
2025-11-25 00:53:16 +00:00
Anton Pidkuiko MacBook
a5e47b2e13
Add ReadResourceRequestSchema forwarding for resources capability
The resources capability was forwarding ListResourcesRequestSchema and
ListResourceTemplatesRequestSchema, but missing ReadResourceRequestSchema.
This meant clients could list resources but not actually read them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 22:58:31 +00:00
Anton Pidkuiko MacBook
8b0c34cda9
Make params optional in McpUiInitializedNotificationSchema
Notifications sent without params (e.g., `{ method: "ui/notifications/initialized" }`)
were being rejected by the schema validation because params was required.
This makes params optional so notifications without explicit params are accepted.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 22:48:24 +00:00
Olivier Chafik
123b74090c
Merge pull request #15 from modelcontextprotocol/ochafik/simple-host-example
Add simple host example
2025-11-24 17:27:38 +00:00
Olivier Chafik
c800b34635
format 2025-11-24 17:27:06 +00:00
Olivier Chafik
fb6e772942
Update README.md 2025-11-24 17:15:21 +00:00
Olivier Chafik
f2fd0e596e
Update README.md 2025-11-24 17:12:19 +00:00
Olivier Chafik
b77f68dac7
Update README.md 2025-11-24 16:59:45 +00:00
Olivier Chafik
e4e7edf284
reshuffle, use -vanilla consistently 2025-11-24 16:59:41 +00:00
Olivier Chafik
24dd9691de
fix mcp sdk refs 2025-11-24 16:53:55 +00:00
Olivier Chafik
eab25b6821
serve.py -> server.ts 2025-11-24 16:52:05 +00:00
Olivier Chafik
3c438c29c4
Update example-host.ts 2025-11-24 16:26:57 +00:00
Olivier Chafik
1a4c0180eb
nit: rm unused type 2025-11-24 16:21:22 +00:00
Olivier Chafik
54a48a4a13
rename: AppRenderer 2025-11-24 16:20:45 +00:00
Olivier Chafik
d32e43aaf5
tweaks 2025-11-24 16:14:17 +00:00
Olivier Chafik
bc6458d3fb
tweaks 2025-11-24 16:12:55 +00:00
Olivier Chafik
14740aacea
fix build 2025-11-24 16:07:10 +00:00
Olivier Chafik
b738294458
fix build 2025-11-24 16:03:24 +00:00
Olivier Chafik
85816d80ce
Merge branch 'main' into ochafik/simple-host-example 2025-11-24 16:01:24 +00:00
Olivier Chafik
1f3bc52142
add simple-host example 2025-11-24 16:01:10 +00:00
Olivier Chafik
39d84a9260
Merge pull request #13 from modelcontextprotocol/ochafik/easier-notification-handlers
sdk: add notification handlers (App.ontoolinput, .ontoolresult, AppBridge.onsizechange...)
2025-11-24 15:45:29 +00:00
Jonathan Hefner
120a673904 Fix UIResource \_meta type to match actual usage pattern
The UIResource interface incorrectly specified `_meta?: UIResourceMeta`
when it should be `_meta?: { ui?: UIResourceMeta }` to match the
resources/read response format and all usage examples throughout the
document.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 09:06:02 -06:00
Olivier Chafik
ac3863092a
setup notification handlers in App & AppBridge 2025-11-24 14:59:58 +00:00
Jonathan Hefner
9aa129fe34 Fix indentation of domain and prefersBorder in UiResourceMeta example
The domain and prefersBorder properties are now properly indented to be
at the same hierarchical level as csp within the ui object.

Addresses PR comment:
https://github.com/modelcontextprotocol/ext-apps/pull/5#discussion_r2553064940

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:58:48 -06:00
Jonathan Hefner
ae9d87f530 Convert UIResource documentation to TypeDoc comments
Replace inline comments with comprehensive TypeDoc comments that explain
the purpose and usage of each property. Add examples and clarify
constraints (MUST/SHOULD) for better developer understanding.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:58:48 -06:00
Jonathan Hefner
a8107a6733 Convert UiResourceMeta documentation to TypeDoc comments
Move metadata field documentation from separate prose section into
TypeDoc comments on the UiResourceMeta interface properties. This
consolidates the documentation and eliminates duplication while making
it more maintainable and IDE-friendly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:58:45 -06:00
Jonathan Hefner
0d65458552 Improve CSP example formatting and clarity in apps specification
Change CSP code block from yaml to typescript fence, add context showing
where csp variable originates (resource.\_meta?.ui?.csp), rename
cspHeader to cspValue for accuracy, and remove Content-Security-Policy:
prefix since the variable holds just the policy value, not a complete
HTTP header.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:57:05 -06:00
Jonathan Hefner
cc08467772 Complete JSON-RPC message examples in Data Passing section
The tool input and tool result examples now show fully formed JSON-RPC
messages with all required fields (jsonrpc, id/method, result/params) to
better demonstrate the protocol format. Also fixes MDX parsing error in
Client\<>Server heading by escaping angle brackets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:57:05 -06:00
Jonathan Hefner
1eaf7377ca Fix indentation in Mermaid sequence diagrams
Corrects the indentation of nested block structures (alt, opt, par,
loop) in all four Mermaid sequence diagrams. Content inside nested
blocks is now properly indented relative to the block keywords, making
the hierarchical structure clearer and more readable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:57:01 -06:00
Jonathan Hefner
4aa2eb8dbe Remove unnecessary quotes from TypeScript property names
Unquote ui, csp, domain, and prefersBorder properties in the
resources/read response TypeScript example to follow standard TypeScript
syntax conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:53:00 -06:00
Jonathan Hefner
06c37b045b Convert notification examples from JSON to TypeScript format
Changes code blocks for notification examples to use `typescript` fence
instead of `json`. This properly represents TypeScript types (like
Record<string, unknown>, CallToolResult, Partial<HostContext>) without
quotes, matching the format used elsewhere in the specification.

Affected notifications:

- ui/notifications/tool-input
- ui/notifications/tool-input-partial
- ui/notifications/tool-result
- ui/tool-cancelled
- ui/resource-teardown
- ui/size-change
- ui/host-context-change
- ui/notifications/sandbox-ready
- ui/notifications/sandbox-resource-ready

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:53:00 -06:00
Jonathan Hefner
31dccb95f4 Fix resource list change notification name format
Corrected `resources/notifications/list_changed` to
`notifications/resources/list_changed` on line 208 to follow standard
MCP notification naming pattern (`notifications/{category}/{event}`).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:53:00 -06:00
Jonathan Hefner
86d72db632 Standardize notification naming and fix formatting in MCP Apps spec
Updates the MCP Apps specification to consistently use the
`ui/notifications/` prefix for all notification methods (e.g.,
`ui/notifications/sandbox-ready`, `ui/notifications/tool-result`). Also
removes trailing whitespace, fixes tab/space inconsistencies, improves
code formatting with proper backticks, and clarifies terminology
throughout the document.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 08:53:00 -06:00
Olivier Chafik
535dae6a73
Merge pull request #11 from gulbaki/patch-1
Fix broken link in README
2025-11-24 14:37:30 +00:00
Olivier Chafik
5804a41d5c
Merge branch 'main' into patch-1 2025-11-24 14:36:59 +00:00
Olivier Chafik
0f31e0a5db
Merge pull request #9 from modelcontextprotocol/ochafik/update-packages
update simple-examples (add "raw" no-sdk example)
2025-11-24 14:34:10 +00:00
Olivier Chafik
aa80fcffb3
Update README.md 2025-11-24 14:33:40 +00:00
baki gul
0170c89f3e
Fix broken link in README
Fix broken link in README
2025-11-23 21:57:39 +03:00
ochafik
b6da14cefd update examples 2025-11-23 03:58:51 +00:00
Olivier Chafik
3ef1d3b227
Merge pull request #3 from modelcontextprotocol/sep-hostcontext-comment-fields
Move HostContext field descriptions to JSDoc comments
2025-11-23 03:32:08 +00:00
Olivier Chafik
2605e41317
Merge pull request #8 from yannj-fr/main
fix minor typos
2025-11-23 03:28:48 +00:00
ochafik
adc73e4fa6 simplify ui build 2025-11-23 03:27:46 +00:00
ochafik
00023ba3e9 npm run prettier:fix 2025-11-23 03:15:06 +00:00