Overview
Secure MCP Gateway allows you to add multiple MCP servers to your configuration and access them through a unified interface. This guide covers everything from basic server addition to advanced configurations with OAuth, environment variables, and tools.Prerequisites
- Gateway installed and configured
- MCP server details (command, arguments, dependencies)
- For remote servers: Server URL and authentication credentials
- For OAuth servers: OAuth client credentials
Adding Your First Server
Using the CLI
The simplest way to add a server is using theconfig add-server command:
Using JSON Configuration
You can also manually edit the configuration file at~/.enkrypt/enkrypt_mcp_config.json:
Common MCP Servers
GitHub MCP Server
Add the official GitHub MCP server with NPX:Multiple arguments are passed as comma-separated values in
--args. The = sign is required when args start with -.Filesystem MCP Server
Brave Search MCP Server
Advanced Configuration
Servers with Environment Variables
Pass environment variables using the--env flag with JSON:
Servers with Tool Restrictions
Restrict which tools are exposed from a server:How tool restrictions work
How tool restrictions work
When you specify tools in the config:
- Only listed tools with
"enabled": truewill be discovered and accessible - All other tools from the server will be hidden
- If
tools: {}(empty), all tools are discovered (default behavior) - This is useful for security: limit access to dangerous operations
Remote MCP Servers
Using mcp-remote
For servers that expose HTTP/SSE endpoints:With Custom Headers
For remote servers requiring authentication headers:OAuth-Enabled Servers
For servers requiring OAuth 2.0/2.1 authentication, see the OAuth Setup Guide for complete details.Quick Example
Server Management
List All Servers in a Config
Get Server Details
Update Server Configuration
Remove a Server
Verification
Test Server Connection
After adding a server, verify it’s working by discovering tools:1
Restart Claude Desktop
Close and reopen Claude Desktop to load the updated configuration.
2
List all servers
In Claude, ask:Your new server should appear in the list.
3
Discover tools
Ask Claude to:This tests the server’s ability to respond to tool discovery requests.
4
Test a tool
Try executing a simple tool:
Check Gateway Logs
For debugging, check the gateway logs in the Claude Desktop log directory: macOS:Troubleshooting
Server Not Appearing
Check config file syntax
Check config file syntax
Validate your configuration:
Verify server command is accessible
Verify server command is accessible
Test the command manually:
Check environment variables
Check environment variables
Ensure required environment variables are set in the server config:
Restart Claude Desktop
Restart Claude Desktop
Configuration changes require a restart:
- Close Claude Desktop completely
- Wait 5 seconds
- Reopen Claude Desktop
Tool Discovery Fails
- Check server logs: Look for error messages in the MCP logs
- Test independently: Run the server outside the gateway to verify it works
- Verify transport: Ensure server supports stdio transport
- Check permissions: Verify file paths and execute permissions
Authentication Errors
- API keys: Verify environment variables contain valid keys
- OAuth: Check client credentials and token URL
- Tokens: Ensure tokens haven’t expired
Best Practices
Use Descriptive Names
Name servers clearly:
github-prod, database-dev, search-stagingDocument Dependencies
Include installation instructions in the description field
Separate Environments
Use different configs for dev/staging/production
Restrict Tools
Limit tool access to only what’s needed for security
Use Environment Variables
Never hardcode credentials; always use env vars
Test Before Deployment
Validate servers in development configs first
Example: Complete Production Setup
Here’s a complete example of a production configuration with multiple servers:Next Steps
Configure Guardrails
Add input/output protection to your servers
OAuth Setup
Configure OAuth authentication for remote servers
External Cache
Set up Redis/KeyDB for improved performance
Custom Plugins
Create your own auth and guardrail plugins