feat: add healthcheck handling to streamable http server MCP-383#892
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds health check capabilities to the streamable HTTP server by introducing two new configuration options: healthCheckPort and healthCheckHost. These options enable a separate Express server dedicated to handling Kubernetes and Docker health checks.
Changes:
- Added configuration schema for health check server with validation
- Refactored streamable HTTP transport to support dual server architecture
- Added comprehensive test coverage for health check functionality
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/transports/streamableHttp.ts | Refactored to create separate MCP and health check servers using a shared base class |
| src/common/config/userConfig.ts | Added healthCheckPort and healthCheckHost configuration schema |
| src/common/logger.ts | Added log IDs for generic HTTP server lifecycle events |
| tests/integration/transports/streamableHttp.test.ts | Added health check server tests and updated test setup to use beforeEach |
| tests/unit/common/config/configOverrides.test.ts | Updated to include new health check fields in override validation |
| tests/integration/transports/createSessionConfig.test.ts | Updated server address access to use mcpServer property |
| tests/integration/transports/configOverrides.test.ts | Updated server address access to use mcpServer property |
| server.json | Added health check configuration to environment variables and CLI arguments |
Collaborator
Pull Request Test Coverage Report for Build 21865226184Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
himanshusinghs
approved these changes
Feb 4, 2026
himanshusinghs
left a comment
Collaborator
There was a problem hiding this comment.
Love the change, great readability improvement 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
This adds two config options -
healthCheckPortandhealthCheckHostthat control a separate express instance we create for k8s/docker health checks.