Skip to content

AAK-TRANSPORT-001: MCP server uses a cleartext transport (http:// or ws://)

Severity
CRITICAL
Category
Transport Security (transport-security)
Scanner
agent_audit_kit/scanners/transport_security.py
Auto-fixable
No.
SARIF name
McpHttpNotHttps

What it detects

An MCP server URL uses a cleartext scheme, exposing all traffic including credentials to interception. Applies to: http:// and ws://. A ws:// handshake is an unencrypted HTTP upgrade, so it is the same defect and not a milder one -- the handshake headers and every frame after them are on the wire in clear. Does not apply to: https://, wss:// (encrypted), or stdio (no URL, no network hop). Loopback URLs (localhost, 127.0.0.0/8, ::1, 0.0.0.0) are excluded on either scheme, since the traffic does not leave the host.

How to fix

Use https:// for remote HTTP/SSE/Streamable-HTTP servers and wss:// for remote WebSocket servers.

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

agent-audit-kit scan . --rules AAK-TRANSPORT-001

Limitations

Reads the url field of each server under mcpServers, or servers in VS Code's .vscode/mcp.json, and flags http:// and ws:// unless the host is loopback (localhost, 127.0.0.0/8, ::1) or 0.0.0.0. The scheme is read as a client reads it, so http://host and http:/host are cleartext too. A URL that Node, requests and Rust's url crate read differently from curl, httpx and urlsplit, which keep a backslash inside the authority, is judged by the less safe of the two readings. A cleartext URL passed as an argument to a bridge command (npx mcp-remote http://...) is not a url field and is not read.

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-TRANSPORT-001.md: the page then shows that text, with the registry reference appended under it.