Block malicious code patterns before they reach execution tools using structural similarity detection. For developers building AI agents or code-generation systems who need a semantic firewall layer.
io.github.egoughnour/code-firewall-mcp
Local install
STDIO
No auth required
How models use it and what it is built for.
Block malicious code patterns before they reach execution tools using structural similarity detection. For developers building AI agents or code-generation systems who need a semantic firewall layer.
Local install — runs as a subprocess.
Configuration this server reads at startup.
Directory for storing ChromaDB data
URL for Ollama server (default: http://localhost:11434)
Ollama embedding model (default: nomic-embed-text)
Block threshold 0-1 (default: 0.85)
Directory for storing ChromaDB data
URL for Ollama server (default: http://localhost:11434)
Ollama embedding model (default: nomic-embed-text)
Block threshold 0-1 (default: 0.85)
Where to find authoritative docs and source for Egoughnour Code Firewall.
Paste any of these into Agent Studio after connecting Egoughnour Code Firewall.
Common questions about connecting and running Egoughnour Code Firewall.
How does code-firewall-mcp detect malicious code patterns?
It uses structural similarity-based filtering with Ollama embeddings to compare incoming code against known malicious patterns stored in ChromaDB. Code exceeding the similarity threshold (default 0.85) is blocked before reaching execution tools.
What Ollama setup do I need to run this?
You need a running Ollama server (default http://localhost:11434) and an embedding model installed. The default is nomic-embed-text, but you can configure EMBEDDING_MODEL to use a different model. Set OLLAMA_URL if your server runs on a different host.
How do I tune the firewall sensitivity?
Adjust the SIMILARITY_THRESHOLD environment variable (0–1 scale, default 0.85). Lower values block more patterns; higher values are more permissive. Store your malicious pattern database in FIREWALL_DATA_DIR for ChromaDB persistence.
Can I use this with Claude or other AI models?
Yes—code-firewall-mcp is an MCP server that acts as a semantic filter between your AI agent and code execution tools. Connect it via stdio transport to intercept and validate code before it runs.
What happens if I don't have Ollama running?
The server will fail to initialize embeddings. Ensure Ollama is running and accessible at the URL specified in OLLAMA_URL, and that your chosen EMBEDDING_MODEL is downloaded in Ollama before starting code-firewall-mcp.
MCP Playground runs 10,000+ hosted MCP servers — GitHub, Linear, Notion, Stripe, Sentry and more — across Claude, GPT, Gemini, DeepSeek and 60+ AI models. Compare model answers side-by-side, save agent presets, share runs. Zero install.
Open Agent StudioJudges Panel
45 judges that evaluate AI-generated code for security, cost, and quality with built-in AST.
Addozhang Nexus
Query Sonatype Nexus Repository (OSS/Pro) for Maven, Python, and Docker artifacts
Cyanheads MCP Ts Template
TypeScript template for building MCP servers with declarative tooling, observability, and auth.
Chernistry Bernstein
Declarative agent orchestration for engineering teams