Secure MCP Gateway

MCP安全风控

提供方 未标注

安全风控 stdio · 本地进程 未标注 社区 / 第三方
查看接入方式

全面解析Secure MCP GatewayMCP Server的核心功能、安装配置和实用案例。作为顶级Model Context Protocol服务器,Secure MCP Gateway能让AI助手访问实时数据、执行操作,为您提供更智能的工作体验和自动化解决方案。

一句话选型结论

按资料字段整理

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

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

工具与能力

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

能力标签

安装与配置

stdio · 本地进程 未标注
客户端在本机拉起子进程,数据不出本机
pip install uv

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

  1. 1
    准备运行环境

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

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

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

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

日志与审计

汇总日志、查异常行为。

合规检查

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

选择建议

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

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
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

服务器档案

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

详细介绍

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

Enkrypt AI Secure MCP Gateway

> 📖 Featured Blog Post: Learn how the Secure MCP Gateway prevents top attacks and vulnerabilities in our latest blog:
>
> How Enkrypt's Secure MCP Gateway and MCP Scanner Prevent Top Attacks
>
> Discover real-world attack scenarios, security best practices, and how our gateway protects your AI applications.

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.

  • Pypi Package

  • Docker Image

  • Also see:

  • CLI-Commands-Reference.md for the list of commands and their usage
  • API-Reference.md for the list of API endpoints and their usage
  • MCP Gateway Setup Notebook for a complete walkthrough of all the essential commands

Table of Contents

    1. Features 🚀
    1. High level steps of how the MCP Gateway works 🪜
    1. Prerequisites 🧩
    1. Gateway Setup 👨‍💻
    1. (Optional) OpenTelemetry Setup 📊
    1. Verify Installation and check the files generated ✅
    1. Edit the Gateway config as needed ✏️
    1. CLI Quick Start Guide 🖥️
    1. (Optional) Add GitHub MCP Server to the Gateway 🤖
  • 9.1 (Optional) Connect to MCP Servers with OAuth 🔐
    1. (Optional) Protect GitHub MCP Server and Test Echo Server 🔒
    1. Recommendations for using Guardrails 💡
    1. Other tools available 🔧
    1. (Optional) Sandbox Isolation 🛡️
    1. Deployment Patterns 🪂
    1. Uninstall the Gateway 🗑️
    1. Troubleshooting 🕵
    1. Known Issues being worked on 🏗️
    1. Known Limitations ⚠️
    1. Contribute 🤝
    1. Testing 🧪
    1. License

1. Features

Below are the list of features Enkrypt AI Secure MCP Gateway provides:

  1. 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. Additionally, a secure admin_apikey (256-character random string) is automatically generated at the root of the config for administrative REST API operations. (When plugins.auth.provider is enkrypt, admin_apikey is optional — the Enkrypt cloud api_key doubles as the admin credential for most REST endpoints. The cache-flush endpoint specifically uses a stricter org-id-gated policy under cloud auth — see Hot-Reload Auth Policy.)

  2. Ease of use: You can configure all your MCP servers either locally in enkrypt_mcp_config.json or — better yet for teams and production — in Enkrypt cloud (run secure-mcp-gateway generate-config --provider enkrypt). The cloud owns the server list, guardrail policies, and common_overrides, and the gateway pulls them at request time with a 5-minute TTL.

  3. Dynamic Tool Discovery: The Gateway discovers tools from the MCP servers dynamically and makes them available to the MCP client

  4. 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

  5. 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

  6. 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)

  7. 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.

  8. Sandbox Isolation: MCP servers can be launched inside isolated sandbox environments (Docker, Podman, or microVMs) so that a compromised or malicious server cannot access the host filesystem, network, or other resources. Each sandbox is ephemeral — created per session and destroyed when done.

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.

1.2 Concepts

  • MCP Config is an array of MCP servers like mcp_server_1, mcp_server_2, mcp_server_3 etc.
  • Each config has a unique ID

  • User is a user of the gateway with unique email and ID

  • A project is a collection of users that share an MCP Config

  • Project has a name and unique ID
  • The MCP Config can be updated or can be pointed to a different config by the Admin
  • Users can be added to multiple projects

  • An API Key is created for a user and project combination

  • A user can have different API Keys for different projects
  • This API Key is used to authenticate the user and identify the right project and MCP Config

  • See 6.5 Example config file generated and 7. Edit the Gateway config as needed for schema reference

2. High level steps of how the MCP Gateway works

🪜 Steps

  1. Your MCP client connects to the Secure MCP Gateway server with API Key (handled by src/secure_mcp_gateway/gateway.py).

  2. Gateway server fetches the gateway config from either the local enkrypt_mcp_config.json file (plugins.auth.provider = "local_apikey") or the remote Enkrypt cloud at https://api.enkryptai.com/mcp-gateway/get-gateway-config (plugins.auth.provider = "enkrypt"). See §14.5 Gateway Config Schema for both shapes.

    • It caches the config locally or in an external cache server like KeyDB if configured to improve performance.
  3. 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.

  4. Requests are forwarded to the Gateway Client (handled by src/secure_mcp_gateway/client.py).

  5. The Gateway client forwards the request to the appropriate MCP server (handled by src/secure_mcp_gateway/client.py).

  6. The MCP server processes the request and returns the response to the Gateway client.

  7. 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.

  8. 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.
  9. The Gateway server forwards the response back to the MCP client if everything is fine.

3. Prerequisites

🔗 Dependencies

  • Git 2.43 or higher

  • Python 3.11 or higher installed on your system and is accessible from the command line using either python or python3 command

  • pip 25.0.1 or higher is installed on your system and is accessible from the command line using either pip or python -m pip command

  • uv 0.7.9 or higher is installed on your system and is accessible from the command line using either uv or python -m uv command

🔍 Check versions

  • Check if Python, pip and uv are installed

  • If any of the below commands fail, please refer the respective documentation to install them properly```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


- 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.*

- 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)

🔒 Optional Protection with Enkrypt Guardrails

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

  - Create Guardrails in Enkrypt AI App Dashboard ✅

  - Create Guardrails using APIs

  - Create Guardrails using SDK

  - You can also use Enkrypt MCP Server 🤯 to create Guardrails and use them in the Gateway

## 4. Gateway Setup

### 4.1 Local Installation with pip

📦 Pip Installation Steps

#### 4.1.1 Download and Install the Package

- Activate a virtual environment```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
  ```

- Install the package. For more info see https://pypi.org/project/secure-mcp-gateway/```bash
  pip install 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**```bash
  secure-mcp-gateway generate-config
  ```

> **⚠️ Re-running on an existing config?** `generate-config` refuses to clobber an existing file by default — it exits with `INFO: Config file already exists at . ... use --overwrite flag.` Add `--overwrite` to regenerate (a timestamped `.bkp.` backup is written next to the original first). The flag also works with `--provider enkrypt` below.
>
>```bash
> secure-mcp-gateway generate-config --overwrite
> ```

##### Choosing an auth provider at generation time

The default command emits the full **local-apikey** schema — a sample echo server, a default project, a user, and an auto-generated gateway API key — everything you need to boot offline. If you instead want the gateway to source its servers/projects/users from **Enkrypt cloud**, generate the minimal cloud-backed config:```bash
secure-mcp-gateway generate-config --provider enkrypt

This writes a much shorter file containing only:

  • enkrypt_config.api_key and base_url (you fill in the apikey)
  • plugins.auth.provider = "enkrypt" with a gateway_name placeholder
  • plugins.guardrails.provider = "enkrypt"
  • plugins.telemetry.provider = "opentelemetry" (OTLP gRPC to localhost:4317, matching the local-apikey default and the bundled Prometheus/Grafana/Jaeger/Loki stack — set config.enabled: false if you don't have a collector running)
  • Two commonly-tweaked entries under common_mcp_gateway_config (enkrypt_log_level, enkrypt_gateway_cache_expiration_minutes)

No local mcp_configs / projects / users / apikeys blocks — the cloud owns those. After generation, edit the file and set:

  1. enkrypt_config.api_key → your Enkrypt cloud apikey
  2. plugins.auth.config.gateway_name → the saved_name of the gateway you created in the Enkrypt console

> gateway_name is the one value that can also arrive per request, as the X-Enkrypt-MCP-Gateway header from the MCP client, so that a single gateway process can serve several cloud gateways. When it is set in the config the config wins. Full config-key and header reference: §7.1 Enkrypt cloud auth provider and gateway headers.

The shipped reference file is src/secure_mcp_gateway/example_enkrypt_cloud_config.json — same shape the CLI generates. Use it as a template for hand-written configs.

Supported flag values:

--provider Behavior
local_apikey (default) Full local schema with sample echo server, project, user, API key, and a root-level admin_apikey for the REST admin API. Backward-compatible with all pre-2.2 setups.
enkrypt Minimal cloud-backed schema. No admin_apikey baked in — the cloud enkrypt_config.api_key doubles as the admin credential (see Admin API Key Authentication).

🖨️ Example output — --provider local_apikey (default)```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_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


🖨️ Example output — --provider enkrypt (cloud)```bash
INFO: Initializing Enkrypt Secure MCP Gateway CLI Module v2.2.0
INFO: HOME_DIR: C:\Users\PC
INFO: GATEWAY_PY_PATH:  C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway\.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\gateway.py
INFO: ECHO_SERVER_PATH:  C:\Users\PC\Documents\GitHub\EnkryptAI\secure-mcp-gateway\.secure-mcp-gateway-venv\Lib\site-packages\secure_mcp_gateway\bad_mcps\echo_oauth_mcp.py
INFO: PICKED_CONFIG_PATH:  C:\Users\PC\.enkrypt\enkrypt_mcp_config.json
INFO: Generating minimal Enkrypt-cloud configuration (plugins.auth.provider=enkrypt)...
SUCCESS: Generated config at C:\Users\PC\.enkrypt\enkrypt_mcp_config.json
INFO: Before starting the gateway, edit the file and set:
  * enkrypt_config.api_key            (replace 'YOUR_ENKRYPT_API_KEY' with your Enkrypt cloud apikey)
  * plugins.auth.config.gateway_name  (replace 'your-gateway-saved-name' with the saved_name of the gateway you created in Enkrypt cloud)

> Notice the cloud variant skips the long boot/dependency banner — it's a fast, focused command. The two INFO: Before starting… lines are the operator-must-edit checklist; the gateway will fail with a 401 from Enkrypt cloud on first boot if you skip them.

4.1.3 Example of the generated config file

> Note: The examples below show the full schema emitted by secure-mcp-gateway generate-config (default --provider local_apikey). Every field is included so you can compare your generated file 1:1. The oauth_config block ships disabled ("enabled": false) — its keys are placeholders you only need to fill in if a server uses OAuth. The timeout_settings block holds the per-operation timeouts the gateway uses internally; defaults are sane and rarely need editing.

🍎 Example file in macOS

  • This is an example of the default configuration file generated by the CLI on macOS:```json
    {
    "admin_apikey": "AUTO_GENERATED_256_CHAR_KEY",
    "enkrypt_config": {
    "api_key": "YOUR_ENKRYPT_API_KEY",
    "base_url": "https://api.enkryptai.com"
    },
    "common_mcp_gateway_config": {
    "enkrypt_log_level": "INFO",
    "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_gateway_cache_expiration_minutes": 5,
    "enkrypt_config_watcher_poll_seconds": 2.0,
    "enkrypt_async_input_guardrails_enabled": false,
    "enkrypt_async_output_guardrails_enabled": false,
    "timeout_settings": {
    "default_timeout": 90,
    "guardrail_timeout": 390,
    "auth_timeout": 30,
    "tool_execution_timeout": 360,
    "discovery_timeout": 540,
    "cache_timeout": 15,
    "connectivity_timeout": 6,
    "escalation_policies": {
    "warn_threshold": 0.8,
    "timeout_threshold": 1.0,
    "fail_threshold": 1.2
    }
    }
    },
    "plugins": {
    "auth": { "provider": "local_apikey", "config": {} },
    "guardrails": { "provider": "enkrypt", "config": {} },
    "telemetry": {
    "provider": "opentelemetry",
    "config": {
    "enabled": true,
    "url": "http://localhost:4317",
    "insecure": true
    }
    }
    },
    "mcp_configs": {
    "fcbd4508-1432-4f13-abb9-c495c946f638": {
    "mcp_config_name": "default_config",
    "common_overrides": {
    "server_tools_guardrails_config": {
    "enabled": false,
    "guardrail_name": "Sample Airline Guardrail",
    "block": [
    "policy_violation",
    "injection_attack",
    "topic_detector",
    "nsfw",
    "toxicity",
    "pii",
    "keyword_detector",
    "bias",
    "sponge_attack"
    ]
    }
    },
    "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"
    ]
    },
    "oauth_config": {
    "enabled": false,
    "is_remote": false,
    "OAUTH_VERSION": "2.1",
    "OAUTH_GRANT_TYPE": "client_credentials",
    "OAUTH_CLIENT_ID": "your-client-id",
    "OAUTH_CLIENT_SECRET": "your-client-secret",
    "OAUTH_TOKEN_URL": "https://auth.example.com/oauth/token",
    "OAUTH_AUDIENCE": "https://api.example.com",
    "OAUTH_ORGANIZATION": "your-org-id",
    "OAUTH_SCOPE": "read write",
    "OAUTH_RESOURCE": "https://resource.example.com",
    "OAUTH_TOKEN_EXPIRY_BUFFER": 300,
    "OAUTH_USE_BASIC_AUTH": true,
    "OAUTH_ENFORCE_HTTPS": true,
    "OAUTH_TOKEN_IN_HEADER_ONLY": true,
    "OAUTH_VALIDATE_SCOPES": true,
    "OAUTH_USE_MTLS": false,
    "OAUTH_CLIENT_CERT_PATH": null,
    "OAUTH_CLIENT_KEY_PATH": null,
    "OAUTH_CA_BUNDLE_PATH": null,
    "OAUTH_REVOCATION_URL": null,
    "OAUTH_ADDITIONAL_PARAMS": {},
    "OAUTH_CUSTOM_HEADERS": {}
    },
    "tools": {},
    "denied_tools": [],
    "input_guardrails_config": {
    "enabled": false,
    "guardrail_name": "Sample Airline Guardrail",
    "additional_config": {
    "pii_redaction": false
    },
    "block": [
    "policy_violation",
    "injection_attack",
    "topic_detector",
    "nsfw",
    "toxicity",
    "pii",
    "keyword_detector",
    "bias",
    "sponge_attack"
    ]
    },
    "output_guardrails_config": {
    "enabled": false,
    "guardrail_name": "Sample Airline Guardrail",
    "additional_config": {
    "relevancy": false,
    "hallucination": false,
    "adherence": false
    },
    "block": [
    "policy_violation",
    "injection_attack",
    "topic_detector",
    "nsfw",
    "toxicity",
    "pii",
    "keyword_detector",
    "bias",
    "sponge_attack"
    ]
    }
    }
    ]
    }
    },
    "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

- This is an example of the default configuration file generated by the CLI on Windows:```json
{
  "admin_apikey": "AUTO_GENERATED_256_CHAR_KEY",
  "enkrypt_config": {
    "api_key": "YOUR_ENKRYPT_API_KEY",
    "base_url": "https://api.enkryptai.com"
  },
  "common_mcp_gateway_config": {
    "enkrypt_log_level": "INFO",
    "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_gateway_cache_expiration_minutes": 5,
    "enkrypt_config_watcher_poll_seconds": 2.0,
    "enkrypt_async_input_guardrails_enabled": false,
    "enkrypt_async_output_guardrails_enabled": false,
    "timeout_settings": {
      "default_timeout": 90,
      "guardrail_timeout": 390,
      "auth_timeout": 30,
      "tool_execution_timeout": 360,
      "discovery_timeout": 540,
      "cache_timeout": 15,
      "connectivity_timeout": 6,
      "escalation_policies": {
        "warn_threshold": 0.8,
        "timeout_threshold": 1.0,
        "fail_threshold": 1.2
      }
    }
  },
  "plugins": {
    "auth": { "provider": "local_apikey", "config": {} },
    "guardrails": { "provider": "enkrypt", "config": {} },
    "telemetry": {
      "provider": "opentelemetry",
      "config": {
        "enabled": true,
        "url": "http://localhost:4317",
        "insecure": true
      }
    }
  },
  "mcp_configs": {
    "fcbd4508-1432-4f13-abb9-c495c946f638": {
      "mcp_config_name": "default_config",
      "common_overrides": {
        "server_tools_guardrails_config": {
          "enabled": false,
          "guardrail_name": "Sample Airline Guardrail",
          "block": [
            "policy_violation",
            "injection_attack",
            "topic_detector",
            "nsfw",
            "toxicity",
            "pii",
            "keyword_detector",
            "bias",
            "sponge_attack"
          ]
        }
      },
      "mcp_config": [
        {
          "server_name": "echo_server",
          "description": "Simple Echo Server",
          "config": {
            "command": "python",
            "args": [
              "C:\\Users\\<User>\\Documents\\GitHub\\EnkryptAI\\secure-mcp-gateway\\.secure-mcp-gateway-venv\\Lib\\site-packages\\secure_mcp_gateway\\bad_mcps\\echo_mcp.py"
            ]
          },
          "oauth_config": {
            "enabled": false,
            "is_remote": false,
            "OAUTH_VERSION": "2.1",
            "OAUTH_GRANT_TYPE": "client_credentials",
            "OAUTH_CLIENT_ID": "your-client-id",
            "OAUTH_CLIENT_SECRET": "your-client-secret",
            "OAUTH_TOKEN_URL": "https://auth.example.com/oauth/token",
            "OAUTH_AUDIENCE": "https://api.example.com",
            "OAUTH_ORGANIZATION": "your-org-id",
            "OAUTH_SCOPE": "read write",
            "OAUTH_RESOURCE": "https://resource.example.com",
            "OAUTH_TOKEN_EXPIRY_BUFFER": 300,
            "OAUTH_USE_BASIC_AUTH": true,
            "OAUTH_ENFORCE_HTTPS": true,
            "OAUTH_TOKEN_IN_HEADER_ONLY": true,
            "OAUTH_VALIDATE_SCOPES": true,
            "OAUTH_USE_MTLS": false,
            "OAUTH_CLIENT_CERT_PATH": null,
            "OAUTH_CLIENT_KEY_PATH": null,
            "OAUTH_CA_BUNDLE_PATH": null,
            "OAUTH_REVOCATION_URL": null,
            "OAUTH_ADDITIONAL_PARAMS": {},
            "OAUTH_CUSTOM_HEADERS": {}
          },
          "tools": {},
          "denied_tools": [],
          "input_guardrails_config": {
            "enabled": false,
            "guardrail_name": "Sample Airline Guardrail",
            "additional_config": {
              "pii_redaction": false
            },
            "block": [
              "policy_violation",
              "injection_attack",
              "topic_detector",
              "nsfw",
              "toxicity",
              "pii",
              "keyword_detector",
              "bias",
              "sponge_attack"
            ]
          },
          "output_guardrails_config": {
            "enabled": false,
            "guardrail_name": "Sample Airline Guardrail",
            "additional_config": {
              "relevancy": false,
              "hallucination": false,
              "adherence": false
            },
            "block": [
              "policy_violation",
              "injection_attack",
              "topic_detector",
              "nsfw",
              "toxicity",
              "pii",
              "keyword_detector",
              "bias",
              "sponge_attack"
            ]
          }
        }
      ]
    }
  },
  "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 with --provider enkrypt (cloud-backed, all platforms)

  • This is the complete file emitted by secure-mcp-gateway generate-config --provider enkrypt. Same shape on macOS, Linux, and Windows — only the on-disk path differs (~/.enkrypt/... vs %USERPROFILE%\.enkrypt\...).```json
    {
    "enkrypt_config": {
    "api_key": "YOUR_ENKRYPT_API_KEY",
    "base_url": "https://api.enkryptai.com",
    "org_id": "YOUR_ENKRYPT_ORG_ID"
    },
    "plugins": {
    "auth": {
    "provider": "enkrypt",
    "config": {
    "gateway_name": "your-gateway-saved-name",
    "gateway_version": "v1",
    "cache_ttl_seconds": 300
    }
    },
    "guardrails": {
    "provider": "enkrypt",
    "config": {}
    },
    "telemetry": {
    "provider": "opentelemetry",
    "config": {
    "enabled": true,
    "url": "http://localhost:4317",
    "insecure": true
    }
    }
    },
    "common_mcp_gateway_config": {
    "enkrypt_log_level": "INFO",
    "enkrypt_gateway_cache_expiration_minutes": 5
    }
    }

```

What's intentionally NOT here (cloud owns these):

  • No mcp_configs / projects / users / apikeys blocks — the gateway resolves them from Enkrypt cloud via /mcp-gateway/get-gateway-config on every authenticated request.

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

常见问题

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

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

Secure MCP Gateway 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Secure MCP Gateway 收费吗?

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

Secure MCP Gateway 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Secure MCP Gateway 能提供哪些能力?

资料显示能力标签包括 工具发现、Python、安全。具体工具清单以官方文档为准。

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

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

Secure MCP Gateway 是本地还是远程?

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

热门专题

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

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