Reliability + security proxy for MCP: runtime tool-security and a compliance-mapped audit trail.
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.
A reliability & security proxy for the Model Context Protocol (MCP).
Self-healing connections, runtime tool-security, and a compliance-mapped audit trail for your MCP servers.
mcp-bastion sits between your MCP client (Claude Code, Cursor, Cline, Windsurf, Zed, Claude
Desktop, or any MCP-compliant agent) and your MCP servers. It is client-agnostic β it works with
any compliant client through configuration alone, with zero client-specific code β and non-invasive:
your servers run unchanged, and removing Bastion is a one-line config revert.
π¦ Package: mcp-bastion on npm Β· ποΈ Official MCP Registry: io.github.Gowthaman90/mcp-bastion
π Security, measured: on the open, vendor-neutral mcp-defense-bench, Bastion covers 63% of the MCP attack surface (15.0/24 vectors; 11 enforced) at zero false positives β the broadest of the proxies measured.
π Launch story: Medium Β· dev.to
π€ Created & maintained by Gowthaman Arumugam β Independent Researcher. Companion benchmark: mcp-defense-bench.
When an MCP server disconnects mid-session, the agent only sees a generic "No such tool available" error β indistinguishable from a tool that never existed β and it cannot reconnect; only a human can. Long agent sessions silently lose capabilities and fail in confusing ways.
Bastion closes that gap. It health-checks every server, auto-reconnects with backoff, and β crucially β exposes control tools so the agent itself can inspect connection health and recover a dropped server without human intervention.
Bastion now spans three layers: reliability (v0.1), runtime security (v0.2 β tool pinning / rug-pull & poisoning detection), and audit & compliance (v0.3 β pluggable sinks mapped to NIST AI RMF / OWASP LLM Top 10). See the roadmap.
Today your client connects directly to each server. With Bastion, your client connects to Bastion, which connects to those same servers on your behalf β so it sits in the tool-call path and can add reliability (and, later, security) transparently.
Bastion is a standard MCP server to your client and a standard MCP client to each upstream. Because it speaks the protocol faithfully, it works with every compliant client automatically β the only per-client difference is where you put a few lines of config.
bastion__status and bastion__reconnect let the agent detect and fix
drops itself, instead of hitting an opaque "no such tool" wall.Bastion is published on npm as mcp-bastion β the
npx command below fetches it automatically, so there's nothing to install first.
1. Add Bastion to your client, pointing it at a config file:
2. List your real servers in bastion.config.json (moved verbatim from the client):
3. Restart your client. Your tools now appear namespaced (e.g. github__create_issue) alongside
Bastion's control tools. See bastion.config.example.json for the
full set of options.
π Security is on by default. Out of the box, Bastion runs the
balancedenforcement profile: it blocks high-confidence attacks (rug-pulls, argument/command injection, cross-server exfiltration) and warns on heuristic ones (description/response poisoning), while redacting leaked secrets from tool results. Setsecurity.enforcementProfiletoobserve(warn-only) orstrict(block-all), or tune any individual control β see Runtime security.
See the whole thing in action β a server crashing mid-session and healing itself:
It boots Bastion in front of a server that crashes on command, shows the agent getting an actionable
"reconnect" message instead of a cryptic error, and then the connection auto-recovering with no human
involved. To record it as a GIF: asciinema rec demo.cast -c "npm run demo" && agg demo.cast assets/demo.gif.
Bastion injects control tools so the agent can manage connections and review security itself, using only standard MCP calls:
| Tool | Purpose |
|---|---|
bastion__status | Health of every proxied server: connected / disconnected / reconnecting / failed, tool counts, last error. |
bastion__reconnect | Reconnect a named server (argument: { "server": "<name>" }) without human intervention. |
bastion__security | Per-tool security report: pin status (approved vs changed), poisoning findings, and shadowing. |
bastion__compliance | Audit summary of recent activity mapped to NIST AI RMF / OWASP LLM Top 10 (requires audit.enabled). |
Re-approval is operator-only. Clearing a rug-pull block is a security authority, so it is not an agent-callable tool β a prompt-injected agent must not be able to re-approve the very tool it was blocked from. A changed tool stays blocked until an operator clears it out-of-band;
bastion__approveis not advertised and a client call to it is refused.
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)<a href="https://allmcps.com/mcp/mcp-bastion"><img src="https://allmcps.com/api/badge/mcp-bastion?style=directory" alt="MCP Bastion on AllMCPs" /></a>