Observed since 20 Oct, 23:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Security gateway for MCP (Model Context Protocol) server connections
Security gateway that proxies MCP (Model Context Protocol) server connections with real-time scanning, audit logging, and policy enforcement.
Part of the AgentSec suite -- open-source security primitives for AI agents.
pip install agentsec-gateway
Premium: Get IP reputation database, advanced data flow analytics, and multi-server policy orchestration at zazmatt.gumroad.com/l/hjpwk
# Patch .mcp.json to route all MCP servers through the gateway
mcp-gateway install
# That's it. All MCP traffic is now scanned and logged.
Claude Code MCP Gateway MCP Server
| | |
|--- JSON-RPC request ---->| |
| |-- scan for secrets ---->|
| |-- scan for injections ->|
| |-- log to audit trail -->|
| |--- forward request ---->|
| | |
| |<--- response -----------|
| |-- scan for leakage ---->|
| |-- log to audit trail -->|
|<--- forward response ----| |
The gateway wraps each MCP server command in .mcp.json so all stdio traffic passes through a transparent proxy. It scans for:
../etc/passwd, ~/.ssh/ style attacks| Command | Description |
|---|---|
mcp-gateway install | Patch .mcp.json to route through gateway |
mcp-gateway uninstall | Restore original .mcp.json |
mcp-gateway proxy --server NAME -- CMD | Run as proxy (internal, called by patched config) |
mcp-gateway scan | List configured servers and their status |
mcp-gateway audit [-n 20] [--server NAME] | View audit log |
mcp-gateway report | Generate security report (reputation + data flow) |
mcp-gateway status | Show install status and server list |
Create .mcp-gateway/policy.yaml to define per-server policies:
servers:
filesystem:
allowed_tools: ["read_*", "list_*", "search_*"]
blocked_tools: ["write_*", "delete_*"]
max_calls_per_minute: 30
data_classification: internal
gmail:
allowed_tools: ["gmail_search*", "gmail_read*"]
blocked_tools: ["gmail_create_draft", "gmail_send*"]
max_calls_per_minute: 10
data_classification: confidential
| Field | Type | Default | Description |
|---|---|---|---|
allowed_tools | list[str] | [] (all) | Glob patterns for allowed tools |
blocked_tools | list[str] | [] | Glob patterns for blocked tools |
max_calls_per_minute | int | 60 | Rate limit per server |
data_classification | str | internal | public, internal, confidential |
../, /etc/passwd, ~/.ssh/ access attemptsBuilt on agentsec-core for scanning, policy, and audit primitives. Uses synchronous threading for the stdio proxy (no asyncio complexity).
| Feature | Free (OSS) | Premium |
|---|---|---|
| Transparent MCP proxy | Yes | Yes |
| Secret scanning (23 patterns) | Yes | Yes |
| Prompt injection detection | Yes | Yes |
| Tamper-proof audit log | Yes | Yes |
| IP reputation database | -- | Yes |
| Data flow analytics dashboard | -- | Yes |
| Multi-server policy orchestration | -- | Yes |
| Rate limiting with burst control | -- | Yes |
| Priority support | -- | Yes |
pip install -e ".[dev]"
pytest
ruff check .
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 6 Apr 2026 | 6 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:5c95e39e42cb70077e56d35749e36acfb3f187a578c3bd882ce87f268b8e39a5