# mcp-bastion: Self-Healing, Secure MCP Server Proxy

> Keeps your MCP servers connected and blocks tool poisoning and rug-pull attacks, with no changes to your servers.

mcp-bastion: Self-Healing, Secure MCP Server Proxy is a free AI agent skill on Agensi by Gowthaman Arumugam, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Gowthaman Arumugam](https://www.agensi.io/creators/gowthaman-arumugam)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-16
- Security: scan passed (2026-10-16); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mcp-bastion-self-healing-secure-mcp-server-proxy
- Tags: llm-ops, mcp, node-js, security, automation

## About this skill

### The problem

When an MCP server crashes or disconnects mid-session, your agent just sees "No such tool available". It can't tell a dropped server from a tool that never existed, and it can't reconnect. You have to restart things by hand.

Third-party MCP servers bring a second risk. A server can look harmless when you install it, then change a tool's definition later, or hide instructions in a tool description that steer your agent.

### What this skill does

This skill teaches your agent to set up and use **mcp-bastion**, an open-source proxy that sits between your AI client and your MCP servers.

- **Self-healing connections.** Bastion health-checks every server and reconnects automatically with backoff. Your agent gets `bastion__status` and `bastion__reconnect` so it can find and fix a dropped server itself.
- **Runtime security, on by default.** Bastion pins every tool definition and blocks a tool that changes after it was pinned (a "rug pull"). It also flags poisoned tool descriptions, injection in tool arguments, tool shadowing across servers and leaked secrets in results.
- **Audit trail (opt-in).** Bastion records a structured event for every tool call, mapped to the NIST AI RMF and the OWASP LLM Top 10, and sends it to a file, a webhook or OpenTelemetry.
- **No changes to your servers.** You move your existing server entries into one config file. To undo, restore your old client config.

The skill also tells the agent how to behave: reconnect once and report if it still fails, never work around a security block, and leave clearing a blocked tool to you.

### Works with

Claude Code, Cursor, Claude Desktop, Cline, Windsurf and any MCP client. The skill includes the config file location for each one.

### Requirements

- Node.js 20 or newer
- At least one MCP server you already use

### Free and open source

mcp-bastion is free under the Apache-2.0 licence. Its security coverage is measured on the open mcp-defense-bench benchmark.

Created and maintained by **Gowthaman Arumugam**.

- GitHub: https://github.com/Gowthaman90/mcp-bastion
- npm: https://www.npmjs.com/package/mcp-bastion

## Requires

- Node.js 20+
- Bastion MCP
- MCP server

npx fetches mcp-bastion from npm automatically. You need at least one existing MCP server.

## Known limitations

Requires Node.js 20+. Agent cannot bypass rug pull blocks. Absolute paths required for config files. Best-effort redaction for sensitive arguments.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the mcp-bastion: Self-Healing, Secure MCP Server Proxy skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does mcp-bastion improve the reliability of my current MCP setup?

It sits between your AI client and your MCP servers. It health-checks each server and reconnects crashed local servers automatically with backoff. It also gives your agent bastion__status and bastion__reconnect, so it can check a dropped server and recover it instead of failing with “No such tool available”.

### Which AI agents and IDEs are compatible with this skill?

Any MCP client, including Claude Code, Cursor, Claude Desktop, Cline, Windsurf and VS Code Copilot. You need Node.js 20 or newer to run mcp-bastion.

### What is the setup process for migrating my existing MCP servers?

The agent copies your existing server entries, unchanged, into a bastion.config.json file. It then replaces them in your client config with one bastion entry that runs npx -y mcp-bastion --config <path>. After you restart the client, it checks that every server shows as connected with bastion__status. Reconnection is automatic. To undo, restore your original client config.

### What is the difference between the 'strict' and 'observe' security profiles?

There are three profiles. observe only warns and never blocks, which is useful for a trial week. balanced is the default: it blocks high-confidence attacks such as rug pulls, argument and command injection, and cross-server exfiltration, and warns on heuristic findings such as poisoned descriptions. strict blocks on every finding, including the heuristic ones.

### What exactly is included with the purchase of this skill?

This skill is free. You get a SKILL.md that teaches your agent when to use mcp-bastion, how to set it up for your client, and how to respond when a server drops or a call is blocked. mcp-bastion itself is free and open source (Apache-2.0). npx downloads it from npm the first time it runs.

### Can the AI agent automatically override a 'rug pull' block if a server updates?

No, by design. Clearing a rug-pull block is a security decision, so the agent has no tool for it. Otherwise a manipulated agent could approve the very tool it was blocked from. You review the changed tool definition yourself. If it’s legitimate, restart Bastion and it re-pins the current definitions.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
