Merge pull request #28 from modelcontextprotocol/davidsp/start-inspector
Show how to start the inspector for Python and Typescript packages
This commit is contained in:
commit
697e33dc4f
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:
|
||||
|
||||
|
||||
```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">
|
||||
|
|
|
|||
Loading…
Reference in a new issue