Add inspector package script
This commit is contained in:
parent
7cfba3e143
commit
4d2668721f
2 changed files with 4 additions and 3 deletions
|
|
@ -61,10 +61,10 @@ On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
|
|||
|
||||
### Debugging
|
||||
|
||||
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector):
|
||||
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:
|
||||
|
||||
```bash
|
||||
npx @modelcontextprotocol/inspector /path/to/<%= name %>/build/index.js
|
||||
npm run inspector
|
||||
```
|
||||
|
||||
The Inspector will provide a URL to access debugging tools in your browser.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@
|
|||
"scripts": {
|
||||
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
|
||||
"prepare": "npm run build",
|
||||
"watch": "tsc --watch"
|
||||
"watch": "tsc --watch",
|
||||
"inspector": "npx @modelcontextprotocol/inspector \"$(node -e \"console.log(require('path').join(process.cwd(), 'build/index.js'))\")\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "0.6.0"
|
||||
|
|
|
|||
Loading…
Reference in a new issue