Skip to main content

Secure MCP gateway and quarantine for AI agent traffic — three-layer defense against prompt injection

Project description

mcp-trentina-crunchtools

Secure MCP server for quarantined web content extraction with two-layer prompt injection defense.

Tools (6)

Tool Layers Description
safe_fetch L1 Fetch URL, sanitize, return markdown. Fails on injection.
safe_read L1 Read local file, sanitize, return markdown. Fails on injection.
quarantine_fetch L1+L2 Fetch URL, sanitize, extract via Q-Agent. Warns on injection.
quarantine_read L1+L2 Read local file, sanitize, extract via Q-Agent. Warns on injection.
quarantine_scan L1+L2 Pre-flight scan: detect injection vectors WITHOUT returning content.
quarantine_stats Session stats, config, and blocklist summary.

Architecture

  • Layer 1 (Deterministic): 7-stage sanitization pipeline strips hidden HTML, invisible unicode, encoded payloads, exfiltration URLs, and LLM delimiters.
  • Layer 2 (Q-Agent): Quarantined Gemini Flash-Lite LLM for semantic content extraction — NO tools, NO memory, NO SDK.

Install

# PyPI
pip install mcp-trentina-crunchtools

# uvx (zero-install)
uvx mcp-trentina-crunchtools

# Container
podman run quay.io/crunchtools/mcp-trentina

Configuration

# Required for Layer 2 (Q-Agent)
export GEMINI_API_KEY=your-key

# Optional
export QUARANTINE_MODEL=gemini-2.0-flash-lite  # default
export QUARANTINE_FALLBACK=layer1              # or "fail"
export QUARANTINE_MAX_CONTENT=100000           # max chars to Q-Agent
export QUARANTINE_DB=/data/trentina.db          # SQLite blocklist path
export QUARANTINE_TRUST_CONFIG=~/.config/mcp-env/mcp-trentina-trust.json

Claude Code

{
  "mcpServers": {
    "mcp-trentina-crunchtools": {
      "command": "uvx",
      "args": ["mcp-trentina-crunchtools"]
    }
  }
}

License

AGPL-3.0-or-later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_trentina_crunchtools-0.5.0.tar.gz (153.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_trentina_crunchtools-0.5.0-py3-none-any.whl (76.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_trentina_crunchtools-0.5.0.tar.gz.

File metadata

  • Download URL: mcp_trentina_crunchtools-0.5.0.tar.gz
  • Upload date:
  • Size: 153.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcp_trentina_crunchtools-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e14b7d039d684676825eeb545c47cca5e935cc0134d7ea859170e540981160ef
MD5 30dc53a4d630772394ae5fac01d0f21c
BLAKE2b-256 10650f9ffa5361dd0fce7195045140d75b3ea7bc46f7ce140e89e2a1e065ac79

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_trentina_crunchtools-0.5.0.tar.gz:

Publisher: publish.yml on crunchtools/mcp-trentina

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_trentina_crunchtools-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_trentina_crunchtools-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c840bfc2141968eb3f9c6da28c0498715e6b801d5629b53b5b6e092ceb16885e
MD5 bf90adebd658900afb40e6397763d38f
BLAKE2b-256 da51d9ae1ad3cf3cfc10428b15e2775df43d7aaa496d1f220d2ec9d548360e9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_trentina_crunchtools-0.5.0-py3-none-any.whl:

Publisher: publish.yml on crunchtools/mcp-trentina

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page