Skip to content

AAK-MCP-017: MCP server accepts HTTP (non-TLS) in production config

Severity
HIGH
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_auth_patterns.py
Auto-fixable
No.
SARIF name
McpPlainHttp

What it detects

An MCP server configuration binds to plain HTTP without TLS. MCP spec 2025-11-25 requires Streamable HTTP over TLS for remote servers.

How to fix

Bind only to HTTPS. Terminate TLS at a trusted proxy or use the server's native TLS support. Reject plain-HTTP binds in production mode.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-017

Limitations

Examines only files that contain @tool, createServer, McpServer, createMcpHandler, mcp.ServeHTTP, FastMCP or Server.run_streamable_http. In them it looks for a call to listen, bind or serve whose first argument is an http:// URL that contains a digit or a dot. A server started the usual way, without a URL string (uvicorn.run(app, host="0.0.0.0", port=8080), app.listen(8080)), and the same call in a file that names none of those, are not matched.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-017.md: the page then shows that text, with the registry reference appended under it.