create-mctx-server 0.3.0 → 0.5.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.
Files changed (3) hide show
  1. package/index.js +16 -15
  2. package/package.json +7 -3
  3. package/LICENSE +0 -21
package/index.js CHANGED
@@ -27,17 +27,19 @@ mkdirSync(projectName, { recursive: true });
27
27
  const packageJson = {
28
28
  name: projectName,
29
29
  version: "0.0.1",
30
+ description: "An MCP server built with @mctx-ai/mcp-server",
30
31
  type: "module",
32
+ main: "dist/index.js",
31
33
  scripts: {
32
34
  dev: "npx mctx-dev index.js",
33
- build:
34
- "node --experimental-sea-config sea-config.json || echo 'Build step placeholder'",
35
+ build: "esbuild index.js --bundle --platform=node --format=esm --outfile=dist/index.js",
35
36
  },
36
37
  dependencies: {
37
38
  "@mctx-ai/mcp-server": `^${version}`,
38
39
  },
39
40
  devDependencies: {
40
41
  "@mctx-ai/mcp-dev": `^${version}`,
42
+ esbuild: "^0.20.0",
41
43
  },
42
44
  };
43
45
 
@@ -49,7 +51,9 @@ writeFileSync(
49
51
  // Generate index.js
50
52
  const indexJs = `import { createServer, T } from '@mctx-ai/mcp-server';
51
53
 
52
- const app = createServer();
54
+ const app = createServer({
55
+ instructions: 'This server provides a simple greeting tool. Use the greet tool to say hello to someone by name.',
56
+ });
53
57
 
54
58
  // A simple greeting tool
55
59
  function greet({ name }) {
@@ -68,17 +72,6 @@ export default app;
68
72
 
69
73
  writeFileSync(join(projectName, "index.js"), indexJs);
70
74
 
71
- // Generate mctx.json
72
- const mctxJson = {
73
- name: projectName,
74
- entrypoint: "index.js",
75
- };
76
-
77
- writeFileSync(
78
- join(projectName, "mctx.json"),
79
- JSON.stringify(mctxJson, null, 2) + "\n",
80
- );
81
-
82
75
  // Generate .gitignore
83
76
  const gitignore = `node_modules/
84
77
  dist/
@@ -111,11 +104,19 @@ myTool.input = {
111
104
  app.tool('my-tool', myTool);
112
105
  \`\`\`
113
106
 
107
+ ## Build
108
+
109
+ \`\`\`bash
110
+ npm run build
111
+ \`\`\`
112
+
113
+ This bundles your server into a single \`dist/index.js\` file ready for deployment.
114
+
114
115
  ## Deploy
115
116
 
116
117
  1. Push to GitHub
117
118
  2. Connect your repo at [mctx.ai](https://mctx.ai)
118
- 3. Deploy — mctx reads \`mctx.json\` and runs your server
119
+ 3. Deploy — mctx reads \`package.json\` and runs your server
119
120
 
120
121
  ## Learn More
121
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mctx-server",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Create a new mctx MCP server project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,5 +26,9 @@
26
26
  "bugs": {
27
27
  "url": "https://github.com/mctx-ai/mcp-server/issues"
28
28
  },
29
- "homepage": "https://docs.mctx.ai"
30
- }
29
+ "homepage": "https://docs.mctx.ai",
30
+ "publishConfig": {
31
+ "access": "public",
32
+ "provenance": true
33
+ }
34
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 mctx
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.