-
Notifications
You must be signed in to change notification settings - Fork 84
MCP Inspector #622
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
This is only designed to work with SSE transport type, as it will configure that through Aspire. If you want to use SSE, you can still launch it, but it will require some manual configuration in the inspector UI once started. Currently it runs the inspector via `npx`, since there's no docker image available. Fixes #622
Alternatively, you can use https://www.nuget.org/packages/Nall.ModelContextProtocol.Inspector.Aspire.Hosting AppHost: var builder = DistributedApplication.CreateBuilder(args);
var sse = builder.AddProject<Projects.MCPServerHybrid>("server");
builder.AddMCPInspector("mcp-sse", serverPort: 9000, clientPort: 8080).WithSSE(sse);
builder
.AddMCPInspector("mcp-stdio")
.WithStdio<Projects.MCPServerHybrid>();
builder.Build().Run(); Source code: https://github.com/NikiforovAll/mcp-template-dotnet |
Nice - want to combine efforts? |
Sure, I'd be happy to contribute! The idea behind my package is that the MCP Inspector is embedded as an NPM app inside the NuGet package. I'm not sure if that's something you'd want to do since it’s a bit of a "hacky" solution. A more standard approach would probably be to use containers instead. That said, containers come with their own set of challenges, so I decided to explore a different approach. |
Bundling the node packing in the NuGet package would be tricky, as you'd still need to have the node runtime installed when using it. Containers do pose a problem for stdio in particular since you need to get the executable (or .NET project) into the container and you need the runtime there so it can do But I feel like from an Aspire perspective, stdio transport isn't the most logical approach you'd take. |
.NET Aspire issue link
No response
Overview
MCP Inspector is a debugging tool for working with MCP servers, and it'd be a useful one to combine with Aspire for building MCP Servers with Aspire.
Usage example
This assumes you have a MCP Server at
api
, and that it's running with SSE modeAdditional context
There are a few issues that make it a little clunky:
SERVER_PORT
doesn't cascade through to launching the client endpoint modelcontextprotocol/inspector#256Help us help you
Yes, I'd like to be assigned to work on this item
The text was updated successfully, but these errors were encountered: