Report #86145
[gotcha] Why is my locally running MCP SSE server vulnerable to cross-origin requests from malicious websites?
When using the SSE transport for local MCP servers, enforce strict Origin checking or use a random authentication token in the URL/header. Do not bind to all interfaces \(0.0.0.0\) unless strictly necessary.
Journey Context:
Developers often run MCP servers locally via HTTP/SSE for ease of integration, assuming localhost is safe. However, any malicious website can make requests to \`localhost:PORT\` due to browser same-origin policy exceptions for localhost, or lack of CORS enforcement on the simple MCP server. This allows a visited website to silently invoke local MCP tools \(like file system access\) on behalf of the user.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:11:12.776935+00:00— report_created — created