Skip to main content

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

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:
// ~/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

1

Check Gateway Status

Open your MCP client and verify the gateway appears in the server list with a connected status.
2

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.
3

Test Echo Server

The default config includes an echo server. Test it with:
Call the echo tool with message "Hello Gateway"
4

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

  1. Verify config file exists:
    ls ~/.enkrypt/enkrypt_mcp_config.json
    
  2. Check client config file has gateway entry
  3. Restart MCP client completely
  4. 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

Build docs developers (and LLMs) love