create-mcp-kit 0.1.4 → 1.0.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Watermark Design
3
+ Copyright (c) 2026 my-mcp-hub
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.js CHANGED
@@ -1,171 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import { fileURLToPath } from "url";
3
- import { dirname, join, resolve } from "path";
4
- import * as clack from "@clack/prompts";
5
- import pc from "picocolors";
6
- import gradient from "gradient-string";
7
- import { createProject, fileExists, installDependencies, sleep } from "@mcp-tool-kit/shared";
8
-
9
- //#region src/index.ts
10
- const __filename = fileURLToPath(import.meta.url);
11
- const __dirname = dirname(__filename);
12
- clack.intro(gradient([
13
- {
14
- color: "#a855f7",
15
- pos: 0
16
- },
17
- {
18
- color: "#3b82f6",
19
- pos: .4
20
- },
21
- {
22
- color: "#06b6d4",
23
- pos: .8
24
- },
25
- {
26
- color: "#10b981",
27
- pos: 1
28
- }
29
- ])("MCP Kit - The Modern Context Protocol Builder"));
30
- const group = await clack.group({
31
- type: () => clack.select({
32
- message: "Project type:",
33
- options: [{
34
- value: "server",
35
- label: pc.magentaBright("MCP Server")
36
- }, {
37
- value: "client",
38
- label: pc.greenBright("MCP Client")
39
- }]
40
- }),
41
- name: ({ results }) => clack.text({
42
- message: "Project name:",
43
- defaultValue: `mcp-${results.type}-starter`,
44
- placeholder: `mcp-${results.type}-starter`
45
- }),
46
- language: () => clack.select({
47
- message: "Project language:",
48
- options: [{
49
- value: "ts",
50
- label: pc.magentaBright("TypeScript")
51
- }, {
52
- value: "js",
53
- label: pc.greenBright("JavaScript")
54
- }]
55
- }),
56
- transports: () => {
57
- return clack.multiselect({
58
- message: "Project transport type:",
59
- required: true,
60
- initialValues: ["stdio"],
61
- options: [
62
- {
63
- value: "stdio",
64
- label: pc.magentaBright("STDIO")
65
- },
66
- {
67
- value: "streamable",
68
- label: pc.greenBright("Streamable HTTP")
69
- },
70
- {
71
- value: "sse",
72
- label: pc.yellowBright("SSE")
73
- }
74
- ]
75
- });
76
- },
77
- template: () => clack.select({
78
- message: "Project template:",
79
- options: [{
80
- value: "standard",
81
- label: pc.magentaBright("Standard (recommended)")
82
- }, {
83
- value: "custom",
84
- label: pc.greenBright("Custom")
85
- }]
86
- }),
87
- plugins: ({ results }) => {
88
- if (results.template !== "custom") return Promise.resolve([
89
- "github-action",
90
- "vitest",
91
- ...results.type === "server" ? ["inspector"] : [],
92
- "style",
93
- "commitlint",
94
- "changelog"
95
- ]);
96
- return clack.multiselect({
97
- message: "Project plugins:",
98
- required: false,
99
- options: [
100
- {
101
- value: "github-action",
102
- label: pc.magentaBright("GitHub Action")
103
- },
104
- {
105
- value: "vitest",
106
- label: pc.greenBright("Vitest")
107
- },
108
- ...results.type === "server" ? [{
109
- value: "inspector",
110
- label: pc.cyanBright("Inspector")
111
- }] : [],
112
- {
113
- value: "style",
114
- label: pc.yellowBright("ESLint + Prettier + Lint-staged")
115
- },
116
- {
117
- value: "commitlint",
118
- label: pc.redBright("Commitlint")
119
- },
120
- {
121
- value: "changelog",
122
- label: pc.blueBright("Changelog")
123
- }
124
- ]
125
- });
126
- },
127
- install: () => clack.confirm({ message: "Do you want to install dependencies?" })
128
- }, { onCancel: () => {
129
- clack.cancel("Operation cancelled.");
130
- process.exit(0);
131
- } });
132
- const templatePath = join(__dirname, "../template", `${group.type}-${group.language}`);
133
- const targetPath = resolve(process.cwd(), group.name);
134
- if (!await fileExists(templatePath)) {
135
- clack.log.error(`Template not found: ${templatePath}`);
136
- process.exit(1);
137
- }
138
- if (await fileExists(targetPath)) {
139
- clack.log.error(`Directory ${group.name} already exists`);
140
- process.exit(1);
141
- }
142
- {
143
- await sleep(100);
144
- try {
145
- await createProject(targetPath, templatePath, {
146
- projectName: group.name,
147
- year: (/* @__PURE__ */ new Date()).getFullYear().toString(),
148
- transports: group.transports,
149
- plugins: group.plugins,
150
- components: []
151
- });
152
- } catch (error) {
153
- clack.log.error(error.message);
154
- process.exit(1);
155
- }
156
- }
157
- if (group.install) {
158
- const spinner = clack.spinner();
159
- spinner.start("Installing dependencies...");
160
- await installDependencies(targetPath);
161
- spinner.stop(pc.green("Dependencies installed!"));
162
- }
163
- clack.outro(`${pc.green("✓")} Project created successfully!
164
-
165
- ${pc.cyan("Next steps:")}
166
- ${pc.dim("cd")} ${group.name}
167
- ${group.install ? "" : `${pc.dim("npm install")}\n `}${pc.dim("npm run dev")}
168
-
169
- Enjoy coding! 🎉`);
170
-
171
- //#endregion
2
+ import{join as e,resolve as t}from"node:path";import*as a from"@clack/prompts";import{createProject as r,fileExists as l,installDependencies as o,sleep as s}from"@mcp-tool-kit/shared";import n from"gradient-string";import i from"picocolors";const c=import.meta.dirname;a.intro(n([{color:"#a855f7",pos:0},{color:"#3b82f6",pos:.4},{color:"#06b6d4",pos:.8},{color:"#10b981",pos:1}])("MCP Kit - The Modern Context Protocol Builder"));const p=await a.group({type:()=>a.select({message:"Project type:",options:[{value:"server",label:i.magentaBright("MCP Server")},{value:"client",label:i.greenBright("MCP Client")}]}),name:({results:e})=>a.text({message:"Project name:",defaultValue:`mcp-${e.type}-starter`,placeholder:`mcp-${e.type}-starter`}),language:()=>a.select({message:"Project language:",options:[{value:"ts",label:i.magentaBright("TypeScript")},{value:"js",label:i.greenBright("JavaScript")}]}),transports:()=>a.multiselect({message:"Project transport type:",required:!0,initialValues:["stdio"],options:[{value:"stdio",label:i.magentaBright("STDIO")},{value:"streamable",label:i.greenBright("Streamable HTTP")},{value:"sse",label:i.yellowBright("SSE")}]}),template:()=>a.select({message:"Project template:",options:[{value:"standard",label:i.magentaBright("Standard (recommended)")},{value:"custom",label:i.greenBright("Custom")}]}),plugins:({results:e})=>"custom"!==e.template?Promise.resolve(["github-action","vitest",..."server"===e.type?["inspector"]:[],"style","commitlint","changelog"]):a.multiselect({message:"Project plugins:",required:!1,options:[{value:"github-action",label:i.magentaBright("GitHub Action")},{value:"vitest",label:i.greenBright("Vitest")},..."server"===e.type?[{value:"inspector",label:i.cyanBright("Inspector")}]:[],{value:"style",label:i.yellowBright("ESLint + Prettier + Lint-staged")},{value:"commitlint",label:i.redBright("Commitlint")},{value:"changelog",label:i.blueBright("Changelog")}]}),install:()=>a.confirm({message:"Do you want to install dependencies?"})},{onCancel:()=>{a.cancel("Operation cancelled."),process.exit(0)}}),m=e(c,"../template",`${p.type}-${p.language}`),g=t(process.cwd(),p.name);await l(m)||(a.log.error(`Template not found: ${m}`),process.exit(1)),await l(g)&&(a.log.error(`Directory ${p.name} already exists`),process.exit(1)),await s(100);try{await r(g,m,{projectName:p.name,year:(new Date).getFullYear().toString(),transports:p.transports,plugins:p.plugins,components:[]})}catch(e){a.log.error(e.message),process.exit(1)}if(p.install){const e=a.spinner();e.start("Installing dependencies..."),await o(g),e.stop(i.green("Dependencies installed!"))}a.outro(`${i.green("✓")} Project created successfully!\n\n${i.cyan("Next steps:")}\n ${i.dim("cd")} ${p.name}\n ${p.install?"":`${i.dim("npm install")}\n `}${i.dim("npm run dev")}\n\nEnjoy coding! 🎉`);
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "create-mcp-kit",
3
- "version": "0.1.4",
3
+ "version": "1.0.0",
4
4
  "description": "A CLI tool to create MCP (Model Context Protocol) applications with ease.",
5
5
  "type": "module",
6
6
  "author": "zhensherlock",
7
- "homepage": "https://github.com/my-mcp-hub/mcp-kit/tree/master/packages/create#readme",
7
+ "homepage": "https://my-mcp-hub.github.io/mcp-kit/",
8
8
  "bin": {
9
9
  "create-mcp-kit": "./dist/index.js"
10
10
  },
@@ -48,14 +48,13 @@
48
48
  "gradient-string": "^3.0.0",
49
49
  "handlebars": "^4.7.8",
50
50
  "picocolors": "^1.1.1",
51
- "@mcp-tool-kit/shared": "^0.1.4"
51
+ "@mcp-tool-kit/shared": "^1.0.0"
52
52
  },
53
53
  "devDependencies": {},
54
54
  "scripts": {
55
55
  "clean:dist": "rimraf dist",
56
+ "dev": "rolldown -c rolldown.config.ts --watch --no-clear-screen",
56
57
  "build:types": "tsc --noEmit",
57
- "build": "cross-env NODE_ENV=production && npm run clean:dist && npm run build:types && rolldown -c rolldown.config.ts",
58
- "dev": "cross-env NODE_ENV=local && rolldown -c rolldown.config.ts --watch",
59
- "start": "node ./dist/index.js"
58
+ "build": "npm run clean:dist && npm run build:types && rolldown -c rolldown.config.ts"
60
59
  }
61
60
  }
@@ -27,7 +27,7 @@
27
27
  "prepare": "husky"
28
28
  },
29
29
  "dependencies": {
30
- "@modelcontextprotocol/sdk": "^1.21.0",
30
+ "@modelcontextprotocol/sdk": "^1.23.0",
31
31
  "dotenv": "^17.2.3"
32
32
  },
33
33
  "devDependencies": {
@@ -36,7 +36,7 @@
36
36
  "@commitlint/config-conventional": "^20.0.0",
37
37
  {{/if}}
38
38
  {{#if (includes plugins 'vitest')}}
39
- "@vitest/coverage-v8": "^4.0.6",
39
+ "@vitest/coverage-v8": "^4.0.14",
40
40
  {{/if}}
41
41
  {{#if (includes plugins 'changelog')}}
42
42
  "compare-func": "^2.0.0",
@@ -59,7 +59,7 @@
59
59
  "prettier": "^3.6.2",
60
60
  {{/if}}
61
61
  {{#if (includes plugins 'vitest')}}
62
- "vitest": "^4.0.6",
62
+ "vitest": "^4.0.14",
63
63
  {{/if}}
64
64
  "rimraf": "^6.1.0"
65
65
  }
@@ -27,7 +27,7 @@
27
27
  "prepare": "husky"
28
28
  },
29
29
  "dependencies": {
30
- "@modelcontextprotocol/sdk": "^1.21.0",
30
+ "@modelcontextprotocol/sdk": "^1.23.0",
31
31
  "dotenv": "^17.2.3"
32
32
  },
33
33
  "devDependencies": {
@@ -36,11 +36,11 @@
36
36
  "@commitlint/config-conventional": "^20.0.0",
37
37
  {{/if}}
38
38
  {{#if (includes plugins 'style')}}
39
- "@typescript-eslint/eslint-plugin": "^8.46.2",
40
- "@typescript-eslint/parser": "^8.46.2",
39
+ "@typescript-eslint/eslint-plugin": "^8.48.0",
40
+ "@typescript-eslint/parser": "^8.48.0",
41
41
  {{/if}}
42
42
  {{#if (includes plugins 'vitest')}}
43
- "@vitest/coverage-v8": "^4.0.6",
43
+ "@vitest/coverage-v8": "^4.0.14",
44
44
  {{/if}}
45
45
  {{#if (includes plugins 'changelog')}}
46
46
  "compare-func": "^2.0.0",
@@ -66,7 +66,7 @@
66
66
  "tsx": "^4.20.6",
67
67
  "typescript": "^5.9.3",
68
68
  {{#if (includes plugins 'vitest')}}
69
- "vitest": "^4.0.6",
69
+ "vitest": "^4.0.14",
70
70
  {{/if}}
71
71
  "rimraf": "^6.1.0"
72
72
  }
@@ -41,7 +41,7 @@
41
41
  "prepare": "husky"
42
42
  },
43
43
  "dependencies": {
44
- "@modelcontextprotocol/sdk": "^1.21.0",
44
+ "@modelcontextprotocol/sdk": "^1.23.0",
45
45
  "dotenv": "^17.2.3",
46
46
  {{#if (or (includes transports 'streamable') (includes transports 'sse'))}}
47
47
  "express": "^5.1.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "mcp-stdio": {
4
- "type": "node",
4
+ "command": "node",
5
5
  "args": ["build/index.js"],
6
6
  "env": {}
7
7
  },
@@ -41,7 +41,7 @@
41
41
  "prepare": "husky"
42
42
  },
43
43
  "dependencies": {
44
- "@modelcontextprotocol/sdk": "^1.21.0",
44
+ "@modelcontextprotocol/sdk": "^1.23.0",
45
45
  "dotenv": "^17.2.3",
46
46
  {{#if (or (includes transports 'streamable') (includes transports 'sse'))}}
47
47
  "express": "^5.1.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "mcp-stdio": {
4
- "type": "node",
4
+ "command": "node",
5
5
  "args": ["build/index.js"],
6
6
  "env": {}
7
7
  },
@@ -1,5 +1,5 @@
1
- import { z } from 'zod'
2
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
2
+ import { z } from 'zod'
3
3
 
4
4
  export const registerPrompts = (server: McpServer) => {
5
5
  server.registerPrompt(
@@ -1,6 +1,6 @@
1
- import registerGetData from './registerGetData'
2
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
3
2
  import type { OptionsType } from '@/types'
3
+ import registerGetData from './registerGetData'
4
4
 
5
5
  export const registerTools = (server: McpServer, options: OptionsType) => {
6
6
  registerGetData(server, options)
@@ -1,5 +1,5 @@
1
- import { z } from 'zod'
2
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
2
+ import { z } from 'zod'
3
3
  import type { OptionsType } from '@/types'
4
4
 
5
5
  export default function register(server: McpServer, options: OptionsType) {