Enables the execution of containerized MCP servers, particularly used for running the GitHub MCP server and potentially other tool integrations.
Used as part of the gateway server implementation to handle authentication, tool discovery, and request forwarding between MCP clients and servers.
Provides tools for interacting with GitHub repositories, allowing users to list files and access repository information via GitHub's API.
Supports optional external caching functionality to improve performance when caching tool discovery results and gateway configurations.
Enkrypt AI Secure MCP Gateway
Overview
This Secure MCP Gateway is built with authentication, automatic tool discovery, caching, and guardrail enforcement.
It sits between your MCP client and MCP servers. So, by it's nature it itself also acts as an MCP server as well as an MCP client :)
When your MCP client connects to the Gateway, it acts as an MCP server. When the Gateway connects to the actual MCP server, it acts as an MCP client.
Table of Contents
- 1. Features 🚀
- 2. High level steps of how the MCP Gateway works 🪜
- 3. Prerequisites 🧩
- 4. Gateway Setup 👨💻
- 5. Verify Installation and check the files generated ✅
- 6. Edit the Gateway config as needed ✏️
- 7. (Optional) Add GitHub MCP Server to the Gateway 🤖
- 8. (Optional) Protect GitHub MCP Server and Test Echo Server 🔒
- 9. Recommendations for using Guardrails 💡
- 10. Other tools available 🔧
- 11. Deployment Patterns 🪂
- 12. Uninstall the Gateway 🗑️
- 13. Troubleshooting 🕵
- 14. Known Issues being worked on 🏗️
- 15. Known Limitations ⚠️
- 16. Contribute 🤝
1. Features
Below are the list of features Enkrypt AI Secure MCP Gateway provides:
- Authentication: We use Unique Key to authenticate with the Gateway. We also use Enkrypt API Key if you want to protect your MCPs with Enkrypt Guardrails
- Ease of use: You can configure all your MCP servers locally in the config file or better yet in Enkrypt (Coming soon) and use them in the Gateway by using their name
- Dynamic Tool Discovery: The Gateway discovers tools from the MCP servers dynamically and makes them available to the MCP client
- Restrict Tool Invocation: If you don't want all tools to be accessible of a an MCP server, you can restrict them by explicitly mentioning the tools in the Gateway config so that only the allowed tools are accessible to the MCP client
- Caching: We cache the user gateway config and tools discovered from various MCP servers locally or in an external cache server like KeyDB if configured to improve performance
- Guardrails: You can configure guardrails for each MCP server in Enkrypt both on input side (before sending the request to the MCP server) and output side (after receiving the response from the MCP server)
- Logging: We log every request and response from the Gateway locally in your MCP logs and also forward them to Enkrypt (Coming soon) for monitoring. This enables you to see all the calls made in your account, servers used, tools invoked, requests blocked, etc.
1.1 Guardrails
Input Protection: Topic detection, NSFW filtering, toxicity detection, injection attack prevention, keyword detection, policy violation detection, bias detection, and PII redaction (More coming soon like system prompt protection, copyright protection, etc.)
Output Protection: All input protections plus adherence checking and relevancy validation (More coming soon like hallucination detection, etc.) We also auto unredact the response if it was redacted on input.
2. High level steps of how the MCP Gateway works
- Your MCP client connects to the Secure MCP Gateway server with API Key (handled by
src/secure_mcp_gateway/gateway.py
). - Gateway server fetches gateway config from local
enkrypt_mcp_config.json
file or remote Enkrypt Auth server (Coming soon).- It caches the config locally or in an external cache server like KeyDB if configured to improve performance.
- If input guardrails are enabled, request is validated before the tool call (handled by
src/secure_mcp_gateway/guardrail.py
).- Request is blocked if it violates any of the configured guardrails and the specific detector is configured to block.
- Requests are forwarded to the Gateway Client (handled by
src/secure_mcp_gateway/client.py
). - The Gateway client forwards the request to the appropriate MCP server (handled by
src/secure_mcp_gateway/client.py
). - The MCP server processes the request and returns the response to the Gateway client.
- If it was a discover tools call, the Gateway client caches the tools locally or in an external cache server like KeyDB if configured. It then forwards the response to the Gateway server.
- The Gateway server receives the response from the Gateway client and if output guardrails are enabled, it validates the response against the configured guardrails (handled by
src/secure_mcp_gateway/guardrail.py
).- Response is blocked if it violates any of the configured guardrails and the specific detector is configured to block.
- The Gateway server forwards the response back to the MCP client if everything is fine.
3. Prerequisites
Git 2.43
or higherPython 3.11
or higher installed on your system and is accessible from the command line using eitherpython
orpython3
commandpip 25.0.1
or higher is installed on your system and is accessible from the command line using eitherpip
orpython -m pip
commanduv 0.7.9
or higher is installed on your system and is accessible from the command line using eitheruv
orpython -m uv
command
- Check if Python, pip and uv are installed
- If any of the below commands fail, please refer the respective documentation to install them properly
- Install Claude Desktop as the MCP Client from their website if you haven't already and login to it
- If you are using Linux and cannot run any unofficial version of Claude Desktop, you can use any supported MCP Client to test the Gateway. If it does not support mcp cli
mcp install
command, then go through the scripts code and run the commands supported manually.
- If you are using Linux and cannot run any unofficial version of Claude Desktop, you can use any supported MCP Client to test the Gateway. If it does not support mcp cli
- Any other dependencies required for the MCP servers we want to proxy requests to
- Follow the instructions of the respective MCP server to install its dependencies
- Like
Node.js
,npx
,docker
, etc.
- (Optional) A cache server like KeyDB installed and running (If you want to cache externally and not locally)
If you want to protect your MCPs with Enkrypt Guardrails, you need to do the following:
- Create a new account if you don't have one. It's free! 🆓 No credit card required 💳🚫
- An
ENKRYPT_API_KEY
which you can get from Enkrypt Dashboard Settings - To protect your MCPs with Guardrails, you can use the default sample Guardrail
Sample Airline Guardrail
to get started or you can create your own custom Guardrail - To configure custom Guardrails, you need to either login to Enkrypt AI App or use the APIs/SDK
4. Gateway Setup
4.1 Local Installation with pip
4.1.1 Download and Install the Package
- Activate a virtual environment
- Install the package. For more info see https://pypi.org/project/secure-mcp-gateway/
4.1.2 Run the Generate Command
- This generates the config file at
~/.enkrypt/enkrypt_mcp_config.json
on macOS and%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json
on Windows
4.1.3 Example of the generated config file
- This is an example of the default configuration file generated by the CLI on macOS:
- This is an example of the default configuration file generated by the CLI on Windows:
4.1.4 Install the Gateway for Claude Desktop
- Run the following command to install the gateway for Claude:
- This will register Enkrypt Secure MCP Gateway with Claude Desktop.
- NOTE: Please restart Claude Desktop after installation
4.1.5 Example of the Claude Desktop Config after installation
~/Library/Application Support/Claude/claude_desktop_config.json
%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json
4.1.6 Install the Gateway for Cursor
- Run the CLI Install Command for Cursor
- This automatically updates your ~/.cursor/mcp.json (on Windows it is at: %USERPROFILE%.cursor\mcp.json) with the correct entry.
- Although it is not usually required to restart, if you see it in loading state for a long time, please restart Cursor
~/.cursor/mcp.json
%USERPROFILE%\.cursor\mcp.json
4.2 Local Installation with git clone
4.2.1 Clone the repo, setup virtual environment and install dependencies
- Clone the repository:
- Install Python dependencies:
- Verify mcp cli got installed successfully:
4.2.2 Run the setup script
- This script creates the config file at
~/.enkrypt/enkrypt_mcp_config.json
on macOS and%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json
on Windows based onsrc/secure_mcp_gateway/example_enkrypt_mcp_config.json
file - It replaces
UNIQUE_GATEWAY_KEY
andUNIQUE_UUID
with auto generated values and also replacesDUMMY_MCP_FILE_PATH
with the actual path to the test MCP filetest_mcps/echo_mcp.py
- It also installs the MCP client in Claude Desktop
- NOTE: Please restart Claude Desktop after running the setup script to see the Gateway running in Claude Desktop
4.2.3 Setup Other MCP Clients
- You can navigate to cursor's Global MCP file at
~/.cursor/mcp.json
on Linux/macOS or%USERPROFILE%\.cursor\mcp.json
on Windows- If you would like to use at a Project level place it inside your project. For details see Cursor's docs
- You can also navigate to the file Via cursor's UI by clicking on
settings
gear icon on the top right - Click on
MCP
and then click onAdd new global MCP server
which takes you to themcp.json
file - Example
mcp.json
file opened in the editor - Once the file is opened at Global or Project level, you can copy paste the same config we used in
Claude Desktop
. For reference, you can refer to Installation - 5.2 Example MCP config file generated 📄- Be sure to use your own file that was generated by the
setup
script in Installation - 4.2.2 Run the setup script 📥. Please do not copy paste the example config file in this repo.
- Be sure to use your own file that was generated by the
- See Verify Cursor section to verify the MCP server is running in Cursor
4.3 Docker Installation
4.3.1 Build the Docker Image
4.3.2 Generate the config file
- This creates a config file in the
~/.enkrypt/docker/enkrypt_mcp_config.json
file on macOS/Linux and%USERPROFILE%\.enkrypt\docker\enkrypt_mcp_config.json
file on Windows.
4.3.3 Install the Gateway in Claude Desktop
- You can find the Claude config location at the below locations in your system. For reference see Claude docs.
- macOS:
~/Library/Application Support/Claude
- Windows:
%APPDATA%\Claude
- macOS:
4.3.4 Example Claude Desktop config file
4.3.5 Install the Gateway in Cursor
- You can find the Cursor config location at the below locations
- macOS:
~/.cursor
- Windows:
%USERPROFILE%\.cursor
- macOS:
4.4 Remote Installation
- 🌐 (Coming soon)
5. Verify Installation and check the files generated
5.1 Verify Claude Desktop
- To verify Claude installation, navigate to
claude_desktop_config.json
file by following these instructions- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
5.2 Example MCP config file generated
~/Library/Application Support/Claude/claude_desktop_config.json
%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json
5.3 Restart Claude Desktop to run the Gateway
- After restarting, navigate to Claude Desktop
Settings
- Click on
Developer
->Enkrypt Secure MCP Gateway
- You can also click on the settings icon below the search bar to see the Gateway in available
- Click on
Enkrypt Secure MCP Gateway
to see the list of tools available - You can check Claude logs while asking Claude to do something to see the Gateway in action
- Example 🍎 Linux/macOS log path:
~/Library/Application Support/Claude/logs/mcp-server-Enkrypt Secure MCP Gateway.log
- Example 🪟 Windows log path:
%USERPROFILE%\AppData\Roaming\Claude\logs\mcp-server-Enkrypt Secure MCP Gateway.log
- Example 🍎 Linux/macOS log path:
5.4 Example prompts
list all servers, get all tools available and echo test
- This uses a test MCP server
echo_server
which is intest_mcps/echo_mcp.py
- This uses a test MCP server
- We can also combine multiple prompts into one that trigger multiple tool calls at once
- Example:
echo test and also echo best
- Example:
echo "hello; ls -la; whoami"
- This could be a malicious prompt but because no guardrails are enabled, it will not be blocked
5.5 Example config file generated
- Example
enkrypt_mcp_config.json
generated by thesetup
script in~/.enkrypt/enkrypt_mcp_config.json
on macOS and%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json
on Windows - If you ran docker command to install the Gateway, the config file will be in
~/.enkrypt/docker/enkrypt_mcp_config.json
on macOS and%USERPROFILE%\.enkrypt\docker\enkrypt_mcp_config.json
on Windows
5.6 Verify Cursor
- You can see the MCP server in the list of MCP servers in Cursor by navigating to
~/.cursor/mcp.json
and also by clicking on the settings icon on the top right and then clicking onTools & Integrations
or on theMCP
tab - Generally restarting is not needed but if it is in loading state for a long time, please restart Cursor
- Now you can chat with the MCP server.
- Example prompts:
- (Click
Run Tool
when Cursor asks you to) list all servers, get all tools available and echo test
- This uses a test MCP server
echo_server
which is intest_mcps/echo_mcp.py
- This uses a test MCP server
- (Click
- Example prompts:
6. Edit the Gateway config as needed
- Important:
- We need to restart Claude Desktop after editing the config file
- To make all new tools accessible, please use prompt "
list all servers, get all tools available
" for the MCP Client to discover all new tools. After this the MCP Client should be able to use all tools of the servers configured in the Gateway config file
- You can add many MCP servers inside the
mcp_config
array of this gateway config- You can look here for example servers
- You can also try the Enkrypt MCP Server
- Example:
- If you want a different set of MCP servers for a separate client/user, you can generate a new unqiue
key
and uniqueUUID
by looking at thesetup
scripts and add it to thegateways
section of the config file- Example:
{ gateways: { UNIQUE_GATEWAY_KEY_1: {...}, UNIQUE_GATEWAY_KEY_2: {...}, ... }, ... }
- Make sure you also set different
UNIQUE_UUID
inside the various gateways
- Example:
- Set
enkrypt_log_level
toDEBUG
to get more detailed logs insidecommon_mcp_gateway_config
part of the config file- This defaults to
INFO
- This defaults to
- Now, inside
gateways
array, insidemcp_config
array, for each individual MCP server config, you can set the following:server_name
: A name of the MCP server which we connect todescription
(optional): A description of the MCP serverconfig
: The config for the MCP server as instructed by the MCP server's documentation- Generally you have the below keys in the config:
command
: The command to run the MCP serverargs
: The arguments to pass to the commandenv
: The environment variables to set for the command
- Generally you have the below keys in the config:
tools
: The tools exposed by the MCP server- Either set explicit tools to restrict access to only the allowed tools or leave it empty
tools": {}
for the Gateway to discover all tools dynamically - Tools need to be given a name and a description like
"tools": { "dummy_echo": "Echo a message" }
- Either set explicit tools to restrict access to only the allowed tools or leave it empty
- Set
enkrypt_guardrails_enabled
totrue
in yourcommon_mcp_gateway_config
- Get your
enkrypt_api_key
from Enkrypt Dashboard and add it tocommon_mcp_gateway_config
section of the config file enkrypt_use_remote_mcp_config
is used to fetch MCP server config from Enkrypt server remotely (Coming soon)- Please use
false
for now - This enables you to configure and manage MCP gateway config in Enkrypt Dashboard in a centralized place (Coming soon)
- Please use
- If you have any external cache server like KeyDB running, you can set
enkrypt_mcp_use_external_cache
totrue
in yourcommon_mcp_gateway_config
- Set other relevant keys related to cache in your
common_mcp_gateway_config
- Set other relevant keys related to cache in your
enkrypt_tool_cache_expiration
(in hours) decides how long the tools discovered from the MCP servers are cached locally or in the external cache serverenkrypt_gateway_cache_expiration
(in hours) decides how long the gateway config is cached locally or in the external cache server. This is useful when we integrate this with Enkrypt Auth server (Coming soon)enkrypt_async_input_guardrails_enabled
false
by default- Async mode is not recommended for tools that perform actions which cannot be undone
- Because the tool call is made parallel to guardrails call, it can't be blocked if input guardrails violations are detected
- Useful for servers that return just info without performing actions i.e., only read operations
enkrypt_async_output_guardrails_enabled
(Coming soon)- This makes output side guardrails calls asynchronously to save time
- i.e., Guardrails detect call, relevancy check, adherence check, PII unredaction, etc. are made in parallel after getting the response from the MCP server
- Inside each MCP server config, you can set the following:
input_guardrails_policy
: Use this if we plan to use Enkrypt Guardrails on input sidepolicy_name
: Name of the guardrails policy that you have created in the Enkrypt App or using the API/SDKenabled
: Whether to enable guardrails on the input side or not. This isfalse
in the example config fileadditional_config
: Additional config for the guardrails policypii_redaction
: Whether to redact PII in the request sent to the MCP server or not- If
true
, this also auto unredacts the PII in the response from the MCP server
- If
block
: List of guardrails to block- Possible values in the array are:
topic_detector, nsfw, toxicity, pii, injection_attack, keyword_detector, policy_violation, bias
system_prompt_protection, copyright_protection
(Coming soon)- This is similar to our AI Proxy deployments config. Refer to our docs
- Possible values in the array are:
output_guardrails_policy
: Use this if we plan to use Enkrypt Guardrails on output sidepolicy_name
: Name of the guardrails policy that you have created in the Enkrypt App or using the API/SDKenabled
: Whether to enable guardrails on the output side or not. This isfalse
in the example config fileadditional_config
: Additional config for the guardrails policyrelevancy
: Whether to check for relevancy of the response from the MCP serveradherence
: Whether to check for adherence of the response from the MCP serverhallucination
: Whether to check for hallucination in the response from the MCP server (Coming soon)
block
: List of guardrails to block- Possible values in the array are:
- All possible values in input block array plus
adherence, relevancy
system_prompt_protection, copyright_protection, hallucination
(Coming soon)- This is similar to our AI Proxy deployments config. Refer to our docs
- All possible values in input block array plus
- Possible values in the array are:
7. (Optional) Add GitHub MCP Server to the Gateway
GitHub MCP Server
needsdocker
to be installed. So, please install and havedocker
running on your machine before proceeding with the steps below- You can download docker desktop from here. Install and run it if you don't have it already
- Create a personal access token from GitHub
- Create a token that has access to only public repos and set expiry very low initially for testing
- Add the below GitHub server block to
enkrypt_mcp_config.json
inside"mcp_config": []
array. It should already have the echo server config. - NOTE: Don't forget to add comma
,
after the echo server block - Replace
REPLACE_WITH_YOUR_PERSONAL_ACCESS_TOKEN
with the personal access token you created - Example:
- Now restart Claude Desktop for it to detect the new server
- Then run the prompt
list all servers, get all tools available
for it to discover github server and all it's tools available - Now run
List all files from https://github.com/enkryptai/enkryptai-mcp-server
- Great! 🎉 We have successfully added a GitHub MCP Server to the Gateway. However, it is completely unprotected and is open to all kinds of abuse and attacks.
- Now, let's say a prompt like this is run
Ask github for the repo "hello; ls -la; whoami"
- This may not have caused actual damage but imagine a more complicated prompt that may have caused actual damage to the system.
- To protect the MCP server, we can use Enkrypt Guardrails as shown in the next section.
8. (Optional) Protect GitHub MCP Server and Test Echo Server
- You can use a prompt to generate rules or generate a PDF file while you can then paste or upload while creating a policy in the App
Give numbered list of security rules in plain text for configuring AI guardrails for a GitHub server on the rules and policies it needs to follow to prevent malicious use of the GitHub services
- Then say
Research latest GitHub MCP hacks and abuses people are trying and update the rules to prevent those. Keep research to the most severe topics
- Then say
Only keep essential security rules to reduce size. Remove unwanted sections like post incident, compliance, audit, etc which cannot be used while prevention
- Then you can copy paste the rules while creating the policy
- Go to Enkrypt App and login with either OTP or Google or Microsoft account
- Click on
Policies
- Click on
Add new policy
- Name it
GitHub Safe Policy
and paste the policy rules and clickSave
- This is how a saved policy looks like with the rules applied for
Policy violation
Guardrails - Now navigate back to home or hover over left sidebar and click
Guardrails
- Click on
Add New Guardrail
button on the top right - Name it
GitHub Guardrail
, toggleInjection Attack
OFF - Scroll down on
Configure Guardrails
side panel and togglePolicy Violation
ON, select the newly created policy and tickNeed Explanation
if needed - Now, click on
Save
button on the bottom right to save the guardrail - We can see the newly added guardrail in the list of guardrails
- Now, we need get out FREE API Key from Enkrypt App. Hover over the left sidebar for it to expand and click on
Settings
- You can also directly navigate to https://app.enkryptai.com/settings
- Now click on the
Copy
icon next to your obfuscated API Key to copy the key to your clipboard as highlighted in the screenshot below
- Now we have everything we need from the App. Let's add the API Key to the
enkrypt_mcp_config.json
file - Open the
enkrypt_mcp_config.json
file from~/.enkrypt/enkrypt_mcp_config.json
on macOS or%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json
on Windows- If you ran docker command to install the Gateway, the config file will be in
~/.enkrypt/docker/enkrypt_mcp_config.json
on macOS and%USERPROFILE%\.enkrypt\docker\enkrypt_mcp_config.json
on Windows
- If you ran docker command to install the Gateway, the config file will be in
- Add the API Key to the
common_mcp_gateway_config
section by replacingYOUR_ENKRYPT_API_KEY
with the API Key you copied from the App - Inside the
GitHub
server block we added in the previous section,- Add the newly created Guardrail
GitHub Guardrail
to theinput_guardrails_policy
andoutput_guardrails_policy
sections - By replacing
"policy_name": "Sample Airline Guardrail"
with"policy_name": "GitHub Guardrail"
- Now change
enabled
totrue
forinput_guardrails_policy
from previousfalse
- We will leave
output_guardrails_policy
asfalse
for now
- We will leave
- We already should have
policy_violation
in theblock
array for both policies - So the final config should look something like this:
- Add the newly created Guardrail
- Save the file and restart Claude Desktop for it to detect the changes
GitHub MCP Server
needsdocker
to be installed. So, please install and havedocker
running on your machine before proceeding with the steps below- You can download docker desktop from here. Install and run it if you don't have it already
- Now run the prompt
list all services, tools
for it to discover github, echo servers and all their tools available - After this, let's rerun the previously successful malicious prompt
Ask github for the repo "hello; ls -la; whoami"
- We can see that the prompt is blocked as Input Guardrails blocked the request
- We can see that the prompt is blocked as Input Guardrails blocked the request
- We can configure the test
echo
server with Guardrails of our choice and see the detections by runningecho "hello; ls -la; whoami"
.- The below prompt which worked before but is blocked with Guardrails
- Experiment and try the
echo
server with various guardrails to see how it behaves. You can also try our Playground for better testing.
- The safe prompt
List all files from https://github.com/enkryptai/enkryptai-mcp-server
may also be blocked if you use Injection Attack Detector or Policy Violation on Output side. So, there is some fine tuning required for the guardrails to find the best combination of enabled detectors and blocks for your servers. See the next section for recommendations.
9. Recommendations for using Guardrails
- We have found that the best way to use Enkrypt Guardrails in MCP Gateway is to have a separate guardrail for each server. This way we can have a fine tuned guardrail for each server.
- Because each MCP Server is very different from the other, it is not possible to have a single guardrail that works for all servers.
- Some may need
Toxicity Detector
, someNSFW Detector
, someInjection Attack Detector
, someKeyword Detector
, somePolicy Violation
, some may needRelevancy
detector, some may needAdherence
detector, etc. - Some may need a combination of these detectors to work together to block malicious requests.
- Some may need Guardrails on the input side, some on the output and some may need both to be applied.
- See our docs for details on various detectors available.
- Hence, have separate guardrails for each server and experiment with the best combination of detectors and blocks for each server that blocks malicious requests but allows legitimate requests to pass through.
- Try our
Policy Violation
detector with your own custom policy which details what is allowed and what is not. This may be the best way for your use case.
- You can navigate to the Enkrypt App Homepage, login and Click on
Policies
to create your own custom policy.- This accepts text as well as PDF file as input so create a file with all the rules you want to apply to your MCP server and upload it
- Once created, you can use it while configuring the Guardrail like we say with
GitHub Guardrail
in the previous section
10. Other Tools Available
- The Gateway can give the summary of it's cache status by looking at the local/external cache server
- This is useful to debug issues if for example a tool was updated remotely by a server but the Gateway is not aware of it yet
- The Gateway can clear it's cache from local/external cache server
- This is useful to clear the cache if for example a tool was updated remotely by a server but the Gateway is not aware of it yet
- You can either clear all cache or specific cache by providing the
server_name
- Example:
clear cache for echo_server
- Example:
- You can also clear all cache or just the gateway cache or just the server cache
- Example:
clear all cache
,clear just gateway cache
,clear server cache for echo_server
,Clear all server cache
- Example:
11. Deployment patterns
- Local Gateway, Local Guardrails and Local MCP Server
- Local Gateway, Local MCP Server with Remote Guardrails
- Local Gateway with Remote MCP Server and Remote Guardrails
- Remote Gateway, Remote MCP Server and Remote Guardrails
11.1 Local Gateway, Local Guardrails and Local MCP Server
11.2 Local Gateway, Local MCP Server with Remote Guardrails
11.3 Local Gateway with Remote MCP Server and Remote Guardrails
11.4 Remote Gateway, Remote MCP Server and Remote Guardrails
12. Uninstall the Gateway
- To remove the Gateway from any MCP client, just remove the MCP server block
"Enkrypt Secure MCP Gateway": {...}
from the client's config file.- Restart the MCP client to apply the changes for some clients like Claude Desktop. Cursor does not require a restart.
- To uninstall the pip package, run the following command:
13. Troubleshooting
- If any calls fail in the client, please look at the mcp logs of the respective client
- See this for Claude logs location
- Example 🍎 Linux/macOS log path:
~/Library/Logs/Claude/mcp-server-Enkrypt Secure MCP Gateway.log
- Example 🪟 Windows log path:
%USERPROFILE%\AppData\Roaming\Claude\logs\mcp-server-Enkrypt Secure MCP Gateway.log
- Example 🍎 Linux/macOS log path:
- See this discussion for Cursor logs
- See this for Claude logs location
- If you see errors like
Exception: unhandled errors in a TaskGroup (1 sub-exception)
then maybe the MCP server the gateway is trying to use is not running.- So, please make sure the file it is trying to access is available
- Any pre-requisites for the MCP server to run are met like
docker
running, etc.
- If we need more detailed logs, please set the
enkrypt_log_level
todebug
in theenkrypt_mcp_config.json
file and restart the MCP client.
14. Known Issues being worked on
- Output guardrails are not being applied to non-text tool results. Support for other media types like images, audio, etc. is coming soon.
15. Known Limitations
- The Gateway does not support a scenario where the Gateway is deployed remotely but the MCP server is deployed locally (without being exposed to the internet). This is because the Gateway needs to know the MCP server's address to forward requests to it.
16. Contribute
- Look at the
TODO
file for the current work in progress and yet to be implemented features - Install the gateway locally to test your changes
- by following the Git clone steps
- or build it using
python -m build
, activate the venv and install usingpip install .
- Report or fix any bugs you encounter 😊
17. License
17.1 Enkrypt AI MCP Gateway Core
This project's core functionality is licensed under the MIT License.
For the full license text, see the LICENSE.txt
file in this repository.
17.2 Enkrypt AI Guardrails, Logo, and Branding
© 2025 Enkrypt AI. All rights reserved.
Enkrypt AI software is provided under a proprietary license. Unauthorized use, reproduction, or distribution of this software or any portion of it is strictly prohibited.
Terms of Use: https://www.enkryptai.com/terms-and-conditions
Privacy Policy: https://app.enkryptai.com/privacy-policy
Enkrypt AI and the Enkrypt AI logo are trademarks of Enkrypt AI, Inc.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A proxy server that sits between MCP clients and servers, providing authentication, tool discovery, caching, and guardrail enforcement to protect MCP servers from malicious inputs.
- Overview
- Table of Contents
- Features
- High level steps of how the MCP Gateway works
- Prerequisites
- Gateway Setup
- Verify Installation and check the files generated
- Edit the Gateway config as needed
- (Optional) Add GitHub MCP Server to the Gateway
- (Optional) Protect GitHub MCP Server and Test Echo Server
- Recommendations for using Guardrails
- Other Tools Available
- Deployment patterns
- Uninstall the Gateway
- Troubleshooting
- Known Issues being worked on
- Known Limitations
- Contribute
- License
Related MCP Servers
- AsecurityAlicenseAqualityA proxy server that unifies multiple MCP servers, enabling seamless tool, prompt, and resource management via the MetaMCP App.Last updated -1,489119TypeScriptApache 2.0
- AsecurityAlicenseAqualityPlugged.in MCP Server acts as a proxy server that combines multiple MCP servers into a single interface. It retrieves tool, prompt, and resource configurations from Plugged.in and directs requests for tools, prompts, and resources to the appropriate underlying server.Last updated -4746TypeScriptApache 2.0
- -securityAlicense-qualityA proxy service that connects MCP clients to remote MCP servers, allowing users to use server keys from MCP.so to access remote resources without running their own server.Last updated -4092TypeScriptMIT License
- -security-license-qualityProxy that aggregates multiple MCP servers and presents them as a unified interface, allowing clients to access resources from multiple servers transparently.Last updated -1TypeScript