Skip to content

Commit adf7401

Browse files
committed
feat: update server-js template
1 parent 8b97e3d commit adf7401

File tree

6 files changed

+43
-22
lines changed

6 files changed

+43
-22
lines changed

.changeset/plenty-clouds-listen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'create-mcp-kit': patch
3+
---
4+
5+
feat: update server-js template

packages/create-mcp-kit/template/server-js/package.json.hbs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@
5252
},
5353
"devDependencies": {
5454
{{#if (includes plugins 'commitlint')}}
55-
"@commitlint/cli": "^19.8.1",
56-
"@commitlint/config-conventional": "^19.8.1",
55+
"@commitlint/cli": "^20.1.0",
56+
"@commitlint/config-conventional": "^20.0.0",
5757
{{/if}}
5858
{{#if (includes plugins 'inspector')}}
59-
"@modelcontextprotocol/inspector": "^0.16.8",
59+
"@modelcontextprotocol/inspector": "^0.17.2",
6060
{{/if}}
6161
{{#if (includes plugins 'vitest')}}
62-
"@vitest/coverage-v8": "^3.2.4",
62+
"@vitest/coverage-v8": "^4.0.2",
6363
"c8": "^10.1.3",
6464
{{/if}}
6565
{{#if (includes plugins 'changelog')}}
6666
"compare-func": "^2.0.0",
6767
{{/if}}
6868
{{#if (includes plugins 'changelog')}}
69-
"conventional-changelog-angular": "^8.0.0",
69+
"conventional-changelog-angular": "^8.1.0",
7070
"conventional-changelog-cli": "^5.0.0",
7171
{{/if}}
7272
"cross-env": "^10.1.0",
@@ -79,7 +79,7 @@
7979
{{/if}}
8080
"husky": "^9.1.7",
8181
{{#if (includes plugins 'style')}}
82-
"lint-staged": "^16.2.4",
82+
"lint-staged": "^16.2.6",
8383
{{/if}}
8484
{{#if (includes plugins 'vitest')}}
8585
"nyc": "^17.1.0",
@@ -91,7 +91,7 @@
9191
"tree-kill": "^1.2.2",
9292
{{/if}}
9393
{{#if (includes plugins 'vitest')}}
94-
"vitest": "^3.2.4",
94+
"vitest": "^4.0.2",
9595
{{/if}}
9696
"rimraf": "^6.0.1"
9797
}

packages/create-mcp-kit/template/server-js/scripts/base.js.hbs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,19 @@ const after = async result => {
6464
if (inspectorProcess) {
6565
kill(inspectorProcess.pid, 'SIGINT')
6666
}
67-
inspectorProcess = spawn('npx', ['@modelcontextprotocol/inspector', 'build/index.js'], {
68-
stdio: 'inherit',
69-
shell: true,
70-
env: {
71-
...process.env,
72-
DANGEROUSLY_OMIT_AUTH: true,
73-
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
67+
inspectorProcess = spawn(
68+
'npx',
69+
['@modelcontextprotocol/inspector', '--config', './src/assets/mcp.json', '--server', 'mcp-stdio'],
70+
{
71+
stdio: 'inherit',
72+
shell: true,
73+
env: {
74+
...process.env,
75+
DANGEROUSLY_OMIT_AUTH: true,
76+
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
77+
},
7478
},
75-
})
79+
)
7680
autoOpenBrowser = false
7781

7882
if (process.env.TRANSPORT === 'web') {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"mcpServers": {
3+
"mcp-stdio": {
4+
"type": "node",
5+
"args": ["build/index.js"],
6+
"env": {}
7+
},
8+
"mcp-streamable": {
9+
"type": "streamable-http",
10+
"url": "http://localhost:8401/mcp"
11+
},
12+
"mcp-sse": {
13+
"type": "sse",
14+
"url": "http://localhost:8401/sse"
15+
}
16+
}
17+
}

packages/create-mcp-kit/template/server-js/vitest.config.js.hbs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ export default defineConfig({
1717
},
1818
{{#if (or (includes transports 'streamable') (includes transports 'sse'))}}
1919
pool: 'threads',
20-
poolOptions: {
21-
threads: {
22-
maxThreads: 1,
23-
minThreads: 1,
24-
},
25-
},
20+
maxWorkers: 1,
2621
{{/if}}
2722
},
2823
})

packages/create-mcp-kit/template/server-js/vitest.setup.js.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const stdioClientTransport = new StdioClientTransport({
2121
command: 'c8',
2222
args: ['--reporter=lcov', '--reporter=text', 'node', './src/index.js'],
2323
env: {
24-
...process.env,
24+
...(process.env),
2525
NODE_V8_COVERAGE: './coverage/tmp',
2626
},
2727
})

0 commit comments

Comments
 (0)