Skip to content

MCP Inspector does not work with https endpoint #987

@wertzui

Description

@wertzui

Describe the bug

The MCP Inspector integration only looks for a "http" endpoint, not for "https".

mcpServer.GetEndpoint("http") ?? throw new InvalidOperationException($"The MCP server {mcpServer.Name} must have a 'http' endpoint defined."),

My app only exposes "https", so it throws an exception.

Changing it to

mcpServer.GetEndpoint("https") ?? mcpServer.GetEndpoint("http") ?? throw new InvalidOperationException($"The MCP server {mcpServer.Name} must have a 'http' endpoint defined."),

would make it work and also use https by default which it should do anyway.

Regression

no

Steps to reproduce

See above

Expected behavior

It should work with https endpoints.

Screenshots

No response

IDE and version

Other

IDE version

No response

Nuget packages

CommunityToolkit.Aspire.Hosting.McpInspector (13.0.0-beta.444)

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions