Details
Suggested remediation
Two independent hardenings, both recommended:
A. Refuse to start in an insecure default, in server.py main(), fail-closed when:
transport != "stdio"server_config.oauth_enabledisFalseserver_config.hostis not a loopback address (e.g. not in{"127.0.0.1", "::1", "localhost"})
Sample:
def _is_loopback(host: str) -> bool:
return host in {"127.0.0.1", "::1", "localhost"}
def main():
...
if server_config.transport != "stdio" and not server_config.oauth_enabled and not _is_loopback(server_config.host):
raise SystemExit(
"Refusing to start: HTTP transport bound to non-loopback host "
f"({server_config.host}) without OAuth. Set OAUTH_ENABLED=true or "
"set MCP_HOST=127.0.0.1 for local-only access."
)
...
B. Default `oauth_enabled` to `True` and require explicit opt-out for local development. This matches the principle of secure-by-default for network-facing services.
C. Document the threat model in README under a "Production deployment" section, including:
- Explicit warning that the server should not be exposed to untrusted networks without OAuth
- Recommendation to set
MCP_HOST=127.0.0.1for stdio/local-only deployments
Resources
mcp_pinot/server.pylines 26-46, 248-269mcp_pinot/config.pylines 56-65, 318-330- FastMCP
authparameter behavior whenNone: https://github.com/jlowin/fastmcp - The Register, May 13 2026: MCP database flaws across Doris, Pinot, RDS
Reporter
Independent security researcher. Disclosed via GitHub Security Advisory, 2026-05-23.