
lasso-security/mcp-gateway 是从 https://github.com/lasso-security/mcp-gateway. 导入的 MCP 服务器候选
概览
lasso-security/mcp-gateway 是从 https://github.com/lasso-security/mcp-gateway. 导入的 MCP 服务器候选
概述(AI 翻译)
概述
MCP 网关是模型上下文协议(MCP)服务器的高级中介解决方案,用于集中并增强您的人工智能基础设施。
MCP 网关作为大型语言模型(LLM)与其他 MCP 服务器之间的中介。它:
- 📄 从根目录中的
mcp.json文件读取服务器配置。 - ⚙️ 管理已配置的MCP服务器生命周期。
- 🛡️ 拦截请求和回复以净化敏感信息。
- 🔗 提供一个统一的接口,用于发现和交互所有代理MCP。
- 🔒 安全扫描器 - 在加载MCP服务器前分析服务器声誉和安全风险。
安装
Python(推荐)
安装mcp-gateway包:
--mcp-json-path- 必须通向你的mcp.json或claude_desktop_config.json--plugin或-p- 指定启用的插件(可多次使用)
用途
本示例支持了文件系统MCP中令牌掩蔽和xetrack追踪插件的基本保护栏:
你可以通过在“server”键下添加更多MCP服务器配置,这些MCP会在网关下。
光标示例:
Claude 示例:
获取
Docker
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Overview
MCP Gateway is an advanced intermediary solution for Model Context Protocol (MCP) servers that centralizes and enhances your AI infrastructure.
MCP Gateway acts as an intermediary between LLMs and other MCP servers. It:
- 📄 Reads server configurations from a
mcp.jsonfile located in your root directory. - ⚙️ Manages the lifecycle of configured MCP servers.
- 🛡️ Intercepts requests and responses to sanitize sensitive information.
- 🔗 Provides a unified interface for discovering and interacting with all proxied MCPs.
- 🔒 Security Scanner - Analyzes server reputation and security risks before loading MCP servers.
Installation
Python (recommended)
Install the mcp-gateway package:
pip install mcp-gateway
--mcp-json-path- must lead to your mcp.json or claude_desktop_config.json
--pluginor-p- Specify the plugins to enable (can be used multiple times)
Usage
This example enables the basic guardrail for token masking and xetrack tracing plugin for filesystem MCP:
mcp-gateway --mcp-json-path ~/.cursor/mcp.json -p basic -p xetrack
You can add more MCPs that will be under the Gateway by putting the MCP server configuration under the “servers” key.
Get ``
which python
{
"mcpServers": {
"mcp-gateway": {
"command": "",
"args": [
"-m",
"mcp_gateway.server",
"--mcp-json-path",
"",
"--plugin",
"basic"
],
"servers": {
安装
npx -y @modelcontextprotocol/server-filesystem .配置
{
"mcpServers": {
"mcp-gateway": {
"command": "mcp-gateway",
"args": [
"--mcp-json-path",
"~/.cursor/mcp.json",
"--plugin",
"basic",
"--plugin",
"xetrack"
],
"servers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
}
}
}
}
}