Code Firewall MCP
A structural similarity-based code security filter for MCP that blocks dangerous code patterns before they reach execution tools. It parses code into a concrete syntax tree, normalizes it to a structural skeleton, embeds it via Ollama, and compares it against a blacklist in ChromaDB to block or allow execution.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Block dangerous code patterns before execution
- Compare code structure against a blacklist of known-bad patterns
- Parse code to Concrete Syntax Tree using tree-sitter
- Embed normalized structure via Ollama for similarity checks
Source and maintenance
- Last repository push
- Latest release
- v0.7.0
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
code-firewall-mcp 0.7.0
{
"version": "0.7.0",
"transport": "stdio",
"identifier": "code-firewall-mcp",
"registryType": "pypi",
"environmentVariables": [
{
"name": "FIREWALL_DATA_DIR",
"format": "string",
"description": "Directory for storing ChromaDB data"
},
{
"name": "OLLAMA_URL",
"format": "string",
"description": "URL for Ollama server (default: http://localhost:11434)"
},
{
"name": "EMBEDDING_MODEL",
"format": "string",
"description": "Ollama embedding model (default: nomic-embed-text)"
},
{
"name": "SIMILARITY_THRESHOLD",
"format": "string",
"description": "Block threshold 0-1 (default: 0.85)"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · repository · passed · metadata changed · updated
- · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"code-firewall-mcp-mcp": {
"command": "uvx",
"args": [
"code-firewall-mcp==0.7.0"
],
"env": {
"FIREWALL_DATA_DIR": "<YOUR_FIREWALL_DATA_DIR>",
"OLLAMA_URL": "<YOUR_OLLAMA_URL>",
"EMBEDDING_MODEL": "<YOUR_EMBEDDING_MODEL>",
"SIMILARITY_THRESHOLD": "<YOUR_SIMILARITY_THRESHOLD>"
}
}
}
}Cline
{
"mcpServers": {
"code-firewall-mcp-mcp": {
"command": "uvx",
"args": [
"code-firewall-mcp==0.7.0"
],
"env": {
"FIREWALL_DATA_DIR": "<YOUR_FIREWALL_DATA_DIR>",
"OLLAMA_URL": "<YOUR_OLLAMA_URL>",
"EMBEDDING_MODEL": "<YOUR_EMBEDDING_MODEL>",
"SIMILARITY_THRESHOLD": "<YOUR_SIMILARITY_THRESHOLD>"
}
}
}
}VS Code
{
"servers": {
"code-firewall-mcp-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"code-firewall-mcp==0.7.0"
],
"env": {
"FIREWALL_DATA_DIR": "<YOUR_FIREWALL_DATA_DIR>",
"OLLAMA_URL": "<YOUR_OLLAMA_URL>",
"EMBEDDING_MODEL": "<YOUR_EMBEDDING_MODEL>",
"SIMILARITY_THRESHOLD": "<YOUR_SIMILARITY_THRESHOLD>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"code-firewall-mcp-mcp": {
"command": "uvx",
"args": [
"code-firewall-mcp==0.7.0"
],
"env": {
"FIREWALL_DATA_DIR": "<YOUR_FIREWALL_DATA_DIR>",
"OLLAMA_URL": "<YOUR_OLLAMA_URL>",
"EMBEDDING_MODEL": "<YOUR_EMBEDDING_MODEL>",
"SIMILARITY_THRESHOLD": "<YOUR_SIMILARITY_THRESHOLD>"
}
}
}
}Let your agent find its tools
Find servers like Code Firewall MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.