Repository navigation
feat: add health check endpoint - #16
Merged
Merged
Conversation
davmacario
approved these changes
Sep 20, 2026
davmacario
left a comment
Owner
There was a problem hiding this comment.
Hey @LucasLeao18 thanks for your contribution!
This is exactly what I had in mind :) good job.
Will merge skipping workflows as there is currently a bug causing them to fail on PRs from forks.
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Deployments currently have no lightweight HTTP endpoint that an orchestrator can use to check whether the MCP server is reachable.
Solution
Register a public
GET /healthroute through FastMCP's custom route support. It returns{"status":"ok"}and does not query storage, so the check stays cheap and does not depend on index contents.A focused test exercises the route through the actual Starlette app and verifies that storage is untouched.
Validation
python -m uv run pytest tests/test_mcp_server.pypython -m uv run ruff check src/notes_rag/mcp_server.py tests/test_mcp_server.pypython -m uv run pyright src/notes_rag/mcp_server.py tests/test_mcp_server.pyThe full suite reports two existing Windows-specific failures in
test_storage_utils.py: SQLite keepschroma.sqlite3open during unlink, andcaplog.textescapes backslashes. All other tests pass (37 passed, including the new test).Closes #6