create-mcp-use-app 2.0.0-beta.8 → 2.0.0-beta.9
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/README.md +4 -5
- package/dist/index.js +2 -0
- package/dist/templates/blank/README.md +2 -0
- package/dist/templates/blank/mcp-env.d.ts +10 -0
- package/dist/templates/blank/package.json +1 -1
- package/dist/templates/mcp-apps/README.md +2 -0
- package/dist/templates/mcp-apps/mcp-env.d.ts +1 -1
- package/dist/templates/mcp-apps/package.json +1 -1
- package/dist/templates/mcp-server/README.md +2 -0
- package/dist/templates/mcp-server/index.ts +1 -1
- package/dist/templates/mcp-server/mcp-env.d.ts +10 -0
- package/dist/templates/mcp-server/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ my-mcp-server/
|
|
|
57
57
|
├── index.ts # MCP server entry point
|
|
58
58
|
├── package.json # Scripts and dependencies
|
|
59
59
|
├── tsconfig.json # TypeScript configuration
|
|
60
|
-
├── mcp-env.d.ts #
|
|
60
|
+
├── mcp-env.d.ts # Managed view typing bridge
|
|
61
61
|
├── public/ # Static assets
|
|
62
62
|
└── views/ # Included by the mcp-apps template
|
|
63
63
|
└── product-search-result/
|
|
@@ -74,6 +74,7 @@ my-mcp-server/
|
|
|
74
74
|
| **🎨 MCP Apps Views** | React views discovered and bundled by the CLI |
|
|
75
75
|
| **🛠️ Example Tools** | Sample MCP tools, resources, and prompts |
|
|
76
76
|
| **📦 Build Scripts** | Ready-to-use development and production scripts |
|
|
77
|
+
| **✅ Type Checking** | Refreshes MCP view types, then runs local TypeScript |
|
|
77
78
|
| **🚀 Production Ready** | Optimized build configuration |
|
|
78
79
|
|
|
79
80
|
---
|
|
@@ -285,7 +286,7 @@ The inspector automatically opens at `http://localhost:3000/mcp/inspector` where
|
|
|
285
286
|
Bind a tool to a view with the tool definition's `view` field:
|
|
286
287
|
|
|
287
288
|
```typescript
|
|
288
|
-
server.tool(
|
|
289
|
+
export const showAnalytics = server.tool(
|
|
289
290
|
{
|
|
290
291
|
name: "show-analytics",
|
|
291
292
|
description: "Show analytics for a reporting period",
|
|
@@ -316,9 +317,7 @@ interface Analytics {
|
|
|
316
317
|
|
|
317
318
|
export default function AnalyticsDashboard() {
|
|
318
319
|
const view = useToolContext();
|
|
319
|
-
const refresh = useCallTool
|
|
320
|
-
"show-analytics"
|
|
321
|
-
);
|
|
320
|
+
const refresh = useCallTool("show-analytics");
|
|
322
321
|
|
|
323
322
|
if (view.status === "pending") return <p>Loading analytics…</p>;
|
|
324
323
|
if (view.status === "error") return <p>{view.error.message}</p>;
|
package/dist/index.js
CHANGED
|
@@ -2146,6 +2146,7 @@ async function main() {
|
|
|
2146
2146
|
}
|
|
2147
2147
|
if (validatedTemplate === "blank") {
|
|
2148
2148
|
console.log(" \u251C\u2500\u2500 public/");
|
|
2149
|
+
console.log(" \u251C\u2500\u2500 mcp-env.d.ts");
|
|
2149
2150
|
console.log(" \u251C\u2500\u2500 index.ts (server entry point)");
|
|
2150
2151
|
console.log(" \u251C\u2500\u2500 package.json");
|
|
2151
2152
|
console.log(" \u251C\u2500\u2500 tsconfig.json");
|
|
@@ -2167,6 +2168,7 @@ async function main() {
|
|
|
2167
2168
|
console.log(" \u251C\u2500\u2500 tsconfig.json");
|
|
2168
2169
|
console.log(" \u2514\u2500\u2500 README.md");
|
|
2169
2170
|
} else if (validatedTemplate === "mcp-server") {
|
|
2171
|
+
console.log(" \u251C\u2500\u2500 mcp-env.d.ts");
|
|
2170
2172
|
console.log(" \u251C\u2500\u2500 index.ts (server entry point)");
|
|
2171
2173
|
console.log(" \u251C\u2500\u2500 package.json");
|
|
2172
2174
|
console.log(" \u251C\u2500\u2500 tsconfig.json");
|
|
@@ -15,6 +15,8 @@ Open [http://localhost:3000/mcp/inspector](http://localhost:3000/mcp/inspector)
|
|
|
15
15
|
|
|
16
16
|
You can start building by editing the entry file. Add tools, resources, and prompts — the server auto-reloads as you edit.
|
|
17
17
|
|
|
18
|
+
Run `npm run typecheck` to refresh MCP view types and check the project with its local TypeScript compiler.
|
|
19
|
+
|
|
18
20
|
## Learn More
|
|
19
21
|
|
|
20
22
|
To learn more about mcp-use and MCP:
|
|
@@ -15,6 +15,8 @@ Open [http://localhost:3000/mcp/inspector](http://localhost:3000/mcp/inspector)
|
|
|
15
15
|
|
|
16
16
|
You can start building by editing the entry file. Add tools, resources, and prompts — the server auto-reloads as you edit.
|
|
17
17
|
|
|
18
|
+
Run `npm run typecheck` to refresh MCP view types and check the project with its local TypeScript compiler. Statically declared tools used by views must be assigned to exported constants.
|
|
19
|
+
|
|
18
20
|
## Learn More
|
|
19
21
|
|
|
20
22
|
To learn more about mcp-use and MCP:
|
|
@@ -15,6 +15,8 @@ Open [http://localhost:3000/mcp/inspector](http://localhost:3000/mcp/inspector)
|
|
|
15
15
|
|
|
16
16
|
You can start building by editing the entry file. Add tools and prompts — the server auto-reloads as you edit.
|
|
17
17
|
|
|
18
|
+
Run `npm run typecheck` to refresh MCP view types and check the project with its local TypeScript compiler.
|
|
19
|
+
|
|
18
20
|
## Learn More
|
|
19
21
|
|
|
20
22
|
To learn more about mcp-use and MCP:
|