File tree Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ import { join , dirname } from "path" ;
4
+ import { fileURLToPath } from "url" ;
5
+ import concurrently from "concurrently" ;
6
+
7
+ const __dirname = dirname ( fileURLToPath ( import . meta. url ) ) ;
8
+
9
+ // Paths to the server and client entry points
10
+ const serverPath = join ( __dirname , "../server/build/index.js" ) ;
11
+ const clientPath = join ( __dirname , "../client/bin/cli.js" ) ;
12
+
13
+ console . log ( "Starting MCP inspector..." ) ;
14
+
15
+ const { result } = concurrently (
16
+ [
17
+ {
18
+ command : `node ${ serverPath } ` ,
19
+ name : "server" ,
20
+ } ,
21
+ {
22
+ command : `node ${ clientPath } ` ,
23
+ name : "client" ,
24
+ } ,
25
+ ] ,
26
+ {
27
+ prefix : "name" ,
28
+ killOthers : [ "failure" , "success" ] ,
29
+ restartTries : 3 ,
30
+ } ,
31
+ ) ;
32
+
33
+ result . catch ( ( err ) => {
34
+ console . error ( "An error occurred:" , err ) ;
35
+ process . exit ( 1 ) ;
36
+ } ) ;
Original file line number Diff line number Diff line change 7
7
"homepage" : " https://modelcontextprotocol.github.io" ,
8
8
"bugs" : " https://github.com/modelcontextprotocol/inspector/issues" ,
9
9
"type" : " module" ,
10
+ "bin" : {
11
+ "mcp-inspector" : " ./bin/cli.js"
12
+ },
13
+ "files" : [
14
+ " bin" ,
15
+ " client/dist" ,
16
+ " server/build"
17
+ ],
10
18
"workspaces" : [
11
19
" client" ,
12
20
" server"
18
26
"build" : " npm run build-server && npm run build-client" ,
19
27
"start-server" : " cd server && npm run start" ,
20
28
"start-client" : " cd client && npm run preview" ,
21
- "start" : " concurrently \" npm run start-server\" \" npm run start-client\" " ,
29
+ "start" : " ./bin/cli.js" ,
30
+ "prepare" : " npm run build" ,
22
31
"prettier-fix" : " prettier --write ."
23
32
},
24
33
"devDependencies" : {
25
34
"concurrently" : " ^9.0.1" ,
26
- "prettier" : " 3.3.3"
35
+ "prettier" : " 3.3.3" ,
36
+ "@types/node" : " ^22.7.5"
27
37
}
28
38
}
You can’t perform that action at this time.
0 commit comments