Skip to content

Conversation

drernie
Copy link
Member

@drernie drernie commented Sep 24, 2025

Summary

Implements a basic health check endpoint (/health) for the MCP server to support container orchestration systems like Kubernetes and Docker Compose.

Changes

  • ✅ Add /health endpoint using FastMCP's custom_route decorator
  • ✅ Health check handler returns server status, timestamp, and version info
  • ✅ Transport-aware registration (only enabled for HTTP/SSE transports)
  • ✅ Comprehensive unit and integration tests
  • ✅ Updated Docker container test to verify health endpoint

Implementation Details

Health Check Response Format

{
  "status": "ok",
  "timestamp": "2024-01-15T10:30:00Z",
  "server": {
    "name": "quilt-mcp-server",
    "version": "1.0.0",
    "transport": "http"
  }
}

Transport Compatibility

  • HTTP/SSE/Streamable-HTTP: Health endpoint registered at /health
  • stdio: No HTTP endpoints (maintains compatibility)

Testing

  • Unit tests for health check handler
  • Integration tests for FastMCP registration
  • Docker container test validates health endpoint
  • All existing tests pass

Documentation

Complete specification documents created in spec/197-add-health-checks/:

  • 01-requirements.md - User stories and acceptance criteria
  • 02-analysis.md - Current state analysis
  • 03-specifications.md - Desired end state
  • 04-phases.md - Implementation roadmap

Future Phases

This PR implements Phase 1 of the health check feature. Future enhancements:

  • Phase 2: Component health integration (AWS, Athena, packages)
  • Phase 3: Advanced endpoints (/readiness, /liveness)
  • Phase 4: Docker HEALTHCHECK and Kubernetes probe support

Fixes #197

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

- Implement /health endpoint with FastMCP custom_route decorator
- Add health check handler returning server status and info
- Register health endpoint only for HTTP/SSE transport modes
- Add comprehensive tests for health check functionality
- Update Docker integration test to verify health endpoint

Addresses issue #197
@drernie drernie linked an issue Sep 24, 2025 that may be closed by this pull request
- Bump patch version from 0.6.13 to 0.6.14
- Update CHANGELOG with health check endpoint feature
- Enhance health endpoint to report actual package version
- Use importlib.metadata for dynamic version detection
@drernie drernie added this pull request to the merge queue Sep 24, 2025
Merged via the queue into main with commit b3accb8 Sep 24, 2025
4 checks passed
@drernie drernie deleted the 197-add-health-checks branch September 24, 2025 20:14
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 checks
1 participant