Cage Security
Offline MCP server giving AI coding assistants deterministic AppSec audit tools
Cage Security is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, API
- Runs
- Locally
- Version
- 1.0.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add cage-mcp-server -- npx -y cage-mcp-serverAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"cage-mcp-server": {
"command": "npx",
"args": [
"-y",
"cage-mcp-server"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"cage-mcp-server": {
"command": "npx",
"args": [
"-y",
"cage-mcp-server"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"cage-mcp-server": {
"command": "npx",
"args": [
"-y",
"cage-mcp-server"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"cage-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"cage-mcp-server"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add cage-mcp-server -- npx -y cage-mcp-serverOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.cage-mcp-server]
command = "npx"
args = ["-y", "cage-mcp-server"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"cage-mcp-server": {
"command": "npx",
"args": [
"-y",
"cage-mcp-server"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Or run: gemini mcp add -s user cage-mcp-server npx -- -y cage-mcp-server
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "cage-mcp-server": { "command": "npx", "args": [ "-y", "cage-mcp-server" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Cage Security
Cage Security runs locally as a stdio MCP server and hands AI coding assistants a set of fixed application-security checks. Each of its ten tools wraps a separate published npm security package, covering path traversal, HTTP headers, redirects, dotenv files, cookies, ZIP archives, log redaction, CORS policies, JSON input and source snippet linting.
The server makes no network calls and does not rely on a model or remote scanner, so the same input yields the same findings. Tool input is treated as data and never executed, and ZIP archives are inspected in memory rather than extracted. Unsafe results come back as structured findings rather than tool errors.
It suits developers who use Claude Code, Codex CLI, Cursor or Windsurf and want their assistant to check redirects, cookie settings, env files or GitHub Actions snippets during coding. Findings are static guardrails and are meant to supplement code review and testing rather than prove an application secure.
Tools this server provides (10)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 10 names don't say.
From the server's own tool labels and tool names; not verified by us.
- audit_path
- Lexically resolve a path inside an absolute root and report traversal and length violations.
- audit_headers
- Validate header names and values, audit CSP and Set-Cookie strings, and compare headers with a baseline.
- audit_redirect
- Evaluate redirect targets against origin, host, protocol, query, fragment and blocked-path policy.
- audit_env
- Parse dotenv text without expansion and report secret hygiene without returning values.
- audit_cookie
- Parse Cookie headers or serialize a hardened Set-Cookie header.
- audit_zip_entries
- Inspect a small base64 ZIP archive in memory for traversal, bombs and other structural hazards.
- redact_log
- Sanitize log text or records by redacting credentials, tokens and optional PII patterns.
- audit_cors
- Lint a CORS policy and evaluate a bounded request for origin, method and credential behavior.
- audit_json
- Inspect JSON text for duplicate keys, prototype-pollution keys, depth, size and Unicode hazards.
- lint_security_code
- Scan a bounded source snippet for eval and HTML sinks, command injection, hardcoded credentials and risky CI patterns.
What it does
- Ten bounded audit tools
- Covers paths, headers, redirects, dotenv, cookies, ZIP entries, logs, CORS, JSON and code snippets.
- Offline deterministic checks
- Makes no network requests and uses no model, so repeated runs produce identical results.
- No command execution
- Tool input is never evaluated, passed to a shell or run as source code.
- Secret-aware output
- Dotenv values and cookie values are redacted, and a log redaction tool strips credentials and PII patterns.
- Strict stdio framing
- Accepts newline-delimited and Content-Length JSON-RPC framing with bounded frame and header sizes.
- Pinned npm installation
- Runs via npx with a pinned version so client setups do not pick up unexpected releases.
Good for
- Check redirect targets and origin policies while writing login or callback flows
- Lint CORS and cookie configuration before merging a web service change
- Redact sensitive values from logs before pasting them into an AI chat
- Audit JSON payloads for prototype-pollution keys and duplicate fields
- Scan a code snippet for dangerous eval or HTML sinks and risky GitHub Actions patterns
Pricing
Open source
MIT-licensed, free to install and run locally.
Cage Security FAQ
Does Cage Security send my code or data over the network?
No. The server states it makes no network requests and does not depend on a cloud API or remote scanner.
Which AI clients can use Cage Security?
The README includes setup examples for Claude Code, Codex CLI, Cursor and Windsurf.
Does Cage Security execute the code I submit?
No. Tool input is never evaluated or executed; snippets are written to a temporary file only so the linter can scan them as data.
What does a failed audit look like?
An unsafe result returns ok set to false with a list of findings. The error flag is reserved for operational failures inside the tool.
Is Cage Security free?
Yes. Cage Security is open source, so you can use and self-host it for free.
How do I add Cage Security to Claude Code?
Run this command in your terminal: claude mcp add cage-mcp-server -- npx -y cage-mcp-server
What are the best alternatives to Cage Security?
The closest alternatives to Cage Security are MCP configuration audit, MCP Security Guard, MCP Customs, MCP Server Security Scanner and AI Tool Audit.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.