MCP Proxy with PathJail security layer for intercepting and classifying MCP responses from upstream servers.
A malicious skill disguised as a PR-summary helper is flagged CRITICAL and blocked, while a genuine formatter passes SAFE instantly with zero LLM cost. See
demo/to regenerate.
skillgate is a security-focused MCP proxy daemon that:
- Intercepts responses from upstream MCP servers before they reach your coding agent
- Scans content for malicious patterns using hybrid classification (rules + optional LLM)
- Blocks/quarantines dangerous content based on configurable policies
- Works with any MCP client: Cursor, Claude Code, VSCode Copilot, Gemini CLI, Windsurf
pip install skillgateOr install from source:
git clone https://github.com/awsm-research/skillgate
cd skillgate
pip install -e .skillgate upstream add skills "npx @anthropic/skills serve"skillgate setup cursor
# or: skillgate setup claude-code
# or: skillgate setup copilotskillgate daemon startIntercept the vercel-labs/skills CLI so every install is pre-scanned before files reach agent directories:
# One-time: put shims ahead of real npx on PATH
skillgate install-skills-shim
export PATH="$HOME/.skillgate/bin:$PATH" # add to ~/.bashrc / ~/.zshrc
# Now this pre-scans, then runs the real installer:
npx skills add vercel-labs/agent-skills --skill some-skill -yOr call the wrapper directly (no PATH change):
skillgate skills add ./local-skills --yesFlow for add: clone/copy source → scan each SKILL.md package (rules + optional LLM) → block/quarantine on HIGH+ → otherwise delegate to npx -y skills add ….
Agent (Cursor/Claude/etc)
│
│ stdio
▼
┌─────────────────────────────────────┐
│ skillgate Daemon │
│ │
│ ┌─────────────────────────────┐ │
│ │ Response Interceptor │ │
│ │ │ │
│ │ ┌───────┐ ┌──────────┐ │ │
│ │ │ Rules │──▶│ Classify │ │ │
│ │ └───────┘ └──────────┘ │ │
│ │ │ │ │ │
│ │ ▼ ▼ │ │
│ │ ┌─────────────────────┐ │ │
│ │ │ Policy Engine │ │ │
│ │ │ block/quarantine/ │ │ │
│ │ │ warn/allow │ │ │
│ │ └─────────────────────┘ │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
│
│ stdio
▼
Upstream MCP Server (skills, filesystem, etc.)
skillgate daemon start # Start in background
skillgate daemon start -f # Start in foreground
skillgate daemon stop # Stop daemon
skillgate daemon status # Show status
skillgate daemon logs -f # Tail audit log
skillgate daemon install # Install as system serviceskillgate upstream add <name> "<command>"
skillgate upstream remove <name>
skillgate upstream listskillgate setup cursor
skillgate setup claude-code
skillgate setup copilot
skillgate setup gemini
skillgate setup windsurfskillgate scan path/to/SKILL.md
skillgate scan --recursive ./skills/skillgate quarantine list
skillgate quarantine show <hash>
skillgate quarantine approve <hash>
skillgate quarantine reject <hash>skillgate config show
skillgate config editRegex does not decide the final label. It only finds suspicious regions to shrink LLM input:
- Strict prefilter — broad regex (no doc/allowlist suppression) flags anything that looks suspicious
- No hits → SAFE, no LLM call (saves tokens)
- Hits → send excerpt payload only (fenced blocks + context windows) to the LLM
- LLM alone returns SAFE / SUSPICIOUS / MALICIOUS
use_llm: true
hybrid_prefilter_context_window: 500 # chars around each hit
hybrid_prefilter_max_snippets: 20Configuration is stored in ~/.skillgate/config.yaml:
http_port: 9847 # Optional HTTP port
use_llm: false # Enable LLM classification
llm_model: gpt-4o-mini # LLM model to use
llm_backend: openai # openai, anthropic, or ollama
log_level: INFOEnvironment variables (prefix SKILLGATE_):
export SKILLGATE_USE_LLM=true
export SKILLGATE_LLM_API_KEY=sk-...Built-in rules detect:
- Remote Code Execution:
curl|bash,wget|sh,eval(), etc. - Credential Access:
.ssh/, API keys, tokens - Prompt Injection: "ignore previous instructions", system prompt manipulation
- Path Traversal:
../../../etc/passwd - Network Threats: reverse shells, netcat listeners
Custom rules can be added in ~/.skillgate/rules/custom.yaml.
| Severity | Default Action |
|---|---|
| CRITICAL | Block |
| HIGH | Quarantine |
| MEDIUM | Warn |
| LOW | Allow |
Customize in ~/.skillgate/config.yaml:
policies:
CRITICAL:
action: block
notify: true
HIGH:
action: quarantine
require_approval: true
MEDIUM:
action: warn
annotate_response: true# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linter
ruff check .
# Type checking
mypy skillgateMIT
