Skip to content

Commit c9d5295

Browse files
committed
feat: add mcp.json config and update inspector spawn command
1 parent aaf2aca commit c9d5295

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

scripts/base.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,19 @@ const after = async result => {
5959
kill(inspectorProcess.pid, 'SIGINT')
6060
// inspectorProcess.kill('SIGINT')
6161
}
62-
inspectorProcess = spawn('npx', ['@modelcontextprotocol/inspector', 'build/index.js'], {
63-
stdio: 'inherit',
64-
shell: true,
65-
env: {
66-
...process.env,
67-
DANGEROUSLY_OMIT_AUTH: true,
68-
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
62+
inspectorProcess = spawn(
63+
'npx',
64+
['@modelcontextprotocol/inspector', '--config', './src/assets/mcp.json', '--server', 'mcp-stdio'],
65+
{
66+
stdio: 'inherit',
67+
shell: true,
68+
env: {
69+
...process.env,
70+
DANGEROUSLY_OMIT_AUTH: true,
71+
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
72+
},
6973
},
70-
})
74+
)
7175
autoOpenBrowser = false
7276

7377
if (process.env.TRANSPORT === 'web') {

src/assets/mcp.json

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+
}

0 commit comments

Comments
 (0)