Show HN: MCP Defender – OSS AI Firewall for Protecting MCP in Cursor/Claude etc
MCP Defender is an open source desktop app that automatically proxies your MCP traffic in AI apps like Cursor, Claude, Windsurf and VSCode. It then scans all requests and responses between the apps and the MCP tools they call. If it detects anything malicious, it alerts you and lets you allow or block the tool call.
While the threat landscape of MCP is still being actively researched, there are dangerous things that MCP Defender can block today. For example, a developer asks Cursor to fix a Github issue with an attached crash log. However, the Github issue was created by an attacker who included secret instructions buried in the crash log. These instructions tell Cursor to send the developer’s SSH keys to a server the attacker controls. MCP Defender detects these malicious instructions and alerts the developer who otherwise may not be careful in running tool calls.
The scanning is currently done via an LLM and checks for things like prompt injection, credential theft (ssh keys, tokens) and arbitrary code execution. You can use an MCP Defender account or provide your own API keys for LLM providers to perform the scanning.
Currently we’ve published a beta Mac build and we’ll soon publish builds for Windows and Linux as well.
Any feedback would be greatly appreciated.
Thanks!
All MCP comms from client to server go through an SSE proxy which has AuthN and AuthZ enabled. You can create custom policies for AuthZ using Cedar [1].
[0] https://github.com/stacklok/toolhive, https://github.com/stacklok/toolhive/blob/main/docs/authz.md
[1] https://docs.cedarpolicy.com/
an admirable goal!
given the fallibility of LLMs, are you sure it's a good idea that they forget about it?
that seems like it has the same risks as having no security (perhaps worse, lulling people into a false sense of security)
are you sure the LLM doing security can't be tricked/attacked using any of the usual methods?
This feels like installing an "antivirus" addon into wordpress instead of updating php.
Kudos to you for making something, but if this is the next gold rush I want a piece of it too. Never took this AI, mcp, cursor business seriously because I thought of them as just poor boiler plates for web dev. I was wrong.
In the default mode, the app will interpose on the communication between, say, Claude, and a local MCP server. It will send the contents of the message (which may include the very sensitive information it is trying to protect) to a remote LLM, which you have to trust. The "scans" will be stored on a log on the server. Not to mention the potential extra delay for every MCP exchange?
This may be more secure, but is it really?
Yes, there is a delay for MCP exchange, but I imagine that most MCP calls in the future will be done in "YOLO" mode where the user prompts a large task and an agent makes 1000's of MCP calls over hours to accomplish it. This would add some time to the overall task but IMO this is a small price to pay for added security. Also, the delay will decrease over time.
Clearly you need a firewall-firewall.
..defense in depth?
I wonder if that just opens up some more attack vectors...
A fun thought experiment would be figuring how to achieve something similar using eBPF to get better control at the kernel level
Claude artifact based on Sonnet 4 analyzing the code with github MCP.
https://claude.ai/public/artifacts/30b92814-c4d2-4cb5-b08e-4...
I think in most use cases and agent would need just https and dns, both which can be MiTM monitored. In other some cases maybe also one or more of SSH, redis, MySQL, Postgres etc.
But YOLOing and letting it to connect to anything is probably not needed.
0: https://www.theguardian.com/technology/2025/may/14/elon-musk...
1: to clarify, this was after elmu hitler-saluted usa republicans on stage multiple times, not before elmu hitler-saluted usa republicans on stage multiple times