Overview
Claude Desktop is Anthropic’s desktop application that supports MCP (Model Context Protocol) servers. The Secure MCP Gateway integrates with Claude Desktop in two ways:- As an MCP Server - Gateway acts as a centralized MCP server that proxies requests to other MCP servers
- Using Hooks - Direct guardrails integration using Claude Code hooks for prompt and tool validation
Gateway Installation
Prerequisites
- Claude Desktop installed from claude.ai/download
- Python 3.11 or higher
- pip or uv package manager
Step 1: Install the Gateway
Step 2: Generate Configuration
- macOS:
~/.enkrypt/enkrypt_mcp_config.json - Windows:
%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json
Step 3: Install for Claude Desktop
Configuration Files
Claude Desktop Config
After installation, your Claude Desktop config will be updated: Location:- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Gateway Config
The gateway configuration includes MCP servers, guardrails, and authentication:Adding MCP Servers
Add servers to the gateway config using the CLI:Claude Code Hooks Integration
Claude Code (CLI-based agent) supports hooks for advanced guardrails integration.
Prerequisites
- Claude Code CLI installed
- Python 3.8+
- Enkrypt API key
Installation
Configure Guardrails
-
Copy configuration template:
-
Set your API key:
Configure Hooks
Claude Code reads hooks from~/.claude/settings.json:
Hook Types
Test the Integration
Guardrails Configuration
Available Detectors
Example Configuration
guardrails_config.json
Audit Logs
All events are logged to~/claude/hooks_logs/:
View Logs
Troubleshooting
Gateway Not Appearing in Claude Desktop
-
Verify Claude Desktop config location:
-
Check gateway key is valid in
~/.enkrypt/enkrypt_mcp_config.json - Restart Claude Desktop completely
Hooks Not Triggering
-
Verify hook scripts are executable:
-
Test hook manually:
-
Check logs for errors:
API Key Issues
If you see"Policy not found" errors:
-
Disable
policy_violationdetector: - Or create the policy in Enkrypt Dashboard
Next Steps
Add GitHub Server
Connect the GitHub MCP server through the gateway
Configure Guardrails
Set up input/output protection policies
Enable Caching
Configure Redis for external caching
View Metrics
Monitor gateway performance