From 7c1966677d4a7d95ff6faaeed9b9a9edbe8e575e Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Sat, 23 Nov 2024 17:45:05 +0000 Subject: [PATCH] Show how to start the inspector for Python and Typescript packages --- docs/tools/inspector.mdx | 54 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/docs/tools/inspector.mdx b/docs/tools/inspector.mdx index ace90b0..f6cdb2f 100644 --- a/docs/tools/inspector.mdx +++ b/docs/tools/inspector.mdx @@ -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 ``` -Pass arguments to your server after the path: ```bash -npx @modelcontextprotocol/inspector path/to/server.js arg1 arg2 +npx @modelcontextprotocol/inspector ``` +#### Inspecting servers from NPM or PyPi + +A common way to start server packages from [NPM](https://npmjs.com) or [PyPi](https://pypi.com). + + + + + ```bash + npx -y @modelcontextprotocol/inspector npx + # For example + npx -y @modelcontextprotocol/inspector npx server-postgres postgres://127.0.0.1/testdb + ``` + + + + ```bash + npx @modelcontextprotocol/inspector uvx + # For example + npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/mcp/servers.git + ``` + + + +#### Inspecting locally developed servers + +To inspect servers locally developed or downloaded as a repository, the most common +way is: + + + + ```bash + npx @modelcontextprotocol/inspector node path/to/server/index.js args... + ``` + + + ```bash + npx @modelcontextprotocol/inspector \ + uv \ + --directory path/to/server \ + run \ + package-name \ + args... + ``` + + + +Please carefully read any attached README for the most accurate instructions. + ## Feature overview