MCP Security Kit by Agent Trust Cloud

high

Secret inside an MCP server URL

A remote server URL carries a key or token in its query string or user-info.

Why it matters

URLs are logged by proxies, load balancers and servers, and are easy to paste into chat or tickets.

How to fix it

Send the credential in a header that references a variable, or use the server's OAuth sign-in. Rotate the exposed value.

Before

{
  "mcpServers": {
    "reports": {
      "url": "https://mcp.example.com/sse?api_key=realkey123456"
    }
  }
}

After

{
  "mcpServers": {
    "reports": {
      "url": "https://mcp.example.com/sse",
      "headers": {
        "Authorization": "Bearer ${REPORTS_TOKEN}"
      }
    }
  }
}

Illustrative configs. The checker flags the “before” version with this finding and not the “after” version.

Check your own config

Other checks