MCP server
MCP-Bastion
Security middleware for MCP. Blocks prompt injection, PII leakage, and resource…
Runs locallyStatus and history
- Pricing
- Open source
- Runs
- Locally
- Version
- 5.1.0
- Listing updated
- 6 days ago
About MCP-Bastion
MCP-Bastion is an open-source MCP server. It runs locally on your machine and is started by your AI client.
Security middleware for MCP. Blocks prompt injection, PII leakage, and resource exhaustion.
Install
Run in a terminal
claude mcp add mcp-bastion -- uvx mcp-bastion-pythonAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-bastion": {
"command": "uvx",
"args": [
"mcp-bastion-python"
]
}
}
}Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-bastion": {
"command": "uvx",
"args": [
"mcp-bastion-python"
]
}
}
}Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:
Add to .vscode/mcp.json
{
"servers": {
"mcp-bastion": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-bastion-python"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-bastion": {
"command": "uvx",
"args": [
"mcp-bastion-python"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-bastion": {
"command": "uvx",
"args": [
"mcp-bastion-python"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Pricing
Open source
MCP-Bastion FAQ
Is MCP-Bastion free?
Yes. MCP-Bastion is open source, so you can use and self-host it for free.
How do I add MCP-Bastion to Claude Code?
Run this command in your terminal: claude mcp add mcp-bastion -- uvx mcp-bastion-python
Where this comes from
- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.