Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 4d26687

Browse files
committed
Add inspector package script
1 parent 7cfba3e commit 4d26687

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

template/README.md.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
6161

6262
### Debugging
6363

64-
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):
64+
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:
6565

6666
```bash
67-
npx @modelcontextprotocol/inspector /path/to/<%= name %>/build/index.js
67+
npm run inspector
6868
```
6969

7070
The Inspector will provide a URL to access debugging tools in your browser.

template/package.json.ejs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"scripts": {
1414
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
1515
"prepare": "npm run build",
16-
"watch": "tsc --watch"
16+
"watch": "tsc --watch",
17+
"inspector": "npx @modelcontextprotocol/inspector \"$(node -e \"console.log(require('path').join(process.cwd(), 'build/index.js'))\")\""
1718
},
1819
"dependencies": {
1920
"@modelcontextprotocol/sdk": "0.6.0"

0 commit comments

Comments
 (0)