Show how to start the inspector for Python and Typescript packages

This commit is contained in:
David Soria Parra 2024-11-23 17:45:05 +00:00
commit 7c1966677d
No known key found for this signature in database

View file

@ -11,15 +11,63 @@ The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is an int
The Inspector runs directly through `npx` without requiring installation:
```bash
npx @modelcontextprotocol/inspector path/to/server.js
npx @modelcontextprotocol/inspector <command>
```
Pass arguments to your server after the path:
```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
<Frame caption="The MCP Inspector interface">