Documentation Index Fetch the complete documentation index at: https://mintlify.com/enkryptai/secure-mcp-gateway/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Secure MCP Gateway can be installed locally on your machine using Python package managers (pip or uv). This approach is ideal for development, testing, or single-machine deployments.
Prerequisites
Ensure you have the following installed before proceeding:
Python : 3.8 or higher (Python 3.11+ recommended)
pip : 25.0.1 or higher
uv : 0.7.9 or higher (optional but recommended for faster installs)
Git : 2.43 or higher
MCP Client : Claude Desktop, Cursor, or Claude Code
Verify Prerequisites
# Check Python version
python --version
# Expected: Python 3.11.0 or higher
# Check pip version
pip --version
# Expected: pip 25.0.1 or higher
# Check uv version (optional)
uv --version
# Expected: uv 0.7.9 or higher
# Install uv if not present
pip install uv
Installation Methods
pip (Recommended)
uv (Faster)
Git Clone (Development)
Step 1: Create Virtual Environment Create an isolated Python environment to avoid conflicts with system packages: macOS/Linux
Windows (CMD)
Windows (PowerShell)
# Create virtual environment
python -m venv .secure-mcp-gateway-venv
# Activate virtual environment
source .secure-mcp-gateway-venv/bin/activate
Your prompt should now show (.secure-mcp-gateway-venv) indicating the virtual environment is active.
Step 2: Install Package Install the Secure MCP Gateway from PyPI: pip install secure-mcp-gateway
This installs:
Core gateway server (gateway.py)
MCP client (client.py)
CLI tool (secure-mcp-gateway)
All required dependencies (FastMCP, Redis client, OpenTelemetry, etc.)
Step 3: Generate Configuration Generate the default configuration file: secure-mcp-gateway generate-config
This creates:
macOS/Linux : ~/.enkrypt/enkrypt_mcp_config.json
Windows : %USERPROFILE%\.enkrypt\enkrypt_mcp_config.json
The config includes:
Auto-generated API keys
Default project and user
Example echo server configuration
Plugin configurations (auth, guardrails, telemetry)
Step 4: Install for MCP Client Register the gateway with your MCP client: Claude Desktop
Cursor
Claude Code
secure-mcp-gateway install --client claude-desktop
Important : Restart your MCP client after installation for changes to take effect.
Step 5: Verify Installation Check that the gateway is running by opening your MCP client and looking for:
Server Name : “Enkrypt Secure MCP Gateway”
Status : Connected (green indicator)
Available Tools : 6 gateway management tools
Step 1: Create Virtual Environment with uv Using uv provides significantly faster package installation: # Create virtual environment
uv venv .secure-mcp-gateway-venv
# Activate virtual environment
source .secure-mcp-gateway-venv/bin/activate # macOS/Linux
.secure-mcp-gateway-venv\Scripts\activate # Windows
Step 2: Install with uv # Install pip and uv in the virtual environment
python -m ensurepip
python -m pip install uv
# Install gateway package
uv pip install secure-mcp-gateway
Step 3: Generate Configuration secure-mcp-gateway generate-config
Step 4: Install for MCP Client # Choose your client
secure-mcp-gateway install --client claude-desktop
# OR
secure-mcp-gateway install --client cursor
# OR
secure-mcp-gateway install --client claude-code
uv typically installs packages 10-100x faster than pip due to its Rust-based implementation.
Step 1: Clone Repository git clone https://github.com/enkryptai/secure-mcp-gateway
cd secure-mcp-gateway
Step 2: Create Virtual Environment uv venv
source .venv/Scripts/activate # macOS/Linux
.venv\Scripts\activate # Windows
Step 3: Install Dependencies # Install pip and uv in venv
python -m ensurepip
python -m pip install uv
# Install project dependencies
uv pip install -r requirements.txt
# Verify MCP CLI installed
mcp version
# Expected: MCP version 1.13.1 or higher
Step 4: Run Setup Script cd scripts
chmod +x * .sh
./setup.sh
This script:
Creates config file with auto-generated keys
Replaces placeholders with actual paths
Installs gateway in Claude Desktop
Restart Claude Desktop after running setup script.
Configuration File Structure
The generated config file includes:
{
"common_mcp_gateway_config" : {
"enkrypt_log_level" : "INFO" ,
"enkrypt_use_remote_mcp_config" : false ,
"enkrypt_mcp_use_external_cache" : false ,
"enkrypt_cache_host" : "localhost" ,
"enkrypt_cache_port" : 6379 ,
"enkrypt_tool_cache_expiration" : 4 ,
"enkrypt_gateway_cache_expiration" : 24 ,
"timeout_settings" : {
"default_timeout" : 30 ,
"guardrail_timeout" : 15 ,
"tool_execution_timeout" : 60
}
},
"plugins" : {
"auth" : {
"provider" : "local_apikey" ,
"config" : {}
},
"guardrails" : {
"provider" : "enkrypt" ,
"config" : {
"api_key" : "YOUR_ENKRYPT_API_KEY" ,
"base_url" : "https://api.enkryptai.com"
}
},
"telemetry" : {
"provider" : "opentelemetry" ,
"config" : {
"url" : "http://localhost:4317" ,
"insecure" : true
}
}
},
"mcp_configs" : { ... },
"projects" : { ... },
"users" : { ... },
"apikeys" : { ... }
}
MCP Client Configuration
After installation, the gateway is registered in your client’s config:
Claude Desktop (macOS)
Claude Desktop (Windows)
Cursor
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers" : {
"Enkrypt Secure MCP Gateway" : {
"command" : "mcp" ,
"args" : [
"run" ,
"/Users/user/.../secure_mcp_gateway/gateway.py"
],
"env" : {
"ENKRYPT_GATEWAY_KEY" : "2W8UupCkazk4SsOcSu_..." ,
"ENKRYPT_PROJECT_ID" : "3c09f06c-..." ,
"ENKRYPT_USER_ID" : "6469a670-..."
}
}
}
}
Verification Steps
Check Gateway Status
Open your MCP client and verify the gateway appears in the server list with a connected status.
Test Tool Discovery
In your MCP client, ask: List all available servers and their tools
You should see the gateway’s 6 management tools and any configured MCP servers.
Test Echo Server
The default config includes an echo server. Test it with: Call the echo tool with message "Hello Gateway"
Check Logs
Logs are written to:
macOS/Linux : ~/.enkrypt/logs/
Windows : %USERPROFILE%\.enkrypt\logs\
Check for errors: tail -f ~/.enkrypt/logs/gateway.log
Uninstalling
To remove the gateway:
# Deactivate virtual environment
deactivate
# Remove virtual environment
rm -rf .secure-mcp-gateway-venv # macOS/Linux
rmdir /s .secure-mcp-gateway-venv # Windows
# Remove configuration (optional)
rm -rf ~/.enkrypt # macOS/Linux
rmdir /s %USERPROFILE% \. enkrypt # Windows
# Remove from MCP client config manually
# Edit claude_desktop_config.json or mcp.json
# Remove "Enkrypt Secure MCP Gateway" entry
Troubleshooting
Gateway Not Appearing in Client
Verify config file exists:
ls ~/.enkrypt/enkrypt_mcp_config.json
Check client config file has gateway entry
Restart MCP client completely
Check client logs for connection errors
Import Errors
# Reinstall dependencies
pip install --force-reinstall secure-mcp-gateway
# Or with uv
uv pip install --reinstall secure-mcp-gateway
Permission Errors
# macOS/Linux - ensure config directory is writable
chmod -R u+w ~/.enkrypt
# Windows - run as Administrator if needed
Python Version Issues
# Verify Python version
python --version
# Use python3 explicitly if needed
python3 -m venv .secure-mcp-gateway-venv
python3 -m pip install secure-mcp-gateway
Next Steps
Add MCP Servers Configure GitHub, Slack, or other MCP servers
Enable Guardrails Protect your servers with input/output guardrails
Docker Deployment Deploy with Docker for production environments
CLI Commands Manage gateway with CLI commands