Skip to content

Commit a801fcd

Browse files
committed
feat: add mcp config file and update inspector command
1 parent 5aa3bc4 commit a801fcd

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
@@ -57,15 +57,19 @@ const after = async result => {
5757
if (inspectorProcess) {
5858
inspectorProcess.kill('SIGINT')
5959
}
60-
inspectorProcess = spawn('npx', ['@modelcontextprotocol/inspector', 'build/index.js'], {
61-
stdio: 'inherit',
62-
shell: true,
63-
env: {
64-
...process.env,
65-
DANGEROUSLY_OMIT_AUTH: true,
66-
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
60+
inspectorProcess = spawn(
61+
'npx',
62+
['@modelcontextprotocol/inspector', '--config', './src/assets/mcp.json', '--server', 'mcp-stdio'],
63+
{
64+
stdio: 'inherit',
65+
shell: true,
66+
env: {
67+
...process.env,
68+
DANGEROUSLY_OMIT_AUTH: true,
69+
MCP_AUTO_OPEN_ENABLED: autoOpenBrowser,
70+
},
6771
},
68-
})
72+
)
6973
autoOpenBrowser = false
7074

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