Skip to content

Commit f8c44b9

Browse files
committed
feat: add mcp config file and update inspector command
1 parent d50afe8 commit f8c44b9

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
@@ -68,15 +68,19 @@ const after = async result => {
6868
kill(inspectorProcess.pid, 'SIGINT')
6969
// inspectorProcess.kill('SIGINT')
7070
}
71-
inspectorProcess = spawn('npx', ['@modelcontextprotocol/inspector', 'build/index.js'], {
72-
stdio: 'inherit',
73-
shell: true,
74-
env: {
75-
...process.env,
76-
DANGEROUSLY_OMIT_AUTH: true,
77-
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
71+
inspectorProcess = spawn(
72+
'npx',
73+
['@modelcontextprotocol/inspector', '--config', './src/assets/mcp.json', '--server', 'mcp-stdio'],
74+
{
75+
stdio: 'inherit',
76+
shell: true,
77+
env: {
78+
...process.env,
79+
DANGEROUSLY_OMIT_AUTH: true,
80+
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
81+
},
7882
},
79-
})
83+
)
8084
autoOpenBrowser = false
8185

8286
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)