create-mcp-use-app 2.0.0-beta.5 → 2.0.0-beta.7
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
|
@@ -118,8 +118,8 @@ npx create-mcp-use-app my-project --template owner/repo#branch-name
|
|
|
118
118
|
|
|
119
119
|
# Use a specific package manager
|
|
120
120
|
npx create-mcp-use-app my-project --npm
|
|
121
|
-
npx create-mcp-use-app my-project --yarn
|
|
122
121
|
npx create-mcp-use-app my-project --pnpm
|
|
122
|
+
npx create-mcp-use-app my-project --bun
|
|
123
123
|
|
|
124
124
|
# Install deps automatically (or --no-install to skip and skip prompt)
|
|
125
125
|
npx create-mcp-use-app my-project --install
|
|
@@ -230,9 +230,9 @@ Once your project is created, you can:
|
|
|
230
230
|
```bash
|
|
231
231
|
npm run dev
|
|
232
232
|
# or
|
|
233
|
-
yarn dev
|
|
234
|
-
# or
|
|
235
233
|
pnpm dev
|
|
234
|
+
# or
|
|
235
|
+
bun run dev
|
|
236
236
|
```
|
|
237
237
|
|
|
238
238
|
This will:
|
|
@@ -273,7 +273,7 @@ Open `index.ts` to see how to:
|
|
|
273
273
|
|
|
274
274
|
### 2. Try the Inspector
|
|
275
275
|
|
|
276
|
-
The inspector automatically opens at `http://localhost:3000/inspector` where you can:
|
|
276
|
+
The inspector automatically opens at `http://localhost:3000/mcp/inspector` where you can:
|
|
277
277
|
|
|
278
278
|
- Test your tools interactively
|
|
279
279
|
- View available resources
|
package/dist/index.js
CHANGED
|
@@ -1347,9 +1347,9 @@ function parseCli(argv) {
|
|
|
1347
1347
|
skills: { type: "boolean" },
|
|
1348
1348
|
dev: { type: "boolean" },
|
|
1349
1349
|
"sdk-version": { type: "string" },
|
|
1350
|
-
yarn: { type: "boolean" },
|
|
1351
1350
|
npm: { type: "boolean" },
|
|
1352
1351
|
pnpm: { type: "boolean" },
|
|
1352
|
+
bun: { type: "boolean" },
|
|
1353
1353
|
help: { type: "boolean", short: "h" },
|
|
1354
1354
|
version: { type: "boolean", short: "V" }
|
|
1355
1355
|
},
|
|
@@ -1367,9 +1367,9 @@ function parseCli(argv) {
|
|
|
1367
1367
|
skills,
|
|
1368
1368
|
dev: values.dev,
|
|
1369
1369
|
sdkVersion: values["sdk-version"],
|
|
1370
|
-
yarn: values.yarn,
|
|
1371
1370
|
npm: values.npm,
|
|
1372
|
-
pnpm: values.pnpm
|
|
1371
|
+
pnpm: values.pnpm,
|
|
1372
|
+
bun: values.bun
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
1375
|
}
|
|
@@ -1399,8 +1399,8 @@ ${stderr}`));
|
|
|
1399
1399
|
}
|
|
1400
1400
|
function detectPackageManager() {
|
|
1401
1401
|
const userAgent = process.env.npm_config_user_agent || "";
|
|
1402
|
-
if (userAgent.includes("
|
|
1403
|
-
return "
|
|
1402
|
+
if (userAgent.includes("bun")) {
|
|
1403
|
+
return "bun";
|
|
1404
1404
|
}
|
|
1405
1405
|
if (userAgent.includes("pnpm")) {
|
|
1406
1406
|
return "pnpm";
|
|
@@ -1412,33 +1412,26 @@ function detectPackageManager() {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
function getDevCommand(packageManager) {
|
|
1414
1414
|
switch (packageManager) {
|
|
1415
|
-
case "yarn":
|
|
1416
|
-
return "yarn dev";
|
|
1417
1415
|
case "pnpm":
|
|
1418
1416
|
return "pnpm dev";
|
|
1417
|
+
case "bun":
|
|
1418
|
+
return "bun run dev";
|
|
1419
1419
|
default:
|
|
1420
1420
|
return "npm run dev";
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
1423
|
function getInstallCommand(packageManager) {
|
|
1424
1424
|
switch (packageManager) {
|
|
1425
|
-
case "yarn":
|
|
1426
|
-
return "yarn";
|
|
1427
1425
|
case "pnpm":
|
|
1428
1426
|
return "pnpm install";
|
|
1427
|
+
case "bun":
|
|
1428
|
+
return "bun install";
|
|
1429
1429
|
default:
|
|
1430
1430
|
return "npm install";
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
1433
1433
|
function getInstallArgs(packageManager) {
|
|
1434
|
-
|
|
1435
|
-
case "yarn":
|
|
1436
|
-
return ["install"];
|
|
1437
|
-
case "pnpm":
|
|
1438
|
-
return ["install"];
|
|
1439
|
-
default:
|
|
1440
|
-
return ["install"];
|
|
1441
|
-
}
|
|
1434
|
+
return ["install"];
|
|
1442
1435
|
}
|
|
1443
1436
|
function sendInstallTelemetryEvent(agents, skills) {
|
|
1444
1437
|
const TELEMETRY_URL = "https://add-skill.vercel.sh/t";
|
|
@@ -1541,9 +1534,18 @@ var packageJson = JSON.parse(
|
|
|
1541
1534
|
);
|
|
1542
1535
|
function getCurrentPackageVersions(isDevelopment = false, sdkVersion) {
|
|
1543
1536
|
if (isDevelopment) {
|
|
1544
|
-
return {
|
|
1537
|
+
return {
|
|
1538
|
+
"mcp-use": "workspace:*",
|
|
1539
|
+
"@mcp-use/inspector": "workspace:*"
|
|
1540
|
+
};
|
|
1545
1541
|
}
|
|
1546
|
-
|
|
1542
|
+
const requestedSdk = sdkVersion ?? "latest";
|
|
1543
|
+
const requestedStableSdk = requestedSdk === "latest" || /^\d+\.\d+\.\d+$/.test(requestedSdk);
|
|
1544
|
+
const inspectorChannel = !requestedStableSdk || packageJson.version.includes("-") ? "beta" : "latest";
|
|
1545
|
+
return {
|
|
1546
|
+
"mcp-use": requestedSdk,
|
|
1547
|
+
"@mcp-use/inspector": inspectorChannel
|
|
1548
|
+
};
|
|
1547
1549
|
}
|
|
1548
1550
|
function processTemplateFile(filePath, versions, isDevelopment = false) {
|
|
1549
1551
|
const content = readFileSync2(filePath, "utf-8");
|
|
@@ -1571,6 +1573,11 @@ function processTemplateFile(filePath, versions, isDevelopment = false) {
|
|
|
1571
1573
|
`"mcp-use": "${mcpUseVersion}"`
|
|
1572
1574
|
);
|
|
1573
1575
|
}
|
|
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
|
+
);
|
|
1574
1581
|
return processedContent;
|
|
1575
1582
|
}
|
|
1576
1583
|
function getAvailableTemplates() {
|
|
@@ -1916,9 +1923,9 @@ Options:
|
|
|
1916
1923
|
--no-git Skip initializing a git repository
|
|
1917
1924
|
--dev Use workspace dependencies for development
|
|
1918
1925
|
--sdk-version <version> Pin mcp-use to an npm version or dist-tag (e.g. canary, 1.34.0)
|
|
1919
|
-
--yarn Use yarn as package manager
|
|
1920
1926
|
--npm Use npm as package manager
|
|
1921
1927
|
--pnpm Use pnpm as package manager
|
|
1928
|
+
--bun Use Bun as package manager
|
|
1922
1929
|
-h, --help Display help
|
|
1923
1930
|
-V, --version Display version`);
|
|
1924
1931
|
}
|
|
@@ -2078,12 +2085,12 @@ async function main() {
|
|
|
2078
2085
|
}
|
|
2079
2086
|
}
|
|
2080
2087
|
let usedPackageManager = "npm";
|
|
2081
|
-
if (options.
|
|
2082
|
-
usedPackageManager = "yarn";
|
|
2083
|
-
} else if (options.npm) {
|
|
2088
|
+
if (options.npm) {
|
|
2084
2089
|
usedPackageManager = "npm";
|
|
2085
2090
|
} else if (options.pnpm) {
|
|
2086
2091
|
usedPackageManager = "pnpm";
|
|
2092
|
+
} else if (options.bun) {
|
|
2093
|
+
usedPackageManager = "bun";
|
|
2087
2094
|
} else {
|
|
2088
2095
|
const detected = detectPackageManager();
|
|
2089
2096
|
if (detected) {
|
|
@@ -2099,8 +2106,8 @@ async function main() {
|
|
|
2099
2106
|
console.log("");
|
|
2100
2107
|
console.log(cyan("\u{1F4E6} Installing dependencies..."));
|
|
2101
2108
|
console.log("");
|
|
2102
|
-
const isKnownManager = options.
|
|
2103
|
-
const managersToTry = isKnownManager ? [usedPackageManager] : ["npm", "pnpm", "
|
|
2109
|
+
const isKnownManager = options.npm || options.pnpm || options.bun || detectPackageManager();
|
|
2110
|
+
const managersToTry = isKnownManager ? [usedPackageManager] : ["npm", "pnpm", "bun"];
|
|
2104
2111
|
let installed = false;
|
|
2105
2112
|
for (const pm of managersToTry) {
|
|
2106
2113
|
const s = spinner2();
|
|
@@ -2125,7 +2132,7 @@ async function main() {
|
|
|
2125
2132
|
}
|
|
2126
2133
|
if (!installed) {
|
|
2127
2134
|
console.log(
|
|
2128
|
-
'\u26A0\uFE0F Please run "npm install", "
|
|
2135
|
+
'\u26A0\uFE0F Please run "npm install", "pnpm install", or "bun install" manually'
|
|
2129
2136
|
);
|
|
2130
2137
|
}
|
|
2131
2138
|
}
|
|
@@ -2192,7 +2199,7 @@ async function main() {
|
|
|
2192
2199
|
console.log(bold("\u{1F4E4} To deploy:"));
|
|
2193
2200
|
console.log(
|
|
2194
2201
|
cyan(
|
|
2195
|
-
` ${usedPackageManager === "
|
|
2202
|
+
` ${usedPackageManager === "pnpm" ? "pnpm" : usedPackageManager === "bun" ? "bun run" : "npm run"} deploy`
|
|
2196
2203
|
)
|
|
2197
2204
|
);
|
|
2198
2205
|
console.log("");
|