Skip to main content
Glama
SECRET4422

GuardRail MCP v2.0 (Enterprise)

by SECRET4422
README.md
<h1 align="center">GuardRail MCP</h1>
<p align="center"><b>Hybrid multi-language security analysis over MCP for AI-assisted workflows.</b></p>

<p align="center">
  <a href="https://github.com/SECRET4422/guardrail-mcp/releases"><img src="https://img.shields.io/github/v/release/SECRET4422/guardrail-mcp?color=5b9dff" alt="Release" /></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-3ddc97.svg" alt="MIT" /></a>
  <a href="https://github.com/SECRET4422/guardrail-mcp/stargazers"><img src="https://img.shields.io/github/stars/SECRET4422/guardrail-mcp?style=flat&logo=github" alt="Stars" /></a>
  <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Compatible-black?logo=anthropic" alt="MCP" /></a>
  <a href="docs/test-results.md"><img src="https://img.shields.io/badge/tests-65%20passing-3ddc97" alt="Tests" /></a>
  <a href="https://secret4422.github.io/guardrail-mcp/"><img src="https://img.shields.io/badge/website-live-3ddc97" alt="Website" /></a>
</p>

---

GuardRail exposes tools that scan source and infrastructure text for high-signal issues (secrets, dangerous APIs, injection patterns, IaC misconfigurations), with optional tree-sitter structural checks, dependency inventory/OSV, SARIF/SBOM export, and an enterprise policy gateway.

| Resource | URL |
|----------|-----|
| Website | https://secret4422.github.io/guardrail-mcp/ |
| MCPize listing | https://mcpize.com/mcp/guardrail |
| Accuracy policy | [docs/ACCURACY.md](docs/ACCURACY.md) |
| Security / threat model | [docs/SECURITY_MODEL.md](docs/SECURITY_MODEL.md) |
| Examples | [docs/EXAMPLES.md](docs/EXAMPLES.md) |
| Performance | [docs/PERFORMANCE.md](docs/PERFORMANCE.md) |
| Test results | [docs/test-results.md](docs/test-results.md) |
| Enterprise | [docs/ENTERPRISE.md](docs/ENTERPRISE.md) |

## Scope (read this)

- **Does:** static analysis of text you provide; redacts many secret-shaped substrings in excerpts.
- **Does not:** execute scanned code; replace commercial SAST/DAST; guarantee zero false positives/negatives; provide SOC2 certification by itself.
- **Website playground:** browser-only demonstration (`docs/ACCURACY.md`). Production use = Python MCP/CLI.

## Quick start

```bash
git clone https://github.com/SECRET4422/guardrail-mcp.git
cd guardrail-mcp
pip install -r requirements.txt
export PYTHONPATH=$PWD

python -m unittest discover -s tests -v
python -m guardrail --mode stdio
```

### MCP client configuration

```json
{
  "mcpServers": {
    "guardrail": {
      "command": "python",
      "args": ["-m", "guardrail", "--mode", "stdio"],
      "cwd": "/absolute/path/to/guardrail-mcp",
      "env": { "PYTHONPATH": "/absolute/path/to/guardrail-mcp" }
    }
  }
}
```

### CLI scan (ground truth)

```bash
python - <<'PY'
from pathlib import Path
from guardrail.hybrid_scan import hybrid_scan
r = hybrid_scan(
    Path("examples/vulnerable_sample.py").read_text(encoding="utf-8"),
    filename="examples/vulnerable_sample.py",
)
print(r["status"], r["security_verdict"], r["issue_count"], r.get("engines"))
PY
```

`examples/` contains **intentional insecure fixtures** for tests and demos only (labeled in-file). Values are synthetic.

## Capabilities

| Area | Implementation |
|------|----------------|
| Secrets / high-signal patterns | `rules.py`, language grids |
| Python AST + multi-hop taint | `ast_engine.py`, `taint.py` |
| Tree-sitter (optional grammars) | `treesitter_engine.py` |
| Repo / git-diff scan | `repo_scan.py`, `git_scan.py` |
| Dependencies / OSV | `deps.py` (network optional) |
| SARIF / SBOM | `sarif_export.py`, `sbom.py` |
| Enterprise auth, RBAC, policy | `guardrail/enterprise/` |
| Custom rules / plugins | `rule_engine.py`, `plugins.py` |

## Tests

```bash
PYTHONPATH=$PWD python -m unittest discover -s tests -v
```

Published summary: [docs/test-results.md](docs/test-results.md) (reproduce with the command above).

## Performance

Indicative micro-benchmarks are in [docs/PERFORMANCE.md](docs/PERFORMANCE.md) and `benchmarks/`. Re-run on your machine before relying on numbers.

## Enterprise mode

Optional multi-tenant gateway (API keys/JWT, RBAC, path sandbox, audit, rate limits). See [docs/ENTERPRISE.md](docs/ENTERPRISE.md). Do not deploy HTTP enterprise mode without authentication.

## Hosted listing

Optional commercial listing: [mcpize.com/mcp/guardrail](https://mcpize.com/mcp/guardrail).  
Self-hosting the MIT core remains free. Pricing on MCPize is set in that marketplace dashboard.

## Security

- Threat model: [docs/SECURITY_MODEL.md](docs/SECURITY_MODEL.md)  
- Vulnerability reporting: [SECURITY.md](SECURITY.md)  
- Claims policy: [docs/ACCURACY.md](docs/ACCURACY.md)

## License

MIT — [LICENSE](LICENSE).

TDQS

C2.7/5.0

Scored across 23 tools

Disambiguation4/5

Each tool has a distinct domain (cloud cost, code safety, container, infra, compliance, etc.), but some overlap exists between audit functions (e.g., audit_code_safety vs. audit_infra_security) which could cause confusion. Descriptions are clear enough to differentiate in most cases.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern with underscores (e.g., audit_cloud_cost, scan_repository). A few tools like 'full_pipeline' and 'enterprise_health' break the pattern but are still readable. Overall consistent.

Tool Count4/5

23 tools is on the high side for a single server, but each serves a specific purpose in a comprehensive security scanning and management suite. The count feels justified given the breadth of functionality.

Completeness4/5

The tool set covers scanning, auditing, compliance, reporting, policy management, and admin tasks. Minor gaps exist (e.g., no tool to delete scan history or manage users beyond tenants), but core workflows are complete.

Maintenance

ActivityMaintained
ResponsivenessNo issues