Skip to content

Commit d5ff0f7

Browse files
committed
Clearly separate sunpeak and MCP App API documentation
1 parent dc05e08 commit d5ff0f7

29 files changed

Lines changed: 256 additions & 139 deletions

CLAUDE.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,16 @@ Docs are built with [Mintlify](https://mintlify.com). Structure:
154154
- **`docs/mcp-apps/`** — MCP Apps SDK documentation (protocol-level, not sunpeak-specific). Badge: `<Badge color="green">MCP Apps SDK</Badge>`.
155155
- **`docs/mcp-apps/types/protocol-reference.mdx`** — Complete protocol type/schema reference.
156156

157-
When adding new hooks or features, you must: create the hook doc page, add it to `docs.json` navigation (alphabetical within its group), and update cross-references (e.g., the `<Note>` in `mcp-apps/app/requests.mdx` that lists convenience hooks).
157+
When adding new hooks or features, you must: create the hook doc page, add it to `docs.json` navigation (alphabetical within its group), and update cross-references (e.g., the `<Tip>` in `mcp-apps/app/requests.mdx` that lists convenience hooks).
158+
159+
### Places to Update When User-Facing Functionality Changes
160+
161+
When sunpeak package APIs change (new hooks, new features, deprecations, etc.), these locations may need updating:
162+
163+
1. **`docs/`** — Mintlify docs pages (hook docs, MCP Apps SDK docs, cross-references)
164+
2. **READMEs**`README.md` files throughout the monorepo (`packages/sunpeak/README.md`, root `README.md`, template `README.md`)
165+
3. **`skills/create-sunpeak-app/SKILL.md`** — Agent skill reference with hook tables, code examples, and usage patterns
166+
4. **Marketing website** — Separate repository (`../sunpeak-website/` or similar) with feature descriptions and code samples
158167

159168
## Upgrading Dependencies
160169

docs/api-reference/hooks/use-app.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,5 @@ import { AppProvider } from 'sunpeak';
7575
<ResponseField name="onAppCreated" type="(app: App) => void">
7676
Callback invoked when a new App instance is created. Optional.
7777
</ResponseField>
78+
79+
See the [`App` class documentation](/mcp-apps/app/app-class) for the full API available on the `App` instance.

docs/api-reference/hooks/use-host-info.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,5 @@ function MyResource() {
8383
);
8484
}
8585
```
86+
87+
See [`McpUiHostCapabilities`](/mcp-apps/types/core-types#mcpuihostcapabilities) for the full protocol-level capabilities type.

docs/api-reference/hooks/use-locale.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ function MyResource() {
4040
return <p>{formatted}</p>;
4141
}
4242
```
43+
44+
The locale value comes from [`McpUiHostContext.locale`](/mcp-apps/types/core-types#mcpuihostcontext).

docs/api-reference/hooks/use-open-link.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ function MyResource() {
4949
);
5050
}
5151
```
52+
53+
Wraps the SDK's [`openLink()`](/mcp-apps/app/requests#openlink) method.

docs/api-reference/hooks/use-safe-area.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ function MyResource() {
5454
);
5555
}
5656
```
57+
58+
Safe area insets come from [`McpUiHostContext.safeAreaInsets`](/mcp-apps/types/core-types#mcpuihostcontext).

docs/api-reference/hooks/use-send-log.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ function MyResource() {
5757
return <button onClick={handleAction}>Click Me</button>;
5858
}
5959
```
60+
61+
Wraps the SDK's [`sendLog()`](/mcp-apps/app/requests#sendlog) method.

docs/api-reference/hooks/use-viewport.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ function MyResource() {
5555
);
5656
}
5757
```
58+
59+
Container dimensions come from [`McpUiHostContext.containerDimensions`](/mcp-apps/types/core-types#mcpuihostcontext).

docs/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@
154154
"group": "Server API",
155155
"pages": [
156156
"mcp-apps/server/register-app-tool",
157-
"mcp-apps/server/tool-meta",
158157
"mcp-apps/server/register-app-resource",
158+
"mcp-apps/server/tool-meta",
159159
"mcp-apps/server/resource-meta",
160160
"mcp-apps/server/capability-detection"
161161
]

docs/mcp-apps/app/app-class.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ keywords: ["MCP Apps", "ChatGPT Apps", "App class", "PostMessageTransport", "hos
88
<Badge color="green">MCP Apps SDK</Badge>
99

1010
```ts
11-
import { App, PostMessageTransport } from "sunpeak";
11+
import { App, PostMessageTransport } from "@modelcontextprotocol/ext-apps";
1212
```
1313

14-
<Note>
15-
In sunpeak, the [`useApp`](/mcp-apps/react/use-app) hook handles `App` creation and connection automatically. The details below are useful for understanding the underlying API or for non-React usage.
16-
</Note>
17-
1814
## Overview
1915

2016
The `App` class provides a framework-agnostic way to build interactive MCP Apps that run inside host applications. It extends the MCP SDK's `Protocol` class and handles the connection lifecycle, [initialization handshake](/mcp-apps/lifecycle#2-initialization), and bidirectional communication with the host.
@@ -114,7 +110,7 @@ if (ctx?.theme === "dark") {
114110
The transport layer for iframe-to-parent communication using `window.postMessage`. In most cases you never need to use this directly — `App.connect()` creates one automatically when no transport is provided.
115111
116112
```ts
117-
import { PostMessageTransport } from "sunpeak";
113+
import { PostMessageTransport } from "@modelcontextprotocol/ext-apps";
118114

119115
new PostMessageTransport(eventTarget?, eventSource)
120116
```
@@ -149,3 +145,7 @@ Manually notify the host of a size change:
149145
```ts
150146
app.sendSizeChanged({ width: 400, height: 600 });
151147
```
148+
149+
<Tip>
150+
In React, the SDK's [`useApp`](/mcp-apps/react/use-app) hook handles App creation and connection automatically. The [sunpeak framework](/quickstart) provides additional convenience hooks like [`useApp`](/api-reference/hooks/use-app).
151+
</Tip>

0 commit comments

Comments
 (0)