Security middleware for MCP. Blocks prompt injection, PII leakage, and resource exhaustion.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
README Β· Documentation Β· Demos Β· Dashboard / Observability Β· Multi-language Β· Benchmark Β· License Β· Security
Current release: 5.1.0 Β· Docker v5.1.0 Β· 26 PyPI packages Β· CHANGELOG
| Go to | Link |
|---|---|
| Docs / demos | https://vaquarkhan.github.io/MCP-Bastion/ Β· product tour video Β· integrations |
| Benchmark / security deck (PDF) | MCP-Security-Deck-v3.pdf Β· raw download |
| Documentation handbook | https://vaquarkhan.github.io/MCP-Bastion/guide/handbook.html |
| Demos (attacks, dashboard, payloads, all languages) | https://vaquarkhan.github.io/MCP-Bastion/guide/demos.html |
| Dashboard & observability (OTEL optional) | https://vaquarkhan.github.io/MCP-Bastion/guide/observability.html |
| Multi-language suite | https://vaquarkhan.github.io/MCP-Bastion/guide/multi-language.html Β· suite repo |
| MCP Test Harness (sister product β CI gate for MCP servers) | https://github.com/vaquarkhan/mcp-test-harness Β· use with Bastion E2E |
| Docs hub | https://vaquarkhan.github.io/MCP-Bastion/guide/ |
| Measured benchmarks (reproducible) | docs/BENCHMARKS.md |
The Zero-Trust control plane for MCP agents. Your agent can call databases, APIs, and shell tools. One bad prompt can leak PII; one runaway loop can burn your API budget in minutes; three agents on one server with no identity boundary is a confused-deputy incident waiting to happen. MCP-Bastion wraps your MCP server with local guardrails: agent IAM, supply-chain checksums, injection blocking, PII redaction, and denial-of-wallet caps, under 5ms overhead, with no third-party safety API.
Guiding rule: Stay a zero-infra, drop-in library - the guardrail brain that composes with any gateway, not a gateway itself. Strategy: docs/ZERO_INFRA_STRATEGY.md.
Slide deck (share with evaluators): MCP-Security-Deck-v3.pdf β security + FinOps proof pack (direct download).
| Gate | Result | How to reproduce |
|---|---|---|
| Injection heuristics | 100% attack block Β· 0% benign FP on the published corpus | pytest tests/test_injection_efficacy.py Β· docs/BENCHMARKS.md |
| Tool catalog scan | Injection / secrets / homoglyphs / shadow tools / nested weak schemas | mcp-bastion scan examples/fixtures/tools-poisoned.json |
| FinOps | Up to ~99.7% output-budget savings Β· ~85% fewer discovery tokens | docs/BENCHMARKS.md |
| Toxic-flow taint | Session PII/secret β egress tool with URL/email args blocked in-process | toxic_flow in bastion.yaml Β· docs/THREAT_MODEL.md |
| Phase | What | Command |
|---|---|---|
| Scan | Static tool-definition checks before deploy (injection, secrets, homoglyphs, fingerprint drift, schema preconditions) | mcp-bastion scan tools.json |
| Audit | Local MCP client-config risk report (over-broad tools, standing credentials, filesystem servers) | mcp-bastion audit |
| Test | Integrated red-team against bastion.yaml + pair with MCP Test Harness in CI | mcp-bastion redteam Β· docs/BASTION_AND_TEST_HARNESS.md |
| Enforce | Runtime middleware on every MCP method | secure_fastmcp(mcp) or bastion.yaml |
scan vs audit - different inputs, different questions
mcp-bastion scan | mcp-bastion audit | |
|---|---|---|
| Looks at | A tool catalog (tools.json / tools/list export) | MCP client configs on disk (mcp.json, Claude Desktop config, etc.) |
| Asks | βIs this tool metadata poisoned or drifted?β | βWhat can agents already reach on this machine?β |
| Finds | Injection in descriptions, secrets in schemas, homoglyphs, fingerprint drift, weak/unbounded inputSchema shapes | Over-broad tool grants (*), standing credentials in env, filesystem-server hints |
| When | Before you ship or attach a serverβs tools (CI / pre-deploy) | Before you tighten policy on a laptop or workspace (local hygiene) |
They complement each other: audit the host surface, then scan the tools you attach. Neither replaces runtime enforce.
mcp-bastion scan also accepts --skills DIR for offline agent skill-file checks. Dependency CVEs: mcp-bastion osv-refresh then mcp-bastion osv-scan (local DB default; --online opt-in, fail-open).
mcp-bastion scan - client-side static scanner; no cloud, no ML download
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-bastion-2)<a href="https://allmcps.com/mcp/mcp-bastion-2"><img src="https://allmcps.com/api/badge/mcp-bastion-2?style=directory" alt="MCP Bastion on AllMCPs" /></a>