MCP server/other

mcpwall MCP Server

Deterministic security proxy for MCP tool calls — iptables for MCP.

★ 2behrensd/mcpwall ↗by behrensdupdated
1

Add it to Claude Code

claude mcp add mcpwall -- npx -y mcpwall -- npx -y @modelcontextprotocol/server-filesystem /Users/me/projects
2

Make your agent remember this setup

mcpwall's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Blocks sensitive file access like .ssh/ and .env
  • Prevents dangerous commands such as rm -rf and reverse shells
  • Scans for secret leakage using regex and entropy analysis
  • Logs all tool calls and responses in a JSON Lines audit trail
  • Deterministic rule enforcement with zero AI or cloud dependencies

Try it

Initialize mcpwall to secure my existing MCP server configurations.
Wrap my filesystem MCP server with mcpwall to block access to .ssh and .env files.
Test my current tool call rules using mcpwall check.
Configure mcpwall with the strict security profile for my company laptop.
Original README from behrensd/mcpwall

mcpwall

iptables for MCP. Blocks dangerous tool calls, scans for secret leakage, logs everything. No AI, no cloud, pure rules.

Sits between your AI coding tool (Claude Code, Cursor, Windsurf) and MCP servers, intercepting every JSON-RPC message and enforcing YAML-defined policies.

Why

MCP servers have full access to your filesystem, shell, databases, and APIs. When an AI agent calls tools/call, the server executes whatever the agent asks — reading SSH keys, running rm -rf, exfiltrating secrets. There's no built-in policy layer.

mcpwall adds one. It's a transparent stdio proxy that:

  • Blocks sensitive file access.ssh/, .env, credentials, browser data
  • Blocks dangerous commandsrm -rf, pipe-to-shell, reverse shells
  • Scans for secret leakage — API keys, tokens, private keys (regex + entropy)
  • Scans server responses — redacts leaked secrets, blocks prompt injection patterns, flags suspicious content
  • Logs everything — JSON Lines audit trail of every tool call and response
  • Uses zero AI — deterministic rules, no LLM decisions, no cloud calls
  • Test rules without running the proxymcpwall check gives instant pass/fail on any tool call

Install

npm install -g mcpwall

Or use directly with npx:

npx mcpwall -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir

Quick Start

Option 1: Docker MCP Toolkit

If you use Docker MCP Toolkit (the most common setup), change your MCP config from:

{
  "mcpServers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": ["mcp", "gateway", "run"]
    }
  }
}

To:

{
  "mcpServers": {
    "MCP_DOCKER": {
      "command": "npx",
      "args": ["-y", "mcpwall", "--", "docker", "mcp", "gateway", "run"]
    }
  }
}

That's it. mcpwall now sits in front of all your Docker MCP servers, logging every tool call and blocking dangerous ones. No config file needed — sensible defaults apply automatically.

Option 2: Interactive setup

npx mcpwall init

This finds your existing MCP servers in Claude Code, Cursor, Windsurf, and VS Code configs and wraps them. Optionally pick a security profile:

npx mcpwall init --profile company-laptop  # stricter rules for managed machines
npx mcpwall init --profile strict          # deny-by-default whitelist mode

Option 3: Manual wrapping (any MCP server)

Change your MCP config from:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
    }
  }
}

To:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y", "mcpwall", "--",
        "npx", "-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"
      ]
    }
  }
}

Option 4: Wrap a specific server

npx mcpwall wrap filesystem

How It Works

┌──────────────┐    stdio     ┌──────────────┐    stdio     ┌──────────────┐
│  Claude Code │ ──────────▶  │   mcpwall    │ ──────────▶  │  Real MCP    │
│  (MCP Host)  │ ◀──────────  │   (proxy)    │ ◀──────────  │   Server     │
└──────────────┘              └──────────────┘              └──────────────┘
                               ▲ Inbound rules               │
                               │ (block dangerous requests)   │
                               │                              │
                               └── Outbound rules ◀───────────┘
                                   (redact secrets, block injection)

Inbound (requests):

  1. Intercepts every JSON-RPC request on stdin
  2. Parses tools/call requests — extracts tool name and arguments
  3. Walks rules top-to-bottom, first match wins
  4. Allow: forward to real server
  5. Deny: return JSON-RPC error to host, log, do not forward

Outbound (responses):

  1. Parses every response from the server before forwarding
  2. Evaluates against outbound_rules (same first-match-wins semantics)
  3. Allow: forward unchanged
  4. Deny: replace response with blocked message
  5. Redact: surgically replace secrets with `[REDACTED BY MCPW

Frequently Asked Questions

What are the key features of mcpwall?

Blocks sensitive file access like .ssh/ and .env. Prevents dangerous commands such as rm -rf and reverse shells. Scans for secret leakage using regex and entropy analysis. Logs all tool calls and responses in a JSON Lines audit trail. Deterministic rule enforcement with zero AI or cloud dependencies.

What can I use mcpwall for?

Protecting local development environments from malicious AI agent behavior. Preventing accidental exfiltration of API keys and private credentials. Enforcing security policies on managed company laptops. Auditing all interactions between AI coding tools and local system resources.

How do I install mcpwall?

Install mcpwall by running: npm install -g mcpwall

What MCP clients work with mcpwall?

mcpwall works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep mcpwall docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest