create-mcp-use-app 0.5.0 → 0.5.1-canary.0
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
|
@@ -109,55 +109,55 @@ npx create-mcp-use-app my-project
|
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
111
|
# Use a specific template
|
|
112
|
-
npx create-mcp-use-app my-project --template
|
|
112
|
+
npx create-mcp-use-app my-project --template apps-sdk
|
|
113
|
+
npx create-mcp-use-app my-project --template mcp-ui
|
|
113
114
|
|
|
114
115
|
# Use a specific package manager
|
|
115
|
-
npx create-mcp-use-app my-project --
|
|
116
|
-
npx create-mcp-use-app my-project --
|
|
117
|
-
npx create-mcp-use-app my-project --
|
|
116
|
+
npx create-mcp-use-app my-project --npm
|
|
117
|
+
npx create-mcp-use-app my-project --yarn
|
|
118
|
+
npx create-mcp-use-app my-project --pnpm
|
|
118
119
|
|
|
119
120
|
# Skip dependency installation
|
|
120
|
-
npx create-mcp-use-app my-project --
|
|
121
|
+
npx create-mcp-use-app my-project --no-install
|
|
121
122
|
```
|
|
122
123
|
|
|
123
124
|
---
|
|
124
125
|
|
|
125
126
|
## 🎨 Available Templates
|
|
126
127
|
|
|
127
|
-
###
|
|
128
|
+
### Starter Template (Default)
|
|
128
129
|
|
|
129
|
-
The
|
|
130
|
+
The starter template includes:
|
|
130
131
|
|
|
131
|
-
-
|
|
132
|
+
- Comprehensive MCP server setup with all features
|
|
132
133
|
- Example tool, resource, and prompt
|
|
133
|
-
-
|
|
134
|
-
-
|
|
134
|
+
- Both MCP-UI and OpenAI Apps SDK widget examples
|
|
135
|
+
- Full TypeScript configuration
|
|
136
|
+
- Development and production scripts
|
|
135
137
|
|
|
136
|
-
Perfect for getting started
|
|
138
|
+
Perfect for getting started with all available features or building full-featured MCP servers.
|
|
137
139
|
|
|
138
|
-
###
|
|
140
|
+
### Apps SDK Template
|
|
139
141
|
|
|
140
|
-
The
|
|
142
|
+
The apps-sdk template includes:
|
|
141
143
|
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
- Observability setup with Langfuse
|
|
147
|
-
- Docker configuration
|
|
148
|
-
- CI/CD workflows
|
|
144
|
+
- MCP server setup focused on OpenAI Apps SDK integration
|
|
145
|
+
- OpenAI Apps SDK compatible widgets
|
|
146
|
+
- Example display-weather widget
|
|
147
|
+
- Optimized for OpenAI assistant integration
|
|
149
148
|
|
|
150
|
-
Ideal for
|
|
149
|
+
Ideal for building MCP servers that integrate with OpenAI's Apps SDK.
|
|
151
150
|
|
|
152
|
-
###
|
|
151
|
+
### MCP-UI Template
|
|
153
152
|
|
|
154
|
-
The
|
|
153
|
+
The mcp-ui template includes:
|
|
155
154
|
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
155
|
+
- MCP server setup focused on MCP-UI resources
|
|
156
|
+
- Interactive UI components example
|
|
157
|
+
- Kanban board widget demonstration
|
|
158
|
+
- Clean, focused setup for UI-first applications
|
|
159
159
|
|
|
160
|
-
Best for
|
|
160
|
+
Best for building MCP servers with rich interactive UI components.
|
|
161
161
|
|
|
162
162
|
---
|
|
163
163
|
|
|
@@ -177,11 +177,11 @@ The scaffolded project includes these dependencies:
|
|
|
177
177
|
- `tsx` - TypeScript executor for development
|
|
178
178
|
- `@types/node` - Node.js type definitions
|
|
179
179
|
|
|
180
|
-
###
|
|
180
|
+
### Template-Specific Dependencies
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
182
|
+
Different templates may include additional dependencies based on their features:
|
|
183
|
+
- UI libraries (React, styling frameworks)
|
|
184
|
+
- Widget-specific utilities
|
|
185
185
|
|
|
186
186
|
---
|
|
187
187
|
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,17 @@ function getInstallCommand(packageManager) {
|
|
|
72
72
|
return "npm install";
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
function getInstallArgs(packageManager) {
|
|
76
|
+
switch (packageManager) {
|
|
77
|
+
case "yarn":
|
|
78
|
+
return ["install", "--prefer-offline", "--no-audit"];
|
|
79
|
+
case "pnpm":
|
|
80
|
+
return ["install", "--prefer-offline", "--no-audit"];
|
|
81
|
+
case "npm":
|
|
82
|
+
default:
|
|
83
|
+
return ["install", "--prefer-offline", "--no-audit", "--no-fund"];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
75
86
|
function isInGitRepository() {
|
|
76
87
|
try {
|
|
77
88
|
execSync("git rev-parse --is-inside-work-tree", { stdio: "ignore" });
|
|
@@ -308,16 +319,16 @@ program.name("create-mcp-use-app").description("Create a new MCP server project"
|
|
|
308
319
|
}
|
|
309
320
|
}
|
|
310
321
|
if (options.install) {
|
|
322
|
+
console.log("");
|
|
323
|
+
console.log(chalk.cyan("\u{1F4E6} Installing dependencies..."));
|
|
324
|
+
console.log("");
|
|
311
325
|
const showSpinner = usedPackageManager !== "yarn" && usedPackageManager !== "npm";
|
|
312
326
|
const spinner = showSpinner ? ora("Installing packages...").start() : null;
|
|
313
327
|
try {
|
|
314
328
|
if (options.yarn || options.npm || options.pnpm || detectPackageManager()) {
|
|
315
|
-
if (!showSpinner) {
|
|
316
|
-
console.log("");
|
|
317
|
-
}
|
|
318
329
|
await runPackageManager(
|
|
319
330
|
usedPackageManager,
|
|
320
|
-
|
|
331
|
+
getInstallArgs(usedPackageManager),
|
|
321
332
|
projectPath
|
|
322
333
|
);
|
|
323
334
|
if (spinner) {
|
|
@@ -326,32 +337,59 @@ program.name("create-mcp-use-app").description("Create a new MCP server project"
|
|
|
326
337
|
);
|
|
327
338
|
} else {
|
|
328
339
|
console.log("");
|
|
340
|
+
console.log(
|
|
341
|
+
chalk.green("\u2705 Dependencies installed successfully!")
|
|
342
|
+
);
|
|
343
|
+
console.log("");
|
|
329
344
|
}
|
|
330
345
|
} else {
|
|
331
346
|
if (spinner)
|
|
332
347
|
spinner.text = "Installing packages (trying yarn)...";
|
|
333
348
|
try {
|
|
334
|
-
|
|
335
|
-
|
|
349
|
+
await runPackageManager(
|
|
350
|
+
"yarn",
|
|
351
|
+
getInstallArgs("yarn"),
|
|
352
|
+
projectPath
|
|
353
|
+
);
|
|
336
354
|
usedPackageManager = "yarn";
|
|
337
355
|
if (spinner) {
|
|
338
356
|
spinner.succeed("Packages installed successfully with yarn");
|
|
339
357
|
} else {
|
|
340
358
|
console.log("");
|
|
359
|
+
console.log(
|
|
360
|
+
chalk.green(
|
|
361
|
+
"\u2705 Dependencies installed successfully with yarn!"
|
|
362
|
+
)
|
|
363
|
+
);
|
|
364
|
+
console.log("");
|
|
341
365
|
}
|
|
342
366
|
} catch {
|
|
343
367
|
if (spinner) spinner.text = "yarn not found, trying npm...";
|
|
344
368
|
try {
|
|
345
|
-
await runPackageManager(
|
|
369
|
+
await runPackageManager(
|
|
370
|
+
"npm",
|
|
371
|
+
getInstallArgs("npm"),
|
|
372
|
+
projectPath
|
|
373
|
+
);
|
|
346
374
|
usedPackageManager = "npm";
|
|
347
375
|
if (spinner) {
|
|
348
376
|
spinner.succeed("Packages installed successfully with npm");
|
|
349
377
|
} else {
|
|
350
378
|
console.log("");
|
|
379
|
+
console.log(
|
|
380
|
+
chalk.green(
|
|
381
|
+
"\u2705 Dependencies installed successfully with npm!"
|
|
382
|
+
)
|
|
383
|
+
);
|
|
384
|
+
console.log("");
|
|
351
385
|
}
|
|
352
386
|
} catch {
|
|
353
387
|
if (spinner) spinner.text = "npm not found, trying pnpm...";
|
|
354
|
-
await runPackageManager(
|
|
388
|
+
await runPackageManager(
|
|
389
|
+
"pnpm",
|
|
390
|
+
getInstallArgs("pnpm"),
|
|
391
|
+
projectPath
|
|
392
|
+
);
|
|
355
393
|
usedPackageManager = "pnpm";
|
|
356
394
|
if (spinner) {
|
|
357
395
|
spinner.succeed(
|
|
@@ -359,6 +397,12 @@ program.name("create-mcp-use-app").description("Create a new MCP server project"
|
|
|
359
397
|
);
|
|
360
398
|
} else {
|
|
361
399
|
console.log("");
|
|
400
|
+
console.log(
|
|
401
|
+
chalk.green(
|
|
402
|
+
"\u2705 Dependencies installed successfully with pnpm!"
|
|
403
|
+
)
|
|
404
|
+
);
|
|
405
|
+
console.log("");
|
|
362
406
|
}
|
|
363
407
|
}
|
|
364
408
|
}
|