Enkrypt AI Secure MCP Gateway

MCP安全风控

提供方 enkryptai

安全风控 stdio · 本地进程 OAuth 授权 社区 / 第三方 Claude DesktopClaudeCursor
查看接入方式

Enkrypt AI Secure MCP Gateway是一个位于MCP客户端和服务器之间的安全中间件,提供认证、工具发现、缓存和防护栏执行等功能,保护AI应用免受攻击和漏洞。

一句话选型结论

按资料字段整理

Enkrypt AI Secure MCP Gateway 属于安全风控类 MCP 服务器,stdio · 本地进程,OAuth 授权,可直接接入 Claude Desktop、Claude、Cursor,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式stdio · 本地进程 鉴权OAuth 授权 部署方式本地部署
GitHub 星标 53 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

安全风控
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

AI安全Python本地部署代理网关工具管理访问控制缓存加速中间件

安装与配置

stdio · 本地进程 OAuth 授权
客户端在本机拉起子进程,数据不出本机
python --version

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好OAuth 授权对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Enkrypt AI Secure MCP Gateway当前 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方enkryptai上游标注的维护方 enkryptai
分类安全风控本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式OAuth 授权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · Python本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

126.0 KB
来自项目仓库与上游目录的原文,未做删改

Enkrypt AI安全MCP网关

> 📖 特色博客文章: 在我们的最新博客中了解安全MCP网关如何防止顶级攻击和漏洞:
>
> Enkrypt的安全MCP网关和MCP扫描器如何防止顶级攻击
>
> 了解真实世界的攻击场景、安全最佳实践,以及我们的网关如何保护您的AI应用程序。

概述

此安全MCP网关具有身份验证、自动工具发现、缓存和护栏实施功能。

它位于MCP客户端和MCP服务器之间。因此,从本质上讲,它本身也充当MCP服务器和MCP客户端:)

当您的MCP客户端连接到网关时,它充当MCP服务器。当网关连接到实际的MCP服务器时,它充当MCP客户端。

  • Pypi包

  • Docker镜像

  • 另请参见:

  • CLI-Commands-Reference.md 查看命令列表及其用法

  • API参考.md 获取API终结点及其用法的列表
  • MCP网关设置笔记本 了解所有基本命令的完整演练

目录

  • 1.特点🚀
  • 2.MCP网关工作原理的高级步骤🪜
  • 3.先决条件🧩
  • 4.网关设置👨‍💻
  • 5.(可选)开放遥测设置📊
  • 6.验证安装并检查生成的文件✅
  • 7.根据需要编辑网关配置✏️
  • 8.CLI快速入门指南🖥️
  • 9.(可选)将GitHub MCP服务器添加到网关🤖
  • 9.1(可选)使用OAuth连接到MCP服务器🔐
  • 10.(可选)保护GitHub MCP服务器并测试Echo服务器🔒
  • 11.护栏使用建议💡
  • 12.其他可用工具🔧
  • 13.(可选)沙箱隔离🛡️
  • 14.部署模式🪂
  • 15.卸载网关🗑️
  • 16.故障排除🕵
  • 17.正在处理的已知问题🏗️
  • 18.已知限制⚠️
  • 19.贡献🤝
  • 20.测试🧪
  • 21.许可证

1.特点

以下是Enkrypt AI安全MCP网关提供的功能列表:

  1. 认证:我们使用唯一密钥向网关进行身份验证。如果您想使用Enkrypt Guardrails保护您的MCP,我们也使用Enkrypt API密钥。此外,安全 admin_apikey (256字符随机字符串)是为管理REST API操作自动生成的。

  2. 易用性:您可以在配置文件中本地配置所有MCP服务器,或者更好的是在Enkrypt中配置 (即将推出) 并在网关中使用它们的名称

  3. 动态工具发现:网关从MCP服务器动态发现工具,并将其提供给MCP客户端

  4. 限制工具调用:如果您不希望MCP服务器访问所有工具,可以通过在网关配置中明确提及这些工具来限制它们,以便MCP客户端只能访问允许的工具

  5. 缓存:我们在本地或外部缓存服务器(如KeyDB)中缓存从各种MCP服务器发现的用户网关配置和工具,如果配置为提高性能

  6. 护栏:您可以在输入侧(在向MCP服务器发送请求之前)和输出侧(在收到MCP服务器的响应之后)为Enkrypt中的每个MCP服务器配置护栏

  7. 日志记录:我们在本地MCP日志中记录网关的每个请求和响应,并将其转发给Enkrypt (即将推出) 用于监控。这使您能够查看帐户中进行的所有调用、使用的服务器、调用的工具、阻止的请求等。

  8. 沙箱隔离:MCP服务器可以在隔离的沙盒环境(Docker、Podman或microVM)中启动,这样受感染或恶意的服务器就无法访问主机文件系统、网络或其他资源。每个沙箱都是短暂的——每个会话创建一个沙箱,完成后销毁。

1.1护栏

输入保护: 主题检测、NSFW过滤、毒性检测、注入攻击预防、关键字检测、策略违规检测、偏见检测和PII编辑(即将推出系统提示保护、版权保护等)

输出保护: 所有输入保护,加上依从性检查和相关性验证(即将推出更多功能,如幻觉检测等)。如果响应在输入时被编辑,我们还会自动取消编辑。

1.2概念

  • MCP Config是一系列MCP服务器,如 mcp_server_1, mcp_server_2, mcp_server_3 等等

  • 每个配置都有一个唯一的ID

  • 用户是具有唯一电子邮件和ID的网关用户

  • 项目是共享MCP配置的用户集合

  • 项目有一个名称和唯一的ID

  • MCP配置可以更新,也可以由管理员指向其他配置
  • 用户可以添加到多个项目中

  • 为用户和项目组合创建API密钥

  • 用户可以为不同的项目使用不同的API密钥

  • 此API密钥用于验证用户并识别正确的项目和MCP配置

  • 看 6.5生成的配置文件示例 和 7.根据需要编辑网关配置 用于模式参考

2.MCP网关工作原理的高级步骤

🪜 Steps

  1. 您的MCP客户端使用API密钥连接到Secure MCP网关服务器(由处理 src/secure_mcp_gateway/gateway.py).

  2. 网关服务器从本地获取网关配置 enkrypt_mcp_config.json 文件或远程Enkrypt身份验证服务器 (即将推出).

  • 它在本地或外部缓存服务器(如KeyDB)中缓存配置(如果配置为提高性能)。
  1. 如果启用了输入护栏,则在工具调用之前验证请求(由 src/secure_mcp_gateway/guardrail.py).
  • 如果请求违反了任何配置的护栏,并且特定的检测器被配置为阻止,则请求将被阻止。
  1. 请求被转发到网关客户端(由 src/secure_mcp_gateway/client.py).

  2. 网关客户端将请求转发到相应的MCP服务器(由 src/secure_mcp_gateway/client.py).

  3. MCP服务器处理请求并将响应返回给网关客户端。

  4. 如果是发现工具调用,网关客户端会在本地或外部缓存服务器(如KeyDB)中缓存工具(如果已配置)。然后,它将响应转发到网关服务器。

  5. 网关服务器从网关客户端接收响应,如果启用了输出护栏,它将根据配置的护栏(由处理)验证响应 src/secure_mcp_gateway/guardrail.py).

  • 如果响应违反了任何配置的护栏,并且特定的检测器被配置为阻止,则响应将被阻止。
  1. 如果一切正常,网关服务器会将响应转发回MCP客户端。

3.先决条件

🔗 Dependencies

  • Git 2.43 或更高

  • Python 3.11 或更高版本安装在您的系统上,可以使用以下任一方式从命令行访问 python 或 python3 命令

  • pip 25.0.1 您的系统上安装了或更高版本,可以使用以下任一方式从命令行访问 pip 或 python -m pip 命令

  • uv 0.7.9 您的系统上安装了或更高版本,可以使用以下任一方式从命令行访问 uv 或 python -m uv 命令

🔍 Check versions

  • 检查是否安装了Python、pip和uv

  • 如果以下任何命令失败,请参阅相应的文档以正确安装它们```bash

------------------

Python

------------------

python --version

Example output

Python 3.13.3

If not, install python from their website and run the version check again

------------------

pip

------------------

pip --version

Example output

pip 25.0.1 from C:\Users\PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\pip (python 3.13)

If not, try the following and run the version check again

python -m ensurepip

------------------

uv

------------------

uv --version

Or run with "python -m" if uv is not found directly

If this works, use "python -m" before all uv commands from now on

python -m uv --version

Example output

uv 0.7.9 (13a86a23b 2025-05-30)

If not, try the following and run the version check again

python -m pip install uv


- 安装 **克劳德桌面版** 作为MCP客户端 他们的网站 如果您还没有,请登录

- *如果你使用的是Linux,无法运行任何 非官方版本 克劳德桌面,你可以使用 任何支持的MCP客户端 以测试网关。如果它不支持mcp-cli `mcp install` 命令,然后遍历脚本代码并手动运行支持的命令。*

- 我们希望代理请求的MCP服务器所需的任何其他依赖关系

- 按照相应MCP服务器的说明安装其依赖项

- 喜欢 `Node.js`, `npx`, `docker`等等。

- (可选)安装并运行KeyDB等缓存服务器(如果您想在外部而非本地缓存)

🔒 Optional Protection with Enkrypt Guardrails

如果您想使用Enkrypt护栏保护MCP,您需要执行以下操作:

- 如果您没有新帐户,请创建一个新帐户。它是免费的! 🆓 无需信用卡💳🚫

- 一 `ENKRYPT_API_KEY` 你可以从那里得到 Enkrypt仪表板设置

- 要使用护栏保护MCP,您可以使用默认的护栏示例 `Sample Airline Guardrail` 开始使用,或者您可以创建自己的自定义护栏

- 要配置自定义护栏,您需要登录Enkrypt AI应用程序或使用API/SDK

- 在Enkrypt AI应用程序仪表板中创建护栏✅

- 使用API创建护栏

- 使用SDK创建护栏

- 您还可以使用Enkrypt MCP服务器🤯 创建护栏并在网关中使用

## 4.网关设置

### 4.1带管道的本地安装

📦 Pip Installation Steps

#### 4.1.1下载并安装软件包

- 激活虚拟环境```bash
python -m venv .secure-mcp-gateway-venv

# Activate the virtual environment
# On Windows
.secure-mcp-gateway-venv\Scripts\activate

# On Linux/macOS
source .secure-mcp-gateway-venv/bin/activate

# Run the below to exit the virtual environment later if needed
deactivate
  • 安装软件包。有关更多信息,请参阅 https://pypi.org/project/secure-mcp-gateway/```bash
    pip install secure-mcp-gateway

#### 4.1.2运行Generate命令

- **这将在以下位置生成配置文件 `~/.enkrypt/enkrypt_mcp_config.json` 在macOS和 `%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json` 在Windows上**```bash
secure-mcp-gateway generate-config

🖨️ Example output```bash
Initializing Enkrypt Secure MCP Gateway
Initializing Enkrypt Secure MCP Gateway Common Utilities Module
Initializing Enkrypt Secure MCP Gateway Module


SYSTEM INFO:
Using Python interpreter: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Scripts\python.exe
Python version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
Current working directory: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway
PYTHONPATH: Not set


Installing dependencies...
All dependencies installed successfully.
Initializing Enkrypt Secure MCP Gateway Client Module
Initializing Enkrypt Secure MCP Gateway Guardrail Module
Error: Gateway key is required. Please update your mcp client config and try again.
Getting Enkrypt Common Configuration
config_path: C:\Users\PC.enkrypt\enkrypt_mcp_config.json
example_config_path: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\example_enkrypt_mcp_config.json
No enkrypt_mcp_config.json file found. Defaulting to example_enkrypt_mcp_config.json


ENKRYPT_GATEWAY_KEY: *NULL
enkrypt_log_level: info
is_debug_log_level: False
enkrypt_base_url: https://api.enkryptai.com
enkrypt_use_remote_mcp_config: False
enkrypt_api_key:
*_KEY
enkrypt_tool_cache_expiration: 4
enkrypt_gateway_cache_expiration: 24
enkrypt_mcp_use_external_cache: False
enkrypt_async_input_guardrails_enabled: False


External Cache is not enabled. Using local cache only.
Initializing Enkrypt Secure MCP Gateway CLI Module
Generated default config at C:\Users\PC.enkrypt\enkrypt_mcp_config.json


#### 4.1.3生成的配置文件示例

🍎 Example file in macOS

- 这是macOS上CLI生成的默认配置文件的示例:```json
{
"common_mcp_gateway_config": {
"enkrypt_log_level": "INFO",
"enkrypt_base_url": "https://api.enkryptai.com",
"enkrypt_api_key": "YOUR_ENKRYPT_API_KEY",
"enkrypt_use_remote_mcp_config": false,
"enkrypt_remote_mcp_gateway_name": "enkrypt-secure-mcp-gateway-1",
"enkrypt_remote_mcp_gateway_version": "v1",
"enkrypt_mcp_use_external_cache": false,
"enkrypt_cache_host": "localhost",
"enkrypt_cache_port": 6379,
"enkrypt_cache_db": 0,
"enkrypt_cache_password": null,
"enkrypt_tool_cache_expiration": 4,
"enkrypt_gateway_cache_expiration": 24,
"enkrypt_async_input_guardrails_enabled": false,
"enkrypt_async_output_guardrails_enabled": false,
"enkrypt_telemetry": {
"enabled": true,
"insecure": true,
"endpoint": "http://localhost:4317"
}
},
"mcp_configs": {
"fcbd4508-1432-4f13-abb9-c495c946f638": {
"mcp_config_name": "default_config",
"mcp_config": [
{
"server_name": "echo_server",
"description": "Simple Echo Server",
"config": {
"command": "python",
"args": [
"/Users/user/enkryptai/secure-mcp-gateway/venv/lib/python3.13/site-packages/secure_mcp_gateway/bad_mcps/echo_mcp.py"
]
},
"tools": {},
"input_guardrails_config": {
"enabled": false,
"guardrail_name": "Sample Airline Guardrail",
"additional_config": {
"pii_redaction": false
},
"block": [
"policy_violation"
]
},
"output_guardrails_config": {
"enabled": false,
"guardrail_name": "Sample Airline Guardrail",
"additional_config": {
"relevancy": false,
"hallucination": false,
"adherence": false
},
"block": [
"policy_violation"
]
}
}
]
}
},
"projects": {
"3c09f06c-1f0d-4153-9ac5-366397937641": {
"project_name": "default_project",
"mcp_config_id": "fcbd4508-1432-4f13-abb9-c495c946f638",
"users": [
"6469a670-1d64-4da5-b2b3-790de21ac726"
],
"created_at": "2025-07-16T17:02:00.406877"
}
},
"users": {
"6469a670-1d64-4da5-b2b3-790de21ac726": {
"email": "default@example.com",
"created_at": "2025-07-16T17:02:00.406902"
}
},
"apikeys": {
"2W8UupCkazk4SsOcSu_1hAbiOgPdv0g-nN9NtfZyg-rvYGat": {
"project_id": "3c09f06c-1f0d-4153-9ac5-366397937641",
"user_id": "6469a670-1d64-4da5-b2b3-790de21ac726",
"created_at": "2025-07-16T17:02:00.406905"
}
}
}

🪟 Example file in Windows

  • 这是Windows上CLI生成的默认配置文件的示例:```json
    {
    "common_mcp_gateway_config": {
    "enkrypt_log_level": "INFO",
    "enkrypt_base_url": "https://api.enkryptai.com",
    "enkrypt_api_key": "YOUR_ENKRYPT_API_KEY",
    "enkrypt_use_remote_mcp_config": false,
    "enkrypt_remote_mcp_gateway_name": "enkrypt-secure-mcp-gateway-1",
    "enkrypt_remote_mcp_gateway_version": "v1",
    "enkrypt_mcp_use_external_cache": false,
    "enkrypt_cache_host": "localhost",
    "enkrypt_cache_port": 6379,
    "enkrypt_cache_db": 0,
    "enkrypt_cache_password": null,
    "enkrypt_tool_cache_expiration": 4,
    "enkrypt_gateway_cache_expiration": 24,
    "enkrypt_async_input_guardrails_enabled": false,
    "enkrypt_async_output_guardrails_enabled": false,
    "enkrypt_telemetry": {
    "enabled": true,
    "insecure": true,
    "endpoint": "http://localhost:4317"
    }
    },
    "mcp_configs": {
    "fcbd4508-1432-4f13-abb9-c495c946f638": {
    "mcp_config_name": "default_config",
    "mcp_config": [
    {
    "server_name": "echo_server",
    "description": "Simple Echo Server",
    "config": {
    "command": "python",
    "args": [
    "C:\Users\\Documents\GitHub\EnkryptAI\secure-mcp-gateway\.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\bad_mcps\echo_mcp.py"
    ]
    },
    "tools": {},
    "input_guardrails_config": {
    "enabled": false,
    "guardrail_name": "Sample Airline Guardrail",
    "additional_config": {
    "pii_redaction": false
    },
    "block": [
    "policy_violation"
    ]
    },
    "output_guardrails_config": {
    "enabled": false,
    "guardrail_name": "Sample Airline Guardrail",
    "additional_config": {
    "relevancy": false,
    "hallucination": false,
    "adherence": false
    },
    "block": [
    "policy_violation"
    ]
    }
    }
    ]
    }
    },
    "projects": {
    "3c09f06c-1f0d-4153-9ac5-366397937641": {
    "project_name": "default_project",
    "mcp_config_id": "fcbd4508-1432-4f13-abb9-c495c946f638",
    "users": [
    "6469a670-1d64-4da5-b2b3-790de21ac726"
    ],
    "created_at": "2025-07-16T17:02:00.406877"
    }
    },
    "users": {
    "6469a670-1d64-4da5-b2b3-790de21ac726": {
    "email": "default@example.com",
    "created_at": "2025-07-16T17:02:00.406902"
    }
    },
    "apikeys": {
    "2W8UupCkazk4SsOcSu_1hAbiOgPdv0g-nN9NtfZyg-rvYGat": {
    "project_id": "3c09f06c-1f0d-4153-9ac5-366397937641",
    "user_id": "6469a670-1d64-4da5-b2b3-790de21ac726",
    "created_at": "2025-07-16T17:02:00.406905"
    }
    }
    }

#### 4.1.4安装克劳德桌面网关

- 运行以下命令为Claude安装网关:```bash
secure-mcp-gateway install --client claude-desktop
  • 这将在Claude Desktop上注册Enkrypt安全MCP网关。

  • 注意:请在安装后重新启动Claude Desktop

🖨️ Example output```bash
Initializing Enkrypt Secure MCP Gateway
Initializing Enkrypt Secure MCP Gateway Common Utilities Module
Initializing Enkrypt Secure MCP Gateway Module


SYSTEM INFO:
Using Python interpreter: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Scripts\python.exe
Python version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
Current working directory: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway
PYTHONPATH: Not set


Installing dependencies...
All dependencies installed successfully.
Initializing Enkrypt Secure MCP Gateway Client Module
Initializing Enkrypt Secure MCP Gateway Guardrail Module
Error: Gateway key is required. Please update your mcp client config and try again.
Getting Enkrypt Common Configuration
config_path: C:\Users\PC.enkrypt\enkrypt_mcp_config.json
example_config_path: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\example_enkrypt_mcp_config.json
Loading enkrypt_mcp_config.json file...


ENKRYPT_GATEWAY_KEY: *NULL
enkrypt_log_level: info
is_debug_log_level: False
enkrypt_base_url: https://api.enkryptai.com
enkrypt_use_remote_mcp_config: False
enkrypt_api_key:
*_KEY
enkrypt_tool_cache_expiration: 4
enkrypt_gateway_cache_expiration: 24
enkrypt_mcp_use_external_cache: False
enkrypt_async_input_guardrails_enabled: False


External Cache is not enabled. Using local cache only.
Initializing Enkrypt Secure MCP Gateway CLI Module
CONFIG_PATH: C:\Users\PC.enkrypt\enkrypt_mcp_config.json
GATEWAY_PY_PATH: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\gateway.py
client name from args: claude-desktop
Successfully installed gateway for claude-desktop
Path to gateway is incorrect. Modifying the path to gateway in claude_desktop_config.json file...
Path to gateway modified in claude_desktop_config.json file
Please restart Claude Desktop to use the gateway.


#### 4.1.5安装后的Claude桌面配置示例

🍎 Example file in macOS

- `~/Library/Application Support/Claude/claude_desktop_config.json````json
{
"mcpServers": {
"Enkrypt Secure MCP Gateway": {
"command": "mcp",
"args": [
"run",
"/Users/user/enkryptai/secure-mcp-gateway/venv/lib/python3.13/site-packages/secure_mcp_gateway/gateway.py"
],
"env": {
"ENKRYPT_GATEWAY_KEY": "2W8UupCkazk4SsOcSu_1hAbiOgPdv0g-nN9NtfZyg-rvYGat",
"ENKRYPT_PROJECT_ID": "3c09f06c-1f0d-4153-9ac5-366397937641",
"ENKRYPT_USER_ID": "6469a670-1d64-4da5-b2b3-790de21ac726"
}
}
}
}

🪟 Example file in Windows

  • `%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json````json
    {
    "mcpServers": {
    "Enkrypt Secure MCP Gateway": {
    "command": "mcp",
    "args": [
    "run",
    "C:\Users\\Documents\GitHub\EnkryptAI\secure-mcp-gateway\.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\gateway.py"
    ],
    "env": {
    "ENKRYPT_GATEWAY_KEY": "2W8UupCkazk4SsOcSu_1hAbiOgPdv0g-nN9NtfZyg-rvYGat",
    "ENKRYPT_PROJECT_ID": "3c09f06c-1f0d-4153-9ac5-366397937641",
    "ENKRYPT_USER_ID": "6469a670-1d64-4da5-b2b3-790de21ac726"
    }
    }
    }
    }

#### 4.1.6安装游标网关

- 运行Cursor的CLI安装命令```bash
secure-mcp-gateway install --client cursor
  • 这将自动用正确的条目更新您的~/.cursor/mcp.json(在Windows上,它位于:%USERPROFILE%.cursor\mcp.json)。

  • 虽然通常不需要重新启动,但如果您看到它长时间处于加载状态,请重新启动Cursor

🍎 Example file in macOS

  • `~/.cursor/mcp.json````json
    {
    "mcpServers": {
    "Enkrypt Secure MCP Gateway": {
    "command": "mcp",
    "args": [
    "run",
    "/Users/user/enkryptai/secure-mcp-gateway/venv/lib/python3.13/site-packages/secure_mcp_gateway/gateway.py"
    ],
    "env": {
    "ENKRYPT_GATEWAY_KEY": "2W8UupCkazk4SsOcSu_1hAbiOgPdv0g-nN9NtfZyg-rvYGat",
    "ENKRYPT_PROJECT_ID": "3c09f06c-1f0d-4153-9ac5-366397937641",
    "ENKRYPT_USER_ID": "6469a670-1d64-4da5-b2b3-790de21ac726"
    }
    }
    }
    }

🪟 Example file in Windows

- `%USERPROFILE%\.cursor\mcp.json````json
{
"mcpServers": {
"Enkrypt Secure MCP Gateway": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\Users\\\\Documents\\GitHub\\EnkryptAI\\secure-mcp-gateway\\.secure-mcp-gateway-venv\\Lib\\site-packages\\secure_mcp_gateway\\gateway.py"
],
"env": {
"ENKRYPT_GATEWAY_KEY": "2W8UupCkazk4SsOcSu_1hAbiOgPdv0g-nN9NtfZyg-rvYGat",
"ENKRYPT_PROJECT_ID": "3c09f06c-1f0d-4153-9ac5-366397937641",
"ENKRYPT_USER_ID": "6469a670-1d64-4da5-b2b3-790de21ac726"
}
}
}
}

4.1.7安装克劳德代码网关

克劳德代码 是Anthropic基于CLI的编码代理。它使用 claude mcp add 配置MCP服务器的命令。与使用JSON配置文件的Claude Desktop和Cursor不同,Claude Code通过自己的CLI管理MCP服务器。

> 先决条件: 这 claude CLI必须安装在您的系统上。看 Claude代码文档 用于安装。

步骤1:安装网关```bash
secure-mcp-gateway install --client claude-code


这会自动:

- 从生成的配置中读取网关密钥、项目ID和用户ID
- 跑 `claude mcp add` 具有正确的凭据和网关路径
- 向注册服务器 `--scope user` (适用于所有Claude Code项目)

**步骤2:验证服务器是否已添加**```bash
claude mcp list

你应该看看 Enkrypt-Secure-MCP-Gateway 在列表中。

步骤3:使用Claude Code中的网关

启动Claude Code并尝试:```
list all servers, get all tools available


Manual alternative (if you prefer to run claude mcp add directly)

从生成的中获取您的凭据 `enkrypt_mcp_config.json` 以及网关路径:```bash
python -c "import secure_mcp_gateway.gateway; print(secure_mcp_gateway.gateway.__file__)"

然后手动添加网关:```bash
claude mcp add --transport stdio --env ENKRYPT_GATEWAY_KEY=YOUR_GATEWAY_KEY --env ENKRYPT_PROJECT_ID=YOUR_PROJECT_ID --env ENKRYPT_USER_ID=YOUR_USER_ID --scope user Enkrypt-Secure-MCP-Gateway -- mcp run /path/to/secure_mcp_gateway/gateway.py


> **注:** 服务器名称必须使用连字符或下划线——Claude Code不允许名称中有空格。

### 4.2使用git clone进行本地安装

🗂️ Git Clone Installation Steps

#### 4.2.1克隆仓库,设置虚拟环境并安装依赖项

- 克隆存储库:```bash
git clone https://github.com/enkryptai/secure-mcp-gateway

cd secure-mcp-gateway

⚡ Activate a virtual environment```bash

------------------

Create a virtual environment

------------------

uv venv

Example output

Using CPython 3.13.3 interpreter at: C:\Users\PC\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\python.exe
Creating virtual environment at: .venv
Activate with: .venv\Scripts\activate

------------------

Activate the virtual environment

------------------

For 🍎 Linux/macOS, run the following

source ./.venv/Scripts/activate

For 🪟 Windows, run the following

..venv\Scripts\activate

After activating, you should see (enkrypt-secure-mcp-gateway) before the file path in the terminal

Example:

(enkrypt-secure-mcp-gateway) %USERPROFILE%\Documents\GitHub\EnkryptAI\secure-mcp-gateway>

------------------

Install pip in the virtual environment

------------------

python -m ensurepip

------------------

Install uv in the virtual environment

------------------

python -m pip install uv


- 安装Python依赖项:```bash
uv pip install -r requirements.txt

  • 验证mcp-cli是否已成功安装:```bash
    mcp version

Example output

MCP version 1.9.2


#### 4.2.2运行安装脚本

- 此脚本在以下位置创建配置文件 `~/.enkrypt/enkrypt_mcp_config.json` 在macOS和 `%USERPROFILE%\.enkrypt\enkrypt_mcp_config.json` 基于Windows `src/secure_mcp_gateway/example_enkrypt_mcp_config.json` 文件

- 它取代了 `UNIQUE_GATEWAY_KEY` 以及其他 `UUIDs` 具有自动生成的值,并替换 `DUMMY_MCP_FILE_PATH` 带有测试MCP文件的实际路径 `bad_mcps/echo_mcp.py`

- 它还将MCP客户端安装在Claude Desktop中

- *注意:请在运行安装脚本后重新启动Claude Desktop,以查看网关在Claude Desktop中的运行情况*```bash

# On 🍎 Linux/macOS run the below
cd scripts
chmod +x *.sh
./setup.sh

# On 🪟 Windows run the below
cd scripts
setup.bat

# Now restart Claude Desktop to see the Gateway running

🖨️ Example output```bash

Setting up Enkrypt Secure MCP Gateway enkrypt_mcp_config.json config file

1 file(s) copied.
Generated unique gateway key: WTZOpoU1mXJz8b_ZJQ42DuSXlQCSCtWOn3FX0jG8sO_FKYNJetjYEgSluvhtBN8_
Generated unique uuid: 7920749a-228e-47fe-a6a9-cd2d64a2283b
DUMMY_MCP_FILE_PATH: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway\src\secure_mcp_gateway\bad_mcps\echo_mcp.py


Setup complete. Please check the enkrypt_mcp_config.json file in the ~.enkrypt directory and update with your MCP server configs as needed.


Installing Enkrypt Secure MCP Gateway with gateway key and dependencies

mcp is installed. Proceeding with installation...
ENKRYPT_GATEWAY_KEY: WTZOpoU1mXJz8b_ZJQ42DuSXlQCSCtWOn3FX0jG8sO_FKYNJetjYEgSluvhtBN8_
The system cannot find the path specified.
Package names only:
Dependencies string for the cli install command:
Running the cli install command: mcp install gateway.py --env-var ENKRYPT_GATEWAY_KEY=WTZOpoU1mXJz8b_ZJQ42DuSXlQCSCtWOn3FX0jG8sO_FKYNJetjYEgSluvhtBN8_
Initializing Enkrypt Secure MCP Gateway
Initializing Enkrypt Secure MCP Gateway Common Utilities Module
Initializing Enkrypt Secure MCP Gateway Module


SYSTEM INFO:
Using Python interpreter: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Scripts\python.exe
Python version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
Current working directory: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway\src\secure_mcp_gateway
PYTHONPATH: Not set


Installing dependencies...
All dependencies installed successfully.
Initializing Enkrypt Secure MCP Gateway Client Module
Initializing Enkrypt Secure MCP Gateway Guardrail Module
Getting Enkrypt Common Configuration
config_path: C:\Users\PC.enkrypt\enkrypt_mcp_config.json
example_config_path: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\example_enkrypt_mcp_config.json
Loading enkrypt_mcp_config.json file...


ENKRYPT_GATEWAY_KEY: *BN8_
enkrypt_log_level: info
is_debug_log_level: False
enkrypt_base_url: https://api.enkryptai.com
enkrypt_use_remote_mcp_config: False
enkrypt_api_key:
*_KEY
enkrypt_tool_cache_expiration: 4
enkrypt_gateway_cache_expiration: 24
enkrypt_mcp_use_external_cache: False
enkrypt_async_input_guardrails_enabled: False


External Cache is not enabled. Using local cache only.
Initializing Enkrypt Secure MCP Gateway Module


SYSTEM INFO:
Using Python interpreter: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Scripts\python.exe
Python version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
Current working directory: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway\src\secure_mcp_gateway
PYTHONPATH: Not set


Installing dependencies...
All dependencies installed successfully.
Getting Enkrypt Common Configuration
config_path: C:\Users\PC.enkrypt\enkrypt_mcp_config.json
example_config_path: C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\example_enkrypt_mcp_config.json
Loading enkrypt_mcp_config.json file...


ENKRYPT_GATEWAY_KEY: *BN8_
enkrypt_log_level: info
is_debug_log_level: False
enkrypt_base_url: https://api.enkryptai.com
enkrypt_use_remote_mcp_config: False
enkrypt_api_key:
*_KEY
enkrypt_tool_cache_expiration: 4
enkrypt_gateway_cache_expiration: 24
enkrypt_mcp_use_external_cache: False
enkrypt_async_input_guardrails_enabled: False


External Cache is not enabled. Using local cache only.
[06/15/25 13:14:10] INFO Added server 'Enkrypt Secure MCP Gateway' to Claude config claude.py:137
INFO Successfully installed Enkrypt Secure MCP Gateway in Claude app cli.py:486


Installation complete. Check the claude_desktop_config.json file as per the readme instructions and restart Claude Desktop.


#### 4.2.3设置其他MCP客户端

⬡ Cursor

- 您可以导航到光标的 **全球MCP** 文件在 `~/.cursor/mcp.json` 在Linux/macOS或 `%USERPROFILE%\.cursor\mcp.json` 在Windows上

- 如果你想在a **项目级别** 把它放在你的项目中。有关详细信息,请参阅 Cursor的文档

- 您还可以通过单击光标的UI导航到文件 `settings` 右上角的齿轮图标

- 点击 `MCP` 然后单击 `Add new global MCP server` 这会带你去 `mcp.json` 文件

- 示例 `mcp.json` 在编辑器中打开的文件

- 在全局或项目级别打开文件后,您可以复制粘贴我们在中使用的相同配置 `Claude Desktop`。作为参考,您可以参考 安装-6.2生成的MCP配置文件示例📄

- *请确保使用您自己的文件,该文件由 `setup` 脚本在 安装-4.2.2运行安装脚本📥。请不要复制粘贴此仓库中的示例配置文件。*

- 看 验证光标 验证MCP服务器是否在Cursor中运行的部分

⬡ Claude Code

- 克劳德代码 使用自己的CLI来管理MCP服务器,而不是JSON配置文件

- 从生成的中获取您的凭据 `enkrypt_mcp_config.json` (网关密钥、项目ID、用户ID)

- 查找gateway.py路径:```bash
python -c "import secure_mcp_gateway.gateway; print(secure_mcp_gateway.gateway.__file__)"
  • 将网关添加到Claude Code:```bash
    claude mcp add --transport stdio --env ENKRYPT_GATEWAY_KEY=YOUR_GATEWAY_KEY --env ENKRYPT_PROJECT_ID=YOUR_PROJECT_ID --env ENKRYPT_USER_ID=YOUR_USER_ID --scope user Enkrypt-Secure-MCP-Gateway -- mcp run /path/to/secure_mcp_gateway/gateway.py

- 验证: `claude mcp list`

- 有关详细设置,请参阅 4.1.7安装克劳德代码网关

### 4.3 Docker安装

🐳 Docker Installation Steps

#### 4.3.1构建Docker镜像```bash
docker build -t secure-mcp-gateway .

🖨️ Example output```bash
[+] Building 72.9s (20/20) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 724B 0.1s
=> [internal] load metadata for docker.io/library/python:3.11-alpine 1.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 456B 0.1s
=> [ 1/15] FROM docker.io/library/python:3.11-alpine@sha256:8068890a42d68ece5b62455ef327253249b5f094dcdee57f492635a40217f6a3 0.0s
=> => resolve docker.io/library/python:3.11-alpine@sha256:8068890a42d68ece5b62455ef327253249b5f094dcdee57f492635a40217f6a3 0.0s
=> [internal] load build context 1.5s
=> => transferring context: 82.25kB 1.4s
=> CACHED [ 2/15] WORKDIR /app 0.0s
=> CACHED [ 3/15] COPY requirements.txt . 0.0s
=> [ 4/15] COPY requirements-dev.txt . 0.0s
=> [ 5/15] RUN pip install --upgrade pip && pip install -r requirements.txt && pip install -r requirements-dev.txt 38.7s
=> [ 6/15] COPY src src 0.2s
=> [ 7/15] COPY setup.py setup.py 0.1s
=> [ 8/15] COPY MANIFEST.in MANIFEST.in 0.1s
=> [ 9/15] COPY pyproject.toml pyproject.toml 0.1s
=> [10/15] COPY CHANGELOG.md CHANGELOG.md 0.1s
=> [11/15] COPY LICENSE.txt LICENSE.txt 0.1s
=> [12/15] COPY README.md README.md 0.1s
=> [13/15] COPY README_PYPI.md README_PYPI.md 0.1s
=> [14/15] RUN python -m build 8.5s
=> [15/15] RUN pip install . 5.5s
=> exporting to image 16.6s
=> => exporting layers 11.8s

…(正文过长,页面只展示前面部分,完整内容见仓库)
```

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Enkrypt AI Secure MCP Gateway 怎么安装?

在客户端按下面的安装命令接入:python --version。装完在客户端配置里引用同一个包或端点。

Enkrypt AI Secure MCP Gateway 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Enkrypt AI Secure MCP Gateway 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Enkrypt AI Secure MCP Gateway 需要 API Key 吗?

资料标注需要OAuth 授权认证,使用前准备好对应凭据,并按最小权限配置。

Enkrypt AI Secure MCP Gateway 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Enkrypt AI Secure MCP Gateway 能提供哪些能力?

资料显示能力标签包括 安全、Python、Claude、访问控制。具体工具清单以官方文档为准。

Enkrypt AI Secure MCP Gateway 需要什么运行环境?

运行时为 Python;属于本地进程,需要在本机装好运行环境。

Enkrypt AI Secure MCP Gateway 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。