Commit graph

72 commits

Author SHA1 Message Date
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
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
ochafik
ec306a8698 add a raw (no sdk) UI 2025-11-23 03:14:19 +00:00
ochafik
5aa7f93a79 reference parent package in simple server 2025-11-23 02:38:55 +00:00
ochafik
4298ea8f43 fix types order in main package.json 2025-11-23 02:38:10 +00:00
ochafik
d0a7c9b86a fix package lock of example, bump mcp sdk version 2025-11-23 02:36:24 +00:00
yannj-fr
635f3247a5 fix minor typos 2025-11-22 13:08:37 +01:00
Olivier Chafik
a728372f29
Update mcp-ui PR (#7) 2025-11-21 17:35:54 -05:00
ochafik
a564b1f4bf Update build.bun.ts 2025-11-21 22:05:34 +00:00
ochafik
c59732c4db built app-bridge w/ mcp sdk as external 2025-11-21 22:00:47 +00:00
ochafik
873075e690 ditch McpUiHostInfoSchema in favour of ImplementationSchema 2025-11-21 21:54:03 +00:00
ochafik
8189a674e2 Update app-bridge.ts 2025-11-21 21:51:00 +00:00
ochafik
0754e1671b Merge branch 'main' of https://github.com/modelcontextprotocol/ext-apps 2025-11-21 21:43:28 +00:00
ochafik
4f5cbf58e4 Create package-lock.json 2025-11-21 21:43:25 +00:00
Olivier Chafik
f53643bac7
Update README.md 2025-11-21 21:41:42 +00:00
Anton Pidkuiko
0c56400fc7
Merge pull request #6 from modelcontextprotocol/fix/mime-type-suffix-format
fix: use text/html+mcp mimeType format
2025-11-21 21:40:27 +00:00
Anton Pidkuiko MacBook
c65006acb4
fix: use text/html+mcp mimeType format
Change from text/vnd.mcp.ui+html to text/html+mcp.

Rationale:
- It's an unregistered subtype, allowed for private use
- The +suffix form indicates MCP-specific semantics (postMessage protocol)
- Content is still valid HTML and can be rendered as-such
- Following RFC 6838, +mcp could be registered as an official suffix

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 21:38:19 +00:00
Liad Yosef
f96c526e7f
docs: update UI resource format and metadata fields (#4)
* Update UI resource format and metadata fields

Create a unified object of UIResourceMetadata, as agreed in the SEP doc:
```
interface UiResourceMeta {
  csp?: {
    connectDomains?: string[],
    resourceDomains?: string[],
  },
  domain?: string,
  prefersBorder?: boolean,
}
```

* fix: json style

* fix: style
2025-11-21 23:13:40 +02:00
Jonathan Hefner
4e08951da6 Move HostContext field descriptions to JSDoc comments
Converted the HostContext interface documentation from a separate "Field
Descriptions" section to JSDoc-style comments above each field. This
improves consistency with other interfaces in the specification and
keeps documentation closer to the code.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 14:49:25 -06:00
Olivier Chafik
fd38d7962f
Update README.md 2025-11-21 20:45:18 +00:00
Olivier Chafik
78de0bfa9e
Update README.md 2025-11-21 20:40:15 +00:00
Olivier Chafik
dd3c62947c
Update README.md 2025-11-21 20:35:42 +00:00
Olivier Chafik
01e5cd8c34
Update README.md 2025-11-21 20:30:47 +00:00
Olivier Chafik
ff7c2107e2
Merge branch 'main' of https://github.com/modelcontextprotocol/ext-apps 2025-11-21 20:24:26 +00:00
Olivier Chafik
6ea36fe5f3
use remote dep from example 2025-11-21 20:24:22 +00:00
Olivier Chafik
d07e6363a0
Update README.md 2025-11-21 20:22:06 +00:00
Olivier Chafik
797c3690ce
Update README.md 2025-11-21 20:10:04 +00:00
Olivier Chafik
0351459c06
Merge pull request #2 from modelcontextprotocol/fix/mime-type-consistency
fix: use consistent text/vnd.mcp.ui+html mimeType throughout
2025-11-21 19:41:27 +00:00
Olivier Chafik
9af5a41a10
Update package.json 2025-11-21 19:35:25 +00:00
Anton Pidkuiko MacBook
bd5a34ba07
fix: use consistent text/vnd.mcp.ui+html mimeType throughout
Replace all occurrences of text/html with text/vnd.mcp.ui+html
in the specification and example code for consistency.

The spec already defined text/vnd.mcp.ui+html in the capability
negotiation section but used text/html in other places.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 19:32:46 +00:00
Olivier Chafik
7d38af9bbb
build w/ bun to avoid internal deps hell 2025-11-21 19:28:45 +00:00