create-mcp-use-app 2.0.0-beta.13 → 2.0.0-beta.15
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 +12 -13
- package/dist/index.js +52 -33
- package/dist/skills-config.d.ts +7 -0
- package/dist/skills-config.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
| Package | Description | Version |
|
|
29
29
|
| ---------------------------------------------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
30
|
-
| [mcp-use](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/
|
|
31
|
-
| [@mcp-use/cli](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/cli) | Build tool for MCP apps | [](https://www.npmjs.com/package/@mcp-use/cli) |
|
|
30
|
+
| [mcp-use](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/server) | MCP framework and CLI | [](https://www.npmjs.com/package/mcp-use) |
|
|
32
31
|
| [@mcp-use/inspector](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/inspector) | Web-based MCP inspector | [](https://www.npmjs.com/package/@mcp-use/inspector) |
|
|
33
32
|
|
|
34
33
|
---
|
|
@@ -66,16 +65,16 @@ my-mcp-server/
|
|
|
66
65
|
|
|
67
66
|
### Pre-configured Features
|
|
68
67
|
|
|
69
|
-
| Feature | Description
|
|
70
|
-
| ----------------------- |
|
|
71
|
-
| **📝 TypeScript** | Full TypeScript setup with proper types
|
|
72
|
-
| **🔥 Hot Reload** | Auto-restart on code changes during development
|
|
73
|
-
| **🔍 Auto Inspector** | Inspector UI opens automatically in dev mode
|
|
74
|
-
| **🎨 MCP Apps Views** | React views discovered and bundled by the CLI
|
|
75
|
-
| **🛠️ Example Tools** | Sample MCP tools, resources, and prompts
|
|
76
|
-
| **📦 Build Scripts** | Ready-to-use development and production scripts
|
|
68
|
+
| Feature | Description |
|
|
69
|
+
| ----------------------- | ---------------------------------------------------- |
|
|
70
|
+
| **📝 TypeScript** | Full TypeScript setup with proper types |
|
|
71
|
+
| **🔥 Hot Reload** | Auto-restart on code changes during development |
|
|
72
|
+
| **🔍 Auto Inspector** | Inspector UI opens automatically in dev mode |
|
|
73
|
+
| **🎨 MCP Apps Views** | React views discovered and bundled by the CLI |
|
|
74
|
+
| **🛠️ Example Tools** | Sample MCP tools, resources, and prompts |
|
|
75
|
+
| **📦 Build Scripts** | Ready-to-use development and production scripts |
|
|
77
76
|
| **✅ Type Checking** | Refreshes MCP view types, then runs local TypeScript |
|
|
78
|
-
| **🚀 Production Ready** | Optimized build configuration
|
|
77
|
+
| **🚀 Production Ready** | Optimized build configuration |
|
|
79
78
|
|
|
80
79
|
---
|
|
81
80
|
|
|
@@ -507,8 +506,8 @@ See our [contributing guide](https://github.com/mcp-use/mcp-use/blob/main/CONTRI
|
|
|
507
506
|
|
|
508
507
|
- [mcp-use Documentation](https://github.com/mcp-use/mcp-use)
|
|
509
508
|
- [Model Context Protocol Spec](https://modelcontextprotocol.io)
|
|
510
|
-
- [Creating MCP Tools](https://
|
|
511
|
-
- [Building
|
|
509
|
+
- [Creating MCP Tools](https://mcp-use.com/docs/typescript/server/tools)
|
|
510
|
+
- [Building MCP App Views](https://mcp-use.com/docs/typescript/mcp-apps)
|
|
512
511
|
- [Using the Inspector](https://github.com/mcp-use/mcp-use/tree/main/libraries/typescript/packages/inspector)
|
|
513
512
|
- [Supabase Edge Functions](https://supabase.com/docs/guides/functions)
|
|
514
513
|
|
package/dist/index.js
CHANGED
|
@@ -1334,6 +1334,27 @@ function updateIndexTs(projectPath, projectName) {
|
|
|
1334
1334
|
writeFileSync(indexPath, content);
|
|
1335
1335
|
}
|
|
1336
1336
|
|
|
1337
|
+
// src/skills-config.ts
|
|
1338
|
+
var SKILLS_REPO = "https://github.com/mcp-use/mcp-use.git";
|
|
1339
|
+
var SKILLS_BRANCH = "beta";
|
|
1340
|
+
var SKILLS_SPARSE_PATH = "skills/mcp-apps-builder";
|
|
1341
|
+
var SKILLS_AGENT_DIRS = [".cursor", ".claude", ".agents"];
|
|
1342
|
+
var SKILLS_MANUAL_INSTALL_CMD = "npx --yes skills add mcp-use/mcp-use#beta --yes --skill mcp-apps-builder -a cursor -a claude-code -a codex";
|
|
1343
|
+
function getSkillsCloneArgs(repoDir) {
|
|
1344
|
+
return [
|
|
1345
|
+
"clone",
|
|
1346
|
+
"--depth",
|
|
1347
|
+
"1",
|
|
1348
|
+
"--filter=blob:none",
|
|
1349
|
+
"--sparse",
|
|
1350
|
+
"--single-branch",
|
|
1351
|
+
"--branch",
|
|
1352
|
+
SKILLS_BRANCH,
|
|
1353
|
+
SKILLS_REPO,
|
|
1354
|
+
repoDir
|
|
1355
|
+
];
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1337
1358
|
// src/index.ts
|
|
1338
1359
|
var __filename = fileURLToPath(import.meta.url);
|
|
1339
1360
|
var __dirname = dirname2(__filename);
|
|
@@ -1455,10 +1476,6 @@ function sendInstallTelemetryEvent(agents, skills) {
|
|
|
1455
1476
|
} catch {
|
|
1456
1477
|
}
|
|
1457
1478
|
}
|
|
1458
|
-
var SKILLS_REPO = "https://github.com/mcp-use/mcp-use.git";
|
|
1459
|
-
var SKILLS_SPARSE_PATH = "skills/mcp-apps-builder";
|
|
1460
|
-
var SKILLS_AGENT_DIRS = [".cursor", ".claude", ".agent"];
|
|
1461
|
-
var SKILLS_MANUAL_INSTALL_CMD = "npx --yes skills add mcp-use/mcp-use --yes --skill mcp-apps-builder -a cursor -a claude-code -a codex";
|
|
1462
1479
|
function isGitAvailable() {
|
|
1463
1480
|
const result = spawnSync("git", ["--version"], {
|
|
1464
1481
|
stdio: "ignore",
|
|
@@ -1475,20 +1492,10 @@ async function installSkills(projectPath) {
|
|
|
1475
1492
|
const tempDir = mkdtempSync(join3(tmpdir(), "mcp-use-skills-"));
|
|
1476
1493
|
const repoDir = join3(tempDir, "repo");
|
|
1477
1494
|
try {
|
|
1478
|
-
const clone = spawnSync(
|
|
1479
|
-
"
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
"--depth",
|
|
1483
|
-
"1",
|
|
1484
|
-
"--filter=blob:none",
|
|
1485
|
-
"--sparse",
|
|
1486
|
-
"--single-branch",
|
|
1487
|
-
SKILLS_REPO,
|
|
1488
|
-
repoDir
|
|
1489
|
-
],
|
|
1490
|
-
{ stdio: "ignore", shell: false }
|
|
1491
|
-
);
|
|
1495
|
+
const clone = spawnSync("git", getSkillsCloneArgs(repoDir), {
|
|
1496
|
+
stdio: "ignore",
|
|
1497
|
+
shell: false
|
|
1498
|
+
});
|
|
1492
1499
|
if (clone.status !== 0 || clone.error) {
|
|
1493
1500
|
throw new Error("git clone failed");
|
|
1494
1501
|
}
|
|
@@ -1532,18 +1539,6 @@ function renderLogo() {
|
|
|
1532
1539
|
var packageJson = JSON.parse(
|
|
1533
1540
|
readFileSync2(join3(__dirname, "../package.json"), "utf-8")
|
|
1534
1541
|
);
|
|
1535
|
-
var DEFAULT_MCP_USE_VERSION = "2.0.0-beta.36";
|
|
1536
|
-
function getCurrentPackageVersions(isDevelopment = false, sdkVersion) {
|
|
1537
|
-
if (isDevelopment) {
|
|
1538
|
-
return {
|
|
1539
|
-
"mcp-use": "workspace:*"
|
|
1540
|
-
};
|
|
1541
|
-
}
|
|
1542
|
-
const requestedSdk = sdkVersion ?? DEFAULT_MCP_USE_VERSION;
|
|
1543
|
-
return {
|
|
1544
|
-
"mcp-use": requestedSdk
|
|
1545
|
-
};
|
|
1546
|
-
}
|
|
1547
1542
|
function processTemplateFile(filePath, versions, isDevelopment = false) {
|
|
1548
1543
|
const content = readFileSync2(filePath, "utf-8");
|
|
1549
1544
|
let processedContent = content;
|
|
@@ -1554,7 +1549,7 @@ function processTemplateFile(filePath, versions, isDevelopment = false) {
|
|
|
1554
1549
|
version
|
|
1555
1550
|
);
|
|
1556
1551
|
}
|
|
1557
|
-
const mcpUseVersion = isDevelopment ? "workspace:*" : versions["mcp-use"]
|
|
1552
|
+
const mcpUseVersion = isDevelopment ? "workspace:*" : versions["mcp-use"];
|
|
1558
1553
|
if (isDevelopment) {
|
|
1559
1554
|
processedContent = processedContent.replace(
|
|
1560
1555
|
/"mcp-use": "\^[^"]+"/,
|
|
@@ -2027,11 +2022,35 @@ async function main() {
|
|
|
2027
2022
|
);
|
|
2028
2023
|
process.exit(1);
|
|
2029
2024
|
}
|
|
2025
|
+
}
|
|
2026
|
+
let mcpUseVersion;
|
|
2027
|
+
if (options.dev) {
|
|
2028
|
+
mcpUseVersion = "workspace:*";
|
|
2029
|
+
} else if (options.sdkVersion) {
|
|
2030
|
+
mcpUseVersion = options.sdkVersion;
|
|
2031
|
+
} else {
|
|
2032
|
+
const response = await fetch("https://registry.npmjs.org/mcp-use", {
|
|
2033
|
+
headers: { Accept: "application/vnd.npm.install-v1+json" },
|
|
2034
|
+
signal: AbortSignal.timeout(1e4)
|
|
2035
|
+
});
|
|
2036
|
+
if (!response.ok) {
|
|
2037
|
+
throw new Error(
|
|
2038
|
+
`Failed to resolve the mcp-use beta dist-tag from npm (${response.status})`
|
|
2039
|
+
);
|
|
2040
|
+
}
|
|
2041
|
+
const metadata = await response.json();
|
|
2042
|
+
const betaVersion = metadata["dist-tags"]?.beta;
|
|
2043
|
+
if (!betaVersion) {
|
|
2044
|
+
throw new Error("npm did not return a beta version for mcp-use");
|
|
2045
|
+
}
|
|
2046
|
+
mcpUseVersion = betaVersion;
|
|
2047
|
+
}
|
|
2048
|
+
const versions = { "mcp-use": mcpUseVersion };
|
|
2049
|
+
if (!useCurrentDir) {
|
|
2030
2050
|
mkdirSync(projectPath, { recursive: true });
|
|
2031
2051
|
}
|
|
2032
2052
|
console.log(cyan(`\u{1F680} Creating MCP server "${displayName}"...`));
|
|
2033
2053
|
const validatedTemplate = validateTemplateName(selectedTemplate);
|
|
2034
|
-
const versions = getCurrentPackageVersions(options.dev, options.sdkVersion);
|
|
2035
2054
|
await copyTemplate(projectPath, validatedTemplate, versions, options.dev);
|
|
2036
2055
|
updatePackageJson(projectPath, packageName);
|
|
2037
2056
|
updateIndexTs(projectPath, packageName);
|
|
@@ -2141,7 +2160,7 @@ async function main() {
|
|
|
2141
2160
|
console.log(bold("\u{1F4C1} Project structure:"));
|
|
2142
2161
|
console.log(` ${useCurrentDir ? "." : displayName}/`);
|
|
2143
2162
|
if (skillsInstalled) {
|
|
2144
|
-
console.log(" \u251C\u2500\u2500 .
|
|
2163
|
+
console.log(" \u251C\u2500\u2500 .agents/skills/");
|
|
2145
2164
|
console.log(" \u251C\u2500\u2500 .claude/skills/");
|
|
2146
2165
|
console.log(" \u251C\u2500\u2500 .cursor/skills/");
|
|
2147
2166
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SKILLS_REPO = "https://github.com/mcp-use/mcp-use.git";
|
|
2
|
+
export declare const SKILLS_BRANCH = "beta";
|
|
3
|
+
export declare const SKILLS_SPARSE_PATH = "skills/mcp-apps-builder";
|
|
4
|
+
export declare const SKILLS_AGENT_DIRS: readonly [".cursor", ".claude", ".agents"];
|
|
5
|
+
export declare const SKILLS_MANUAL_INSTALL_CMD = "npx --yes skills add mcp-use/mcp-use#beta --yes --skill mcp-apps-builder -a cursor -a claude-code -a codex";
|
|
6
|
+
export declare function getSkillsCloneArgs(repoDir: string): string[];
|
|
7
|
+
//# sourceMappingURL=skills-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-config.d.ts","sourceRoot":"","sources":["../src/skills-config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2CAA2C,CAAC;AACpE,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,4CAA6C,CAAC;AAC5E,eAAO,MAAM,yBAAyB,+GACwE,CAAC;AAE/G,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAa5D"}
|