-
Notifications
You must be signed in to change notification settings - Fork 568
How to run MCP inspector with TypeScript SDK servers? #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As a new user of the SDK, this has been a pretty frustrating experience so far. |
these sections of the README appear to be missing: Running Your Server |
Spent time digging around, it seems the right way to do this is to add import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
...
const transport = new StdioServerTransport();
await server.connect(transport); So that the server actually connects to a transport that the client (in this case, MCP inspector) can access. Strongly suggest adding this to the examples to make this guide much more self-contained. |
Sorry, this README has been in flux since the API changes. Agree with your points! Will land some basic changes to make the end-to-end setup more obvious, but need to follow up with even easier tooling too. |
Fixes modelcontextprotocol#129 Update README.md to include instructions for running the server with the MCP inspector and update the quickstart example. * Add instructions for running the server with the MCP inspector. * Update the quickstart example to include the `StdioServerTransport` connection. * Add sections for Development Mode, Claude Desktop Integration, and Direct Execution. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/modelcontextprotocol/typescript-sdk/issues/129?shareId=XXXX-XXXX-XXXX-XXXX).
I have the quickstart
index.ts
:Dependencies installed.
I attempt to invoke the MCP inspector (https://modelcontextprotocol.io/docs/tools/inspector) to make sure my server is working as expected.
I run
npx @modelcontextprotocol/inspector npm run -s start
(s to suppress the startup logging)The inspector starts up but not in a connected state:
When I hit connect I get no UI change, and the following on the terminal:
This then appears to loop. How do I use this tool with the TypeScript server to make sure my server is working correctly?
The text was updated successfully, but these errors were encountered: