create-mcp-use-app 2.0.0-beta.7 → 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 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 # Generated view typing bridge
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<{ period: string }, Analytics>(
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
@@ -1535,16 +1535,12 @@ var packageJson = JSON.parse(
1535
1535
  function getCurrentPackageVersions(isDevelopment = false, sdkVersion) {
1536
1536
  if (isDevelopment) {
1537
1537
  return {
1538
- "mcp-use": "workspace:*",
1539
- "@mcp-use/inspector": "workspace:*"
1538
+ "mcp-use": "workspace:*"
1540
1539
  };
1541
1540
  }
1542
1541
  const requestedSdk = sdkVersion ?? "latest";
1543
- const requestedStableSdk = requestedSdk === "latest" || /^\d+\.\d+\.\d+$/.test(requestedSdk);
1544
- const inspectorChannel = !requestedStableSdk || packageJson.version.includes("-") ? "beta" : "latest";
1545
1542
  return {
1546
- "mcp-use": requestedSdk,
1547
- "@mcp-use/inspector": inspectorChannel
1543
+ "mcp-use": requestedSdk
1548
1544
  };
1549
1545
  }
1550
1546
  function processTemplateFile(filePath, versions, isDevelopment = false) {
@@ -1573,11 +1569,6 @@ function processTemplateFile(filePath, versions, isDevelopment = false) {
1573
1569
  `"mcp-use": "${mcpUseVersion}"`
1574
1570
  );
1575
1571
  }
1576
- const inspectorVersion = versions["@mcp-use/inspector"] ?? (isDevelopment ? "workspace:*" : "beta");
1577
- processedContent = processedContent.replace(
1578
- /"@mcp-use\/inspector": "workspace:\*"/,
1579
- `"@mcp-use/inspector": "${inspectorVersion}"`
1580
- );
1581
1572
  return processedContent;
1582
1573
  }
1583
1574
  function getAvailableTemplates() {
@@ -2155,6 +2146,7 @@ async function main() {
2155
2146
  }
2156
2147
  if (validatedTemplate === "blank") {
2157
2148
  console.log(" \u251C\u2500\u2500 public/");
2149
+ console.log(" \u251C\u2500\u2500 mcp-env.d.ts");
2158
2150
  console.log(" \u251C\u2500\u2500 index.ts (server entry point)");
2159
2151
  console.log(" \u251C\u2500\u2500 package.json");
2160
2152
  console.log(" \u251C\u2500\u2500 tsconfig.json");
@@ -2176,6 +2168,7 @@ async function main() {
2176
2168
  console.log(" \u251C\u2500\u2500 tsconfig.json");
2177
2169
  console.log(" \u2514\u2500\u2500 README.md");
2178
2170
  } else if (validatedTemplate === "mcp-server") {
2171
+ console.log(" \u251C\u2500\u2500 mcp-env.d.ts");
2179
2172
  console.log(" \u251C\u2500\u2500 index.ts (server entry point)");
2180
2173
  console.log(" \u251C\u2500\u2500 package.json");
2181
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:
@@ -0,0 +1,10 @@
1
+ // Generated by mcp-use. Do not edit.
2
+ declare module "*.css";
3
+
4
+ declare module "mcp-use/react" {
5
+ interface Register {
6
+ tools: typeof import("./index.js");
7
+ }
8
+ }
9
+
10
+ export {};
@@ -24,13 +24,12 @@
24
24
  "dev": "mcp-use dev",
25
25
  "start": "mcp-use start",
26
26
  "deploy": "mcp-use deploy",
27
- "typecheck": "tsc --noEmit"
27
+ "typecheck": "mcp-use typecheck"
28
28
  },
29
29
  "dependencies": {
30
30
  "mcp-use": "workspace:*"
31
31
  },
32
32
  "devDependencies": {
33
- "@mcp-use/inspector": "workspace:*",
34
33
  "@types/node": "^22.20.0",
35
34
  "typescript": "^7.0.2"
36
35
  }
@@ -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:
@@ -1,4 +1,4 @@
1
- // mcp-use auto-generated typing
1
+ // Generated by mcp-use. Do not edit.
2
2
  declare module "*.css";
3
3
 
4
4
  declare module "mcp-use/react" {
@@ -24,7 +24,7 @@
24
24
  "dev": "mcp-use dev",
25
25
  "start": "mcp-use start",
26
26
  "deploy": "mcp-use deploy",
27
- "typecheck": "tsc --noEmit"
27
+ "typecheck": "mcp-use typecheck"
28
28
  },
29
29
  "dependencies": {
30
30
  "mcp-use": "workspace:*",
@@ -33,7 +33,6 @@
33
33
  "zod": "^4.4.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@mcp-use/inspector": "workspace:*",
37
36
  "@types/node": "^22.20.0",
38
37
  "@types/react": "^19.2.17",
39
38
  "@types/react-dom": "^19.2.3",
@@ -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:
@@ -8,7 +8,7 @@ const server = new MCPServer({
8
8
  description: "An MCP server built with mcp-use",
9
9
  });
10
10
 
11
- server.tool(
11
+ export const fetchWeather = server.tool(
12
12
  {
13
13
  name: "fetch-weather",
14
14
  description: "Return demo weather for a city",
@@ -0,0 +1,10 @@
1
+ // Generated by mcp-use. Do not edit.
2
+ declare module "*.css";
3
+
4
+ declare module "mcp-use/react" {
5
+ interface Register {
6
+ tools: typeof import("./index.js");
7
+ }
8
+ }
9
+
10
+ export {};
@@ -24,14 +24,13 @@
24
24
  "dev": "mcp-use dev",
25
25
  "start": "mcp-use start",
26
26
  "deploy": "mcp-use deploy",
27
- "typecheck": "tsc --noEmit"
27
+ "typecheck": "mcp-use typecheck"
28
28
  },
29
29
  "dependencies": {
30
30
  "mcp-use": "workspace:*",
31
31
  "zod": "^4.4.3"
32
32
  },
33
33
  "devDependencies": {
34
- "@mcp-use/inspector": "workspace:*",
35
34
  "@types/node": "^22.20.0",
36
35
  "typescript": "^7.0.2"
37
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mcp-use-app",
3
- "version": "2.0.0-beta.7",
3
+ "version": "2.0.0-beta.9",
4
4
  "type": "module",
5
5
  "description": "Create MCP-Use apps with one command",
6
6
  "author": "mcp-use, Inc.",