create-mcp-use-app 0.4.4-canary.1 → 0.4.4

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/dist/index.js CHANGED
@@ -360,12 +360,21 @@ async function promptForProjectName() {
360
360
  }
361
361
  async function promptForTemplate() {
362
362
  const templatesDir = join(__dirname, "templates");
363
- const availableTemplates = existsSync(templatesDir) ? readdirSync(templatesDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort() : ["starter", "ui-resource", "apps-sdk-demo"];
364
- const templateDescriptions = {
365
- "starter": "Starter MCP server with all features",
366
- "ui-resource": "MCP Server with mcp-ui resources returned from tools",
367
- "apps-sdk-demo": "MCP Server with mcp-ui resources"
368
- };
363
+ const availableTemplates = readdirSync(templatesDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
364
+ const templateDescriptions = {};
365
+ for (const template2 of availableTemplates) {
366
+ const packageJsonPath = join(templatesDir, template2, "package.json");
367
+ if (existsSync(packageJsonPath)) {
368
+ try {
369
+ const packageJson2 = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
370
+ templateDescriptions[template2] = packageJson2.description || "MCP server template";
371
+ } catch (error) {
372
+ templateDescriptions[template2] = "MCP server template";
373
+ }
374
+ } else {
375
+ templateDescriptions[template2] = "MCP server template";
376
+ }
377
+ }
369
378
  const { template } = await inquirer.prompt([
370
379
  {
371
380
  type: "list",
@@ -179,15 +179,17 @@ server.prompt({
179
179
  { name: 'code', type: 'string', required: true }
180
180
  ],
181
181
  cb: async (params: Record<string, any>) => {
182
- const code = params.code as string
182
+ const { code } = params
183
183
  return {
184
- content: [{
185
- type: 'text',
186
- text: `Please review this code:\n\n${code}`
184
+ messages: [{
185
+ role: 'user',
186
+ content: {type: 'text', text: `Please review this code:\n\n${code}`}
187
187
  }]
188
188
  }
189
189
  }
190
190
  })
191
191
 
192
+ const PORT = process.env.PORT ? parseInt(process.env.PORT) : 3000
193
+ console.log(`Server running on port ${PORT}`)
192
194
  // Start the server
193
- server.listen(3000)
195
+ server.listen(PORT)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mcp-use-app",
3
- "version": "0.4.4-canary.1",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "description": "Create MCP-Use apps with one command",
6
6
  "author": "mcp-use, Inc.",