Show how to start the inspector for Python and Typescript packages
This commit is contained in:
parent
3cf702ee01
commit
7c1966677d
1 changed files with 51 additions and 3 deletions
|
|
@ -11,15 +11,63 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is an int
|
||||||
|
|
||||||
The Inspector runs directly through `npx` without requiring installation:
|
The Inspector runs directly through `npx` without requiring installation:
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx @modelcontextprotocol/inspector path/to/server.js
|
npx @modelcontextprotocol/inspector <command>
|
||||||
```
|
```
|
||||||
|
|
||||||
Pass arguments to your server after the path:
|
|
||||||
```bash
|
```bash
|
||||||
npx @modelcontextprotocol/inspector path/to/server.js arg1 arg2
|
npx @modelcontextprotocol/inspector <command> <arg1> <arg2>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Inspecting servers from NPM or PyPi
|
||||||
|
|
||||||
|
A common way to start server packages from [NPM](https://npmjs.com) or [PyPi](https://pypi.com).
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
|
||||||
|
<Tab title="NPM package">
|
||||||
|
```bash
|
||||||
|
npx -y @modelcontextprotocol/inspector npx <package-name> <args>
|
||||||
|
# For example
|
||||||
|
npx -y @modelcontextprotocol/inspector npx server-postgres postgres://127.0.0.1/testdb
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
|
||||||
|
<Tab title="PyPi package">
|
||||||
|
```bash
|
||||||
|
npx @modelcontextprotocol/inspector uvx <package-name> <args>
|
||||||
|
# For example
|
||||||
|
npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/mcp/servers.git
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
#### Inspecting locally developed servers
|
||||||
|
|
||||||
|
To inspect servers locally developed or downloaded as a repository, the most common
|
||||||
|
way is:
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<Tab title="TypeScript">
|
||||||
|
```bash
|
||||||
|
npx @modelcontextprotocol/inspector node path/to/server/index.js args...
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
<Tab title="Python">
|
||||||
|
```bash
|
||||||
|
npx @modelcontextprotocol/inspector \
|
||||||
|
uv \
|
||||||
|
--directory path/to/server \
|
||||||
|
run \
|
||||||
|
package-name \
|
||||||
|
args...
|
||||||
|
```
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
Please carefully read any attached README for the most accurate instructions.
|
||||||
|
|
||||||
## Feature overview
|
## Feature overview
|
||||||
|
|
||||||
<Frame caption="The MCP Inspector interface">
|
<Frame caption="The MCP Inspector interface">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue