@@ -17,9 +17,11 @@ public static IResourceBuilder<McpInspectorResource> AddMcpInspector(this IDistr
17
17
var resource = builder . AddResource ( new McpInspectorResource ( name ) )
18
18
. WithArgs ( [ "-y" , $ "@modelcontextprotocol/inspector@{ McpInspectorResource . InspectorVersion } "] )
19
19
. ExcludeFromManifest ( )
20
- . WithHttpEndpoint ( isProxied : false , port : Random . Shared . Next ( 3000 , 4000 ) , env : "CLIENT_PORT" , name : "client" )
21
- . WithHttpEndpoint ( isProxied : false , port : Random . Shared . Next ( 4000 , 5000 ) , env : "SERVER_PORT" , name : "server-proxy" )
22
- . WithEnvironment ( "DANGEROUSLY_OMIT_AUTH" , "true" ) ;
20
+ . WithHttpEndpoint ( isProxied : false , port : Random . Shared . Next ( 3000 , 4000 ) , env : "CLIENT_PORT" , name : McpInspectorResource . ClientEndpointName )
21
+ . WithHttpEndpoint ( isProxied : false , port : Random . Shared . Next ( 4000 , 5000 ) , env : "SERVER_PORT" , name : McpInspectorResource . ServerProxyEndpointName )
22
+ . WithEnvironment ( "DANGEROUSLY_OMIT_AUTH" , "true" )
23
+ . WithHttpHealthCheck ( "/" , endpointName : McpInspectorResource . ClientEndpointName )
24
+ . WithHttpHealthCheck ( "/config" , endpointName : McpInspectorResource . ServerProxyEndpointName ) ;
23
25
24
26
builder . Eventing . Subscribe < BeforeResourceStartedEvent > ( resource . Resource , async ( @event , ct ) =>
25
27
{
@@ -52,8 +54,8 @@ public static IResourceBuilder<McpInspectorResource> AddMcpInspector(this IDistr
52
54
return resource
53
55
. WithEnvironment ( ctx =>
54
56
{
55
- var clientEndpoint = resource . GetEndpoint ( "client" ) ;
56
- var serverProxyEndpoint = resource . GetEndpoint ( "server-proxy" ) ;
57
+ var clientEndpoint = resource . GetEndpoint ( McpInspectorResource . ClientEndpointName ) ;
58
+ var serverProxyEndpoint = resource . GetEndpoint ( McpInspectorResource . ServerProxyEndpointName ) ;
57
59
58
60
if ( clientEndpoint is null || serverProxyEndpoint is null )
59
61
{
0 commit comments