fix: Neptune MCP server respects FASTMCP_LOG_LEVEL (accept common aliases) #1695
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.
Summary
Fixes the Amazon Neptune MCP server so the stderr Loguru handler respects the
FASTMCP_LOG_LEVELenvironment variable.Normalizes common aliases (case-insensitive) so user-friendly short names work as expected:
WARN→WARNINGERR→ERRORFATAL→CRITICALUnknown/invalid values fall back to
INFO.What changed
get_fastmcp_log_level()helper which:FASTMCP_LOG_LEVEL(defaults toINFO)INFOif unknownFiles changed
server.py(only)How tested (local)
Ran unit checks and a small runtime inspection locally to confirm behavior.
Manual checks performed (PowerShell):
(These confirm the configured handler level matches the normalized value.)

Related issue
Resolves: #1581 (amazon-neptune-mcp-server: StdErr logging forced at INFO level)
Notes for reviewers
The change is intentionally scoped to the Neptune server only.
If maintainers prefer a shared helper across MCP servers,
get_fastmcp_log_level()can be extracted into a common utility in a follow-up PR.Tests used during development were run locally; per request they are not included in this PR to keep it minimal.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.