Skip to content

feat: add healthcheck handling to streamable http server MCP-383#892

Merged
himanshusinghs merged 9 commits into
mainfrom
ni/healthcheck
Feb 10, 2026
Merged

feat: add healthcheck handling to streamable http server MCP-383#892
himanshusinghs merged 9 commits into
mainfrom
ni/healthcheck

Conversation

@nirinchev

Copy link
Copy Markdown
Collaborator

Proposed changes

This adds two config options - healthCheckPort and healthCheckHost that control a separate express instance we create for k8s/docker health checks.

@nirinchev nirinchev requested a review from a team as a code owner February 2, 2026 16:09
Copilot AI review requested due to automatic review settings February 2, 2026 16:09
@nirinchev nirinchev changed the title feat: add healthcheck handling to streamable http server feat: add healthcheck handling to streamable http server MCP-383 Feb 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread tests/integration/transports/streamableHttp.test.ts Outdated
Comment thread tests/integration/transports/streamableHttp.test.ts Outdated
Comment thread tests/integration/transports/streamableHttp.test.ts Outdated
Comment thread src/common/config/userConfig.ts Outdated
@coveralls

coveralls commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 21865226184

Warning: 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

  • 151 of 166 (90.96%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 82.821%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/transports/streamableHttp.ts 131 146 89.73%
Totals Coverage Status
Change from base Build 21864680015: 0.5%
Covered Lines: 7652
Relevant Lines: 9120

💛 - Coveralls

@himanshusinghs himanshusinghs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the change, great readability improvement 🚀

@fmenezes fmenezes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@himanshusinghs himanshusinghs enabled auto-merge (squash) February 10, 2026 12:39
@himanshusinghs himanshusinghs merged commit 00ebccd into main Feb 10, 2026
24 of 26 checks passed
@himanshusinghs himanshusinghs deleted the ni/healthcheck branch February 10, 2026 12:54
@himanshusinghs himanshusinghs linked an issue Feb 18, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add health endpoint to MCP server

5 participants