mcp-gatekeeper
Verified Safeby takeshy
Overview
MCP server enabling AI assistants to securely execute shell commands with granular access control and sandboxing.
Installation
./mcp-gatekeeper-server --root-dir=/home/user/projects --mode=http --addr=:8080 --db=gatekeeper.dbEnvironment Variables
- MCP_GATEKEEPER_API_KEY
Security Notes
The server's primary function is shell command execution, which is inherently high-risk. However, mcp-gatekeeper implements robust, multi-layered security controls to mitigate these risks. Key measures include: - **Mandatory directory sandboxing (`--root-dir`)**: All operations are restricted to a specified root directory, with symlink resolution to prevent escapes. - **Glob-based argument restrictions**: Fine-grained control over allowed command arguments, crucial for preventing command injection. - **Multiple sandbox modes (bubblewrap, WASM, none)**: - `bubblewrap` provides strong namespace isolation, making it highly secure for native binaries. - `wasm` mode uses wazero runtime for maximum isolation, preventing system calls and network access. - The `none` mode is acknowledged as less secure, offering only path validation. - **API Key-based Access Control**: API keys are generated with strong randomness, stored as bcrypt hashes, and displayed only once at creation. - **Environment Variable Filtering**: Allowed environment variables are configurable per API key, preventing sensitive information leakage. - **Network Access Restriction**: Both `bubblewrap` and `wasm` sandboxes explicitly block network access for executed commands. - **Audit Logging**: All command requests and their execution results are logged for review, regardless of policy decisions. - **Rate Limiting**: Configurable rate limiting for the HTTP API adds another layer of protection against abuse. No 'eval' or malicious patterns were identified in the provided source code. The implementation uses standard and secure Go practices for command execution (`os/exec`) and cryptographic hashing (`bcrypt`).
Similar Servers
wcgw
Empowering chat applications to code, build, and run on your local machine by providing tightly integrated shell and code editing tools.
mcp-server-code-execution-mode
This server enables LLM agents to execute Python code in a highly secure, isolated container environment, facilitating complex multi-tool orchestration and data analysis with minimal LLM context token usage.
ssh-mcp-server
Bridging AI assistants to remote SSH server operations for command execution, file transfer, and server status retrieval via the Model Context Protocol (MCP).
toolhive-studio
ToolHive is a desktop application (Electron UI) for discovering, deploying, and managing Model Context Protocol (MCP) servers in isolated containers, and connecting them to AI agents and clients.