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 77 "homepage" : " https://modelcontextprotocol.github.io" ,
88 "bugs" : " https://github.com/modelcontextprotocol/inspector/issues" ,
99 "type" : " module" ,
10+ "bin" : {
11+ "mcp-inspector" : " ./bin/cli.js"
12+ },
13+ "files" : [
14+ " bin" ,
15+ " client/dist" ,
16+ " server/build"
17+ ],
1018 "workspaces" : [
1119 " client" ,
1220 " server"
1826 "build" : " npm run build-server && npm run build-client" ,
1927 "start-server" : " cd server && npm run start" ,
2028 "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" ,
2231 "prettier-fix" : " prettier --write ."
2332 },
2433 "devDependencies" : {
2534 "concurrently" : " ^9.0.1" ,
26- "prettier" : " 3.3.3"
35+ "prettier" : " 3.3.3" ,
36+ "@types/node" : " ^22.7.5"
2737 }
2838}
You can’t perform that action at this time.
0 commit comments