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

Commit 6b3fc69

Browse files
Merge pull request #5 from modelcontextprotocol/justin/inspector-shortcut
Add script shortcut to launch the inspector
2 parents ae3c0c8 + 61d7261 commit 6b3fc69

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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 build/index.js"
1718
},
1819
"dependencies": {
1920
"@modelcontextprotocol/sdk": "0.6.0"

template/src/index.ts.ejs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
/**
24
* This is a template MCP server that implements a simple notes system.
35
* It demonstrates core MCP concepts like resources and tools by allowing:

0 commit comments

Comments
 (0)