-
Notifications
You must be signed in to change notification settings - Fork 205
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
Fix MCP inspector connection with TypeScript SDK server #135
base: main
Are you sure you want to change the base?
Fix MCP inspector connection with TypeScript SDK server #135
Conversation
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).
* **Running with MCP Inspector** - Add steps to install MCP Inspector globally using npm - Add steps to start the MCP server - Add steps to start the MCP Inspector and connect it to the running server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! I've incorporated part of the change here into #136.
Unfortunately, the additions to "Running Your Server" seem to assume a particular package.json
setup (e.g., dev
and start
scripts, dist/
directory), which the user might not have done.
If you want to document how to do those things, though, we could keep these as a follow-up. What are your thoughts?
const transport = new StdioServerTransport(); | ||
await server.connect(transport); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const transport = new StdioServerTransport(); | |
await server.connect(transport); | |
async function main() { | |
const transport = new StdioServerTransport(); | |
await server.connect(transport); | |
}; | |
// invoke main method | |
main().catch((error) => { | |
console.error("Fatal error in main():", error); | |
process.exit(1); | |
}); |
Fixes #129
Update README.md to include instructions for running the server with the MCP inspector and update the quickstart example.
StdioServerTransport
connection.For more details, open the Copilot Workspace session.