egoughnour avatar

Code Firewall Mcp

egoughnour/code-firewall-mcp

A structural pattern matcher that sits between Claude and code execution tools like rlm_exec. It parses code into syntax trees via tree-sitter, normalizes away identifiers and literals to expose the underlying structure, embeds the result through Ollama, then checks similarity against a ChromaDB blacklist of known-bad patterns. The idea is that os.system("rm -rf /") and os.system("ls") have identical structure, so you can catch dangerous patterns regardless of specific arguments. You'd use this when giving Claude access to shell or exec tools and want a secondary filter beyond the model's own judgment. Ships with setup tools for Ollama, blacklist management via firewall_blacklist, and both file and string checking methods. Threshold defaults to 0.85 similarity but you can tune it.

tools
11
transport
STDIO
env vars
4
last updated
Jan 19, 2026

Tools

11 tools

Public tool metadata for what this MCP can expose to an agent.

firewall_system_checkCheck system requirements — verify macOS, Apple Silicon, RAM

Check system requirements — verify macOS, Apple Silicon, RAM

No parameter schema in public metadata yet.

firewall_setup_ollamaInstall via Homebrew — managed service, auto-updates

Install via Homebrew — managed service, auto-updates

No parameter schema in public metadata yet.

firewall_setup_ollama_directInstall via direct download — no sudo, fully headless

Install via direct download — no sudo, fully headless

No parameter schema in public metadata yet.

firewall_ollama_statusCheck Ollama availability — verify embeddings are ready

Check Ollama availability — verify embeddings are ready

No parameter schema in public metadata yet.

firewall_checkCheck if a code file is safe to pass to execution tools.

Check if a code file is safe to pass to execution tools.

No parameter schema in public metadata yet.

firewall_check_codeCheck code string directly (no file required).

Check code string directly (no file required).

No parameter schema in public metadata yet.

firewall_blacklistAdd a dangerous pattern to the blacklist.

Add a dangerous pattern to the blacklist.

No parameter schema in public metadata yet.

firewall_record_deltaRecord near-miss variants to sharpen the classifier.

Record near-miss variants to sharpen the classifier.

No parameter schema in public metadata yet.

firewall_list_patternsList patterns in the blacklist or delta collection.

List patterns in the blacklist or delta collection.

No parameter schema in public metadata yet.

firewall_remove_patternRemove a pattern from blacklist or deltas.

Remove a pattern from blacklist or deltas.

No parameter schema in public metadata yet.

firewall_statusGet firewall status and statistics.

Get firewall status and statistics.

No parameter schema in public metadata yet.

Sponsors

Configuration

FIREWALL_DATA_DIR

Directory for storing ChromaDB data

OLLAMA_URL

URL for Ollama server (default: http://localhost:11434)

EMBEDDING_MODEL

Ollama embedding model (default: nomic-embed-text)

SIMILARITY_THRESHOLD

Block threshold 0-1 (default: 0.85)

Readme

Details

Repository
github.com/egoughnour/code-firewall-mcp
Category
Security & Pentesting
Package
code-firewall-mcp
Transport
STDIO
Registry
MCP registry, active

More from egoughnour

Related Security & Pentesting MCP servers

View all
1kloudle avatarKloudle Cloud Security Scannerio.github.kloudle/cloud-security-scannerAWS cloud security scanners for AI agents — S3, IAM, EC2, EKS, RDS, CloudTrail, CloudWatch Logs0stars
2mdfifty50-boop avatarAgent Securitymdfifty50-boop/agent-security-mcpSecurity scanning and threat detection for AI agents0stars
3pandadad0214 avatarPanda Web Security Toolspandadad0214/panda-web-security-toolsSite/email/agent safety and monitors: SPF/DKIM, SEO, change + RSS monitors, hidden-AI, WHOIS (7).0stars
4robotfleet-hq avatarSecurity Orchestrarobotfleet-hq/security-orchestraMulti-agent MCP platform for data centers and critical power.0stars
5ronin93 avatarGrindFree Agent Securityronin93/grindfree-agent-securityPay-per-call agent security (x402): injection, tools, shell/SQL, memory, leaks, docs, safe web reads0stars
6andrasfe avatarVulnicheckandrasfe/vulnicheckHTTP MCP Server for comprehensive Python vulnerability scanning and security analysis.11stars