Skip to main content

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:
  1. As an MCP Server - Gateway acts as a centralized MCP server that proxies requests to other MCP servers
  2. 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

This creates the config file at:
  • macOS: ~/.enkrypt/enkrypt_mcp_config.json
  • Windows: %USERPROFILE%\.enkrypt\enkrypt_mcp_config.json

Step 3: Install for Claude Desktop

Restart Claude Desktop after installation for changes to take effect.

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

  1. Copy configuration template:
  2. 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

  1. Verify Claude Desktop config location:
  2. Check gateway key is valid in ~/.enkrypt/enkrypt_mcp_config.json
  3. Restart Claude Desktop completely

Hooks Not Triggering

  1. Verify hook scripts are executable:
  2. Test hook manually:
  3. Check logs for errors:

API Key Issues

If you see "Policy not found" errors:
  1. Disable policy_violation detector:
  2. 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