Skip to content

Commit 697e33d

Browse files
authored
Merge pull request modelcontextprotocol#28 from modelcontextprotocol/davidsp/start-inspector
Show how to start the inspector for Python and Typescript packages
2 parents 3cf702e + 7c19666 commit 697e33d

File tree

1 file changed

+51
-3
lines changed

1 file changed

+51
-3
lines changed

docs/tools/inspector.mdx

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,63 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is an int
1111

1212
The Inspector runs directly through `npx` without requiring installation:
1313

14+
1415
```bash
15-
npx @modelcontextprotocol/inspector path/to/server.js
16+
npx @modelcontextprotocol/inspector <command>
1617
```
1718

18-
Pass arguments to your server after the path:
1919
```bash
20-
npx @modelcontextprotocol/inspector path/to/server.js arg1 arg2
20+
npx @modelcontextprotocol/inspector <command> <arg1> <arg2>
2121
```
2222

23+
#### Inspecting servers from NPM or PyPi
24+
25+
A common way to start server packages from [NPM](https://npmjs.com) or [PyPi](https://pypi.com).
26+
27+
<Tabs>
28+
29+
<Tab title="NPM package">
30+
```bash
31+
npx -y @modelcontextprotocol/inspector npx <package-name> <args>
32+
# For example
33+
npx -y @modelcontextprotocol/inspector npx server-postgres postgres://127.0.0.1/testdb
34+
```
35+
</Tab>
36+
37+
<Tab title="PyPi package">
38+
```bash
39+
npx @modelcontextprotocol/inspector uvx <package-name> <args>
40+
# For example
41+
npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/mcp/servers.git
42+
```
43+
</Tab>
44+
</Tabs>
45+
46+
#### Inspecting locally developed servers
47+
48+
To inspect servers locally developed or downloaded as a repository, the most common
49+
way is:
50+
51+
<Tabs>
52+
<Tab title="TypeScript">
53+
```bash
54+
npx @modelcontextprotocol/inspector node path/to/server/index.js args...
55+
```
56+
</Tab>
57+
<Tab title="Python">
58+
```bash
59+
npx @modelcontextprotocol/inspector \
60+
uv \
61+
--directory path/to/server \
62+
run \
63+
package-name \
64+
args...
65+
```
66+
</Tab>
67+
</Tabs>
68+
69+
Please carefully read any attached README for the most accurate instructions.
70+
2371
## Feature overview
2472

2573
<Frame caption="The MCP Inspector interface">

0 commit comments

Comments
 (0)