fa-mcp-sdk 0.4.99 → 0.4.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli-template/.claude/skills/mcp-app-add-to-server/SKILL.md +9 -3
- package/cli-template/.claude/skills/mcp-app-create/SKILL.md +9 -3
- package/cli-template/CLAUDE.md +19 -0
- package/cli-template/FA-MCP-SDK-DOC/00-FA-MCP-SDK-index.md +1 -0
- package/cli-template/FA-MCP-SDK-DOC/01-getting-started.md +1 -1
- package/cli-template/FA-MCP-SDK-DOC/10-mcp-apps.md +885 -0
- package/cli-template/gitignore +1 -0
- package/cli-template/package.json +1 -1
- package/dist/core/_types_/types.d.ts +1 -1
- package/dist/core/_types_/types.d.ts.map +1 -1
- package/dist/core/mcp/create-mcp-server.js +1 -1
- package/dist/core/mcp/create-mcp-server.js.map +1 -1
- package/dist/core/web/server-http.js +2 -2
- package/dist/core/web/server-http.js.map +1 -1
- package/package.json +1 -1
- package/scripts/clone-mcp-ext-apps.js +327 -0
|
@@ -13,13 +13,19 @@ Existing tools get paired with HTML resources that render inline in the host's c
|
|
|
13
13
|
|
|
14
14
|
## Getting Reference Code
|
|
15
15
|
|
|
16
|
-
Clone the MCP Apps SDK repository (`@modelcontextprotocol/ext-apps`)
|
|
16
|
+
Clone or update the MCP Apps SDK repository (`@modelcontextprotocol/ext-apps`) using the bundled
|
|
17
|
+
helper. The folder `./mcp-ext-apps/` is already in `.gitignore` and is intentionally persistent —
|
|
18
|
+
it serves as the long-lived reference checkout that this skill (and the `mcp-app-create` skill)
|
|
19
|
+
read from. Do not delete it after use.
|
|
17
20
|
|
|
18
21
|
```bash
|
|
19
|
-
|
|
22
|
+
node scripts/clone-mcp-ext-apps.js --tag latest
|
|
20
23
|
```
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
The script clones into `./mcp-ext-apps/` on first run, pulls the default branch on subsequent
|
|
26
|
+
runs, and (with `--tag latest`) checks out the latest released npm tag so the cloned tree
|
|
27
|
+
matches the published `@modelcontextprotocol/ext-apps` version. Add `--json` to capture machine-
|
|
28
|
+
readable metadata (path, ref, commit) for downstream automation.
|
|
23
29
|
|
|
24
30
|
### Protocol Specification
|
|
25
31
|
|
|
@@ -42,13 +42,19 @@ Host calls tool → Host renders resource UI → Server returns result → UI re
|
|
|
42
42
|
|
|
43
43
|
## Getting Reference Code
|
|
44
44
|
|
|
45
|
-
Clone the MCP Apps SDK repository (`@modelcontextprotocol/ext-apps`)
|
|
45
|
+
Clone or update the MCP Apps SDK repository (`@modelcontextprotocol/ext-apps`) using the bundled
|
|
46
|
+
helper. The folder `./mcp-ext-apps/` is already in `.gitignore` and is intentionally persistent —
|
|
47
|
+
it serves as the long-lived reference checkout that this skill (and the `mcp-app-add-to-server`
|
|
48
|
+
skill) read from. Do not delete it after use.
|
|
46
49
|
|
|
47
50
|
```bash
|
|
48
|
-
|
|
51
|
+
node scripts/clone-mcp-ext-apps.js --tag latest
|
|
49
52
|
```
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
The script clones into `./mcp-ext-apps/` on first run, pulls the default branch on subsequent
|
|
55
|
+
runs, and (with `--tag latest`) checks out the latest released npm tag so the cloned tree
|
|
56
|
+
matches the published `@modelcontextprotocol/ext-apps` version. Add `--json` to capture machine-
|
|
57
|
+
readable metadata (path, ref, commit) for downstream automation.
|
|
52
58
|
|
|
53
59
|
### Protocol Specification
|
|
54
60
|
|
package/cli-template/CLAUDE.md
CHANGED
|
@@ -129,6 +129,8 @@ Detailed fa-mcp-sdk docs are in `FA-MCP-SDK-DOC/`:
|
|
|
129
129
|
| `06-utilities.md` | Error handling, logging, Consul |
|
|
130
130
|
| `07-testing-and-operations.md` | Test clients (STDIO, HTTP, SSE, Streamable HTTP) |
|
|
131
131
|
| `08-agent-tester-and-headless-api.md` | Agent Tester, Headless API, structured logging, automated testing |
|
|
132
|
+
| `09-database.md` | PostgreSQL sugar layer (`queryMAIN`, `execMAIN`, upserts, `mergeByBatch`), `pgvector`, secondary DBs |
|
|
133
|
+
| `10-mcp-apps.md` | Building / extending MCP Apps (UI-augmented tools) — protocol contract, SDK surface, patterns, pitfalls |
|
|
132
134
|
|
|
133
135
|
## Development and Testing Through Agent Tester
|
|
134
136
|
|
|
@@ -355,6 +357,23 @@ Any edit or new file under `.claude/**` (SKILL.md, scripts, hooks, agents, `sett
|
|
|
355
357
|
by `settings.json` — direct `Write`/`Edit` will fail. Invoke the `/edit-claude-files` skill, which
|
|
356
358
|
describes the required `scripts/fcp.js` temp-copy protocol.
|
|
357
359
|
|
|
360
|
+
## MCP Apps Reference Clone (`scripts/clone-mcp-ext-apps.js`)
|
|
361
|
+
|
|
362
|
+
Shared helper used by the `/mcp-app-create` and `/mcp-app-add-to-server` skills. Clones or refreshes
|
|
363
|
+
`https://github.com/modelcontextprotocol/ext-apps.git` into `./mcp-ext-apps/` at the project root
|
|
364
|
+
(already in `.gitignore`, intentionally persistent so the same checkout is reused across runs).
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
node scripts/clone-mcp-ext-apps.js # clone on first run, pull main otherwise
|
|
368
|
+
node scripts/clone-mcp-ext-apps.js --tag latest # also checkout the latest npm tag
|
|
369
|
+
node scripts/clone-mcp-ext-apps.js --tag v1.7.2 # checkout a specific tag
|
|
370
|
+
node scripts/clone-mcp-ext-apps.js --json # JSON output (path, ref, commit, version)
|
|
371
|
+
node scripts/clone-mcp-ext-apps.js --list-examples # include examples/* metadata in JSON
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
The script never deletes `mcp-ext-apps/`. The two skills above call it before reading sources from
|
|
375
|
+
the cloned tree, so make sure it has run successfully before troubleshooting their behavior.
|
|
376
|
+
|
|
358
377
|
|
|
359
378
|
## Formatting
|
|
360
379
|
|
|
@@ -22,6 +22,7 @@ npm install fa-mcp-sdk
|
|
|
22
22
|
| [07-testing-and-operations](07-testing-and-operations.md) | Test clients (STDIO, HTTP, SSE, Streamable HTTP) | Testing, deployment |
|
|
23
23
|
| [08-agent-tester-and-headless-api](08-agent-tester-and-headless-api.md) | Agent Tester, Headless API, structured logging, automated testing, UI `data-testid` reference | Agent-driven tool development, CLI automation, UI E2E tests |
|
|
24
24
|
| [09-database](09-database.md) | PostgreSQL sugar layer (`queryMAIN`, `execMAIN`, `getInsertSqlMAIN`, `getMergeSqlMAIN`, `mergeByBatch`), `pgvector`, secondary DBs | Database access, upserts, batching |
|
|
25
|
+
| [10-mcp-apps](10-mcp-apps.md) | Self-contained digest of the MCP Apps protocol + SDK pinned to `@modelcontextprotocol/ext-apps v1.7.2` (spec 2026-01-26): `ui://` resources, `_meta.ui`, JSON-RPC messages, `App` class, host context, patterns, pitfalls | Building / extending MCP Apps (UI-augmented tools) |
|
|
25
26
|
|
|
26
27
|
## Key Exports
|
|
27
28
|
|
|
@@ -27,7 +27,7 @@ await initMcpServer(serverData);
|
|
|
27
27
|
```typescript
|
|
28
28
|
interface McpServerData {
|
|
29
29
|
tools: Tool[] | (() => Promise<Tool[]>); // Tool definitions
|
|
30
|
-
toolHandler: <T =
|
|
30
|
+
toolHandler: <T = unknown>(params: IToolHandlerParams) => Promise<TToolHandlerResponse<T>>;
|
|
31
31
|
agentBrief: string; // Brief description
|
|
32
32
|
agentPrompt: string; // System prompt
|
|
33
33
|
customPrompts?: IPromptData[]; // Additional prompts
|