Token导航 LogoToken导航

MCP Server · 安全风控

Poc MCP Gateway

一个完整的Model Context Protocol (MCP)网关演示,展示基于路径的路由、公共和OAuth 2.1保护的路线,本地Duende IdentityServer以及多个MCP后端(本地和远程)。

未说明官方级别未说明来源级核验工具 22
C#API代理安全

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
validide
提供方
validide

工具数量

22

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

Poc MCP Gateway 属于安全风控类 MCP Server,公开资料标注 22 个工具,通过传输方式未标注接入,客户端适配情况以官方文档为准,没有现成的安装命令;接入前要先准备 OAuth 授权。

分类

安全风控

传输方式

未说明

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

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

  4. 4

    验证是否可用

    连接成功后客户端会列出 22 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

MCP网关演示

使用AgentGateway的模型上下文协议(MCP)网关的完整演示,具有基于路径的路由、公共和OAuth 2.1保护的路由、本地Duende IdentityServer和多个MCP后端(本地和远程)。

概述

此演示展示了:

  • 代理网关 作为中央MCP网关(https://agentgateway.dev/)
  • 基于路径的路由 在单个端点上有6条不同的MCP路由
  • 公共路线 代理到远程MCP服务器(Context7、Kismet Travel、Microsoft Learn)
  • OpenAPI到MCP的转换 自动将Swagger Petstore REST API公开为MCP工具
  • 受保护的路线 使用OAuth 2.1+DCR实现本地MCP后端(JSONPlaceholder、Weather)
  • 工具复用 通过单个后端组合多个后端 /mixed 路线
  • 本地Duende身份服务器 用于OAuth 2.1身份验证(使用测试用户alice/bob)
  • 管理用户界面 用于网关监控和管理

建筑

+---------------------------------------------------------------+
|                     Desktop MCP Clients                        |
|              (OpenCode Desktop / MCP Inspector)                |
+---------------------------+-----------------------------------+
                            |
                            | MCP Protocol (Streamable HTTP)
                            v
+---------------------------------------------------------------+
|                   Nginx (localhost:8080)                       |
|                                                                |
|  gateway.localhost     -> AgentGateway (MCP routes)            |
|  gateway-ui.localhost  -> AgentGateway Admin UI                |
|  idp.localhost         -> IdentityServer                       |
|  inspector.localhost   -> MCP Inspector                        |
+---------------------------+-----------------------------------+
                            |
        +-------------------+-------------------+
        |                                       |
        v                                       v
+------------------+                  +-------------------+
| AgentGateway     |                  | IdentityServer    |
| (Port 3000)      |                  | (Port 5001)       |
| (Admin: 3001)    |                  +-------------------+
+--------+---------+
         |
         +------ Public (no auth) ------+------------------+
         |               |              |                  |
         v               v              v                  |
  +------------+  +------------+  +-------------+          |
  | Context7   |  | Kismet     |  | Microsoft   |          |
  | (remote)   |  | Travel     |  | Learn       |          |
  |            |  | (remote)   |  | (remote)    |          |
  +------------+  +------------+  +-------------+          |
         |                                                 |
         v                                                 |
  +-------------------+                                    |
  | Swagger Petstore  |                                    |
  | (OpenAPI -> MCP)  |                                    |
  | (remote)          |                                    |
  +-------------------+                                    |
         |                                                 |
         +------ Protected (OAuth+DCR) ---+                |
         |                |               |                |
         v                v               v
  +------------------+  +------------------+
  | JSONPlaceholder  |  | Weather MCP      |
  | MCP Server       |  | Server           |
  | (Port 8001)      |  | (Port 8002)      |
  +------------------+  +------------------+

快速开始

先决条件

  • Docker桌面或Docker引擎
  • Docker Compose

开始演示

# Using the start script
./scripts/start-demo.sh

# Or manually
docker compose up -d --build

访问演示

服务(通过端口8080上的nginx)
服务URL
网关MCPhttp://gateway.localhost:8080
网关管理UIhttp://gateway-ui.localhost:8080
身份服务器http://idp.localhost:8080
MCP检查员http://inspector.localhost:8080
JSON占位符MCPhttp://jsonplaceholder.localhost:8080
天气MCPhttp://weather.localhost:8080
直接访问
服务URL
网关MCPhttp://localhost:3000
网关管理UIhttp://localhost:3001
身份服务器http://localhost:5001
MCP检查员http://localhost:6274
JSON占位符MCPhttp://localhost:8001
天气MCPhttp://localhost:8002

网关路由

所有路线均通过以下网关提供服务 http://gateway.localhost:8080.

公共路由(无身份验证)

路由路径远程目标
背景7/context7/mcphttps://mcp.context7.com/mcp
Kismet旅游/travel/mcphttps://mcp.kismet.travel/mcp
微软学习/learn/mcphttps://learn.microsoft.com/api/mcp
Swagger宠物店/petstore/mcpOpenAPI自动翻译https://petstore.swagger.io

受保护路由(OAuth 2.1+DCR)

这些路由需要通过本地IdentityServer进行身份验证。

路由路径后端
JSON占位符/placeholder/mcpjsonplaceholder mcp:8001
天气/weather/mcp天气预报:8002
混合/mixed/mcpJSON占位符+天气组合

这 /mixed route多路复用两个本地后端,通过单个端点公开来自两个服务器的所有工具。

配置

网关配置

网关通过以下方式配置 gateway/config.yaml 使用基于路径的路由:

config:
  adminAddr: "0.0.0.0:3001"

binds:
- port: 3000
  listeners:
  - routes:
    # Public - no auth, proxied to remote MCP servers or OpenAPI specs
    - name: context7
      matches:
      - path:
          pathPrefix: /context7
      backends:
      - mcp:
          targets:
          - name: context7
            mcp:
              host: https://mcp.context7.com/mcp

    # Public - OpenAPI to MCP auto-translation
    - name: petstore
      matches:
      - path:
          pathPrefix: /petstore
      backends:
      - mcp:
          targets:
          - name: petstore
            openapi:
              schema:
                file: /etc/agentgateway/petstore-openapi.json
              host: https://petstore.swagger.io

    # Protected - OAuth 2.1 with DCR
    - name: placeholder
      matches:
      - path:
          pathPrefix: /placeholder
      policies:
        mcpAuthentication:
          issuer: http://idp.localhost:8080
          audiences: [mcp-gateway]
          jwks:
            url: http://idp:5000/.well-known/openid-configuration/jwks
          resourceMetadata:
            resource: http://gateway.localhost:8080/placeholder
            authorization_servers:
            - http://idp.localhost:8080
          mode: strict
      backends:
      - mcp:
          targets:
          - name: jsonplaceholder
            mcp:
              host: http://jsonplaceholder-mcp:8001/sse

工具命名

AgentGateway会自动为工具添加后端名称前缀,以避免冲突:

  • jsonplaceholder_get_posts
  • jsonplaceholder_get_users
  • weather_get_current
  • weather_get_forecast

MCP检验员测试

  1. 打开MCP检查器http://inspector.localhost:8080
  2. 将服务器URL设置为网关路由:

- 公众: http://gateway.localhost:8080/context7/mcp - 公共(OpenAPI): http://gateway.localhost:8080/petstore/mcp - 受保护的: http://gateway.localhost:8080/placeholder/mcp

  1. 选择传输:流式HTTP
  2. 连接并浏览可用工具

可用工具

JSONPlaceholder工具(8个工具)--通过 /placeholder/mcp

工具说明参数
jsonplaceholder_get_posts列出所有博客文章无
jsonplaceholder_get_post通过ID获取特定帖子id (整数)
jsonplaceholder_get_comments获取帖子的评论post_id (整数)
jsonplaceholder_get_users列出所有用户无
jsonplaceholder_get_user按ID获取特定用户id (整数)
jsonplaceholder_get_todos列出所有待办事项user_id (整数,可选)
jsonplaceholder_get_albums列出所有相册user_id (整数,可选)
jsonplaceholder_get_photos从相册中获取照片album_id (整数)

天气工具(3个工具)--通过 /weather/mcp

工具说明参数
weather_get_current获取某个地点的当前天气location (字符串,必填), units (字符串,可选)
weather_get_forecast获取某个地点的天气预报location (字符串,必填), days (整数,可选), units (字符串,可选)
weather_search_location搜索位置坐标query (字符串,必填)

Swagger宠物店工具(自动生成)--通过 /petstore/mcp

这些工具是 自动生成 从 宠物店API规范 由AgentGateway的 OpenAPI到MCP 功能。不需要自定义MCP服务器代码。

工具描述HTTP方法
petstore_addPet将新宠物添加到商店POST/pet
petstore_updatePet更新现有宠物PUT/pet
petstore_findPetsByStatus按状态查找宠物GET/pet/findByStatus
petstore_findPetsByTags按标签查找宠物GET/pet/findByTags
petstore_getPetById按ID查找宠物GET/pet/{petId}
petstore_updatePetWithForm用表单数据更新宠物POST/pet/{petId}
petstore_deletePet删除宠物删除/pet/{petId}
petstore_uploadFile上传宠物图片POST/pet/{petId}/uploadImage
petstore_getInventory按状态返回宠物库存GET/商店/库存
petstore_placeOrder订购宠物邮寄/商店/订单
petstore_getOrderById按ID查找采购订单GET/store/order/{orderId}
petstore_deleteOrder按ID删除采购订单删除/存储/订单/{orderId}
petstore_createUser创建用户POST/user
petstore_createUsersWithListInput创建用户列表POST/user/createWithList
petstore_loginUser用户登录系统GET/user/login
petstore_logoutUser注销当前用户GET/user/logout
petstore_getUserByName按用户名获取用户Get/user/{username}
petstore_updateUser更新用户PUT/user/{username}
petstore_deleteUser删除用户删除/用户/{用户名}

混合(全部11种工具)-通过 /mixed/mcp

这 /mixed route公开了JSONPlaceholder和Weather后端的所有工具。

项目结构

mcp-gateway-demo/
+-- gateway/
|   +-- config.yaml              # AgentGateway configuration (routes, auth, backends)
+-- idp/                         # Local IdentityServer (OAuth/OIDC)
|   +-- IdentityServer/
|       +-- Program.cs           # Entry point
|       +-- Config.cs            # OAuth scopes and resources
|       +-- TestUsers.cs         # Test users (alice/bob)
|       +-- Dockerfile
+-- mcp-servers/
|   +-- jsonplaceholder/
|   |   +-- server.py            # JSONPlaceholder MCP server
|   |   +-- Dockerfile
|   +-- weather/
|       +-- server.py            # Weather MCP server
|       +-- Dockerfile
+-- nginx/
|   +-- nginx.conf               # Reverse proxy configuration
|   +-- snippets/                # CORS, headers, SSE support
+-- specs/
|   +-- SPECIFICATION.md         # Technical specification
+-- scripts/
|   +-- start-demo.sh            # Start script
+-- docker-compose.yml           # Service orchestration
+-- README.md                    # This file

Docker服务

代理网关

  • 图像: ghcr.io/agentgateway/agentgateway:latest
  • 端口:3000(MCP路由),3001(管理UI)
  • 特性:基于路径的MCP路由、OAuth集成、远程MCP代理、管理UI
  • 文档: https://agentgateway.dev/

身份服务器(IdP)

  • 构建:本地Dockerfile(idp/IdentityServer)
  • 端口: 5001
  • 特性:OAuth 2.1/OpenID连接提供程序
  • 测试用户:爱丽丝/爱丽丝,鲍勃/鲍勃
  • 动态条件响应:动态客户注册 /connect/dcr

JSON占位符MCP

  • 构建:本地Dockerfile
  • 端口: 8001
  • 运输:SSE(服务器发送事件)
  • 外部API: https://jsonplaceholder.typicode.com/

天气MCP

  • 构建:本地Dockerfile
  • 端口: 8002
  • 运输:SSE(服务器发送事件)
  • 外部API: https://api.openweathermap.org/
  • API密钥:可选(使用不带键的模拟数据)

安全

OAuth 2.1流(受保护的路由)

  • 用途 授权码+PKCE (对公共客户安全)
  • 支持动态客户端注册(DCR)
  • 来自本地IdentityServer的短期访问令牌
  • 网关通过JWKS端点验证令牌
  • 仅 /placeholder, /weather,以及 /mixed 路由需要身份验证

公共路线

  • /context7, /travel, /learn,以及 /petstore 路由没有身份验证
  • 流量直接代理到远程MCP服务器或从OpenAPI规范转换而来

演示安全警告

重要:这是一个演示环境,有以下限制:

  • 使用简单密码(alice/alice、bob/bob)测试用户
  • Local IdentityServer使用开发签名密钥
  • 未经硬化不适合生产使用

文档

项目文件

外部参考

故障排除

常见问题

  1. 网关未启动:检查 docker compose logs mcp-gateway
  2. OAuth错误:验证IdP是否健康http://idp.localhost:8080/.well-已知/openid配置
  3. 工具不可见:确保MCP服务器正在运行(docker compose ps)
  4. ***.localhost 未解决**:大多数浏览器/操作系统都能解析 *.localhost 到 127.0.0.1 默认情况下。如果没有,请将条目添加到hosts文件中。

调试命令

# Check all service status
docker compose ps

# View gateway logs
docker compose logs mcp-gateway

# View MCP server logs
docker compose logs jsonplaceholder-mcp
docker compose logs weather-mcp

# Test MCP servers directly
curl http://localhost:8001/sse
curl http://localhost:8002/sse

# Test gateway health
curl http://localhost:8080/health

许可证

此演示按原样提供,用于教育和演示目的。

单个组件:

  • 代理网关:Apache 2.0
  • Duende IdentityServer:商用(此处使用演示服务器)
  • JSONPlaceholder:免费使用
  • OpenWeatherMap:提供免费层

______________________________________________________________________

最后更新: 2026-02-07 网关:代理网关 状态:准备使用

工具与能力

工具数量

22

资源数量

0

提示词数量

0

能力标签

网关服务C#本地部署路由管理OAuth认证API代理OpenAPI转换

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

资产与漏洞排查

批量查询资产和漏洞信息,输出待修清单。

日志审计

从日志里筛出异常访问和高风险操作。

合规检查

按规则核对配置项,记录不符合项。

选择建议

值得选的地方

  • 工具数量 22 个,一次接入能覆盖的操作比单点工具更全。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 暂时拿不到OAuth 授权的人。
  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Poc MCP Gateway

MCP World · 本页

22未说明未标注1 个2026-05-17
Modelcontextprotocol C22988b0

MCP World

0stdio有1 个2026-05-17
Hexstrike AI

MCP World

0stdio有1 个2026-05-17
Cyber Strike AI

MCP World

75未说明未标注1 个2026-05-17
MCP Scan

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Poc MCP Gateway 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

Poc MCP Gateway 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Poc MCP Gateway 收费吗?

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

Poc MCP Gateway 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Poc MCP Gateway 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP