1. Conduid
  2. Security
  3. Gateway
MCP server ยท Security

Gateway

๐Ÿš€ Enterprise-grade API Gateway for MCP Protocol, built with Java Spring Boot. Supports authentication, proxy, and traffic management for AI tool calling.

Unclaimed last commit a year ago mcp-proxymcp-proxy-servermcp-gatewaysecurity
48Fair

Scored 2 hours ago ยท breakdown

About Gateway

Gateway is an MCP server published by w3z4y4 in the Security category: ๐Ÿš€ Enterprise-grade API Gateway for MCP Protocol, built with Java Spring Boot. Supports authentication, proxy, and traffic management for AI tool calling.

The repository has 34 stars and 12 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/w3z4y4/mcp-gateway

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Gateway

Powered by Claude · Grounded in docs

I know everything about Gateway. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 2 hours ago. Heuristics on the source, not an audit.

  • โœ“README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • !Dependencies pinnedNo lockfile. Installs can pull different code over time.
  • โœ“No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

0.0.10.0.1 ยท 23 Aug 2025v0.0.1: ๅˆๅง‹็‰ˆๆœฌ๏ผŒๅŒ…ๅซๅŸบ็ก€็š„่ฎค่ฏใ€ไปฃ็†ๅ’Œ็ฎก็†ๅŠŸ่ƒฝ

README

MCP Gateway - ไผไธš็บงMCP API็ฝ‘ๅ…ณ

MCP Gateway - Enterprise-grade MCP API Gateway

๐Ÿš€ ไธบMCP็”Ÿๆ€็ณป็ปŸๆไพ›้ซ˜ๆ€ง่ƒฝๅ่ฎฎ่ฝฌๆขใ€ๆœๅŠก็ฎก็†ใ€้‰ดๆƒๅ’Œๆต้‡ๆฒป็†็š„ๅฎŒๆ•ด่งฃๅ†ณๆ–นๆกˆ

้กน็›ฎๆฆ‚่ฟฐ

MCP Gatewayๆ˜ฏไธ€ไธชๅŸบไบŽSpring Boot 3.x็š„ไผไธš็บงAPI็ฝ‘ๅ…ณ็ณป็ปŸ๏ผŒไธ“้—จไธบModel Context Protocol (MCP)ๆœๅŠกๆไพ›็ปŸไธ€็š„ๆŽฅๅ…ฅใ€็ฎก็†ๅ’Œไปฃ็†ๅŠŸ่ƒฝใ€‚็ณป็ปŸ้‡‡็”จๆจกๅ—ๅŒ–ๆžถๆž„่ฎพ่ฎก๏ผŒ็กฎไฟ้ซ˜ๅฏๆ‰ฉๅฑ•ๆ€งใ€ๅฏ็ปดๆŠคๆ€งๅ’Œๅฎ‰ๅ…จๆ€งใ€‚

ๆ ธๅฟƒ็‰นๆ€ง

  • ๐Ÿ” ็ปŸไธ€้‰ดๆƒ: ๆ”ฏๆŒๅฏ†้’ฅ่ฎค่ฏใ€IP็™ฝๅๅ•ใ€่ทฏๅพ„็™ฝๅๅ•
  • ๐Ÿš€ ้ซ˜ๆ€ง่ƒฝไปฃ็†: ๅŸบไบŽWebFluxๅ“ๅบ”ๅผๆžถๆž„๏ผŒๆ”ฏๆŒๅผ‚ๆญฅ่ฏทๆฑ‚ๅค„็†
  • ๐Ÿ“Š ๆœๅŠกๆฒป็†: ๆœๅŠกๅ‘็Žฐใ€ๅฅๅบทๆฃ€ๆŸฅใ€็ปŸ่ฎก็›‘ๆŽง
  • ๐Ÿ›ก๏ธ ๆต้‡ๆŽงๅˆถ: ๅคš็ปดๅบฆ้™ๆตใ€็†”ๆ–ญ้™็บง
  • ๐Ÿ’พ ๆ•ฐๆฎๆŒไน…ๅŒ–: MySQLๅญ˜ๅ‚จ้…็ฝฎๆ•ฐๆฎ๏ผŒRedis็ผ“ๅญ˜็ƒญ็‚นๆ•ฐๆฎ
  • ๐Ÿ“ˆ ๅฎžๆ—ถ็›‘ๆŽง: ๆœๅŠก่ฐƒ็”จ็ปŸ่ฎกใ€ๆ€ง่ƒฝ็›‘ๆŽง

ๆžถๆž„่ฎพ่ฎก

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      Client Applications                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚ HTTP/HTTPS Requests
                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    MCP Gateway                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚    Auth     โ”‚  โ”‚    Proxy    โ”‚  โ”‚     Management      โ”‚  โ”‚
โ”‚  โ”‚   Module    โ”‚  โ”‚   Module    โ”‚  โ”‚      Module         โ”‚  โ”‚
โ”‚  โ”‚             โ”‚  โ”‚             โ”‚  โ”‚                     โ”‚  โ”‚
โ”‚  โ”‚ - ๅฏ†้’ฅ่ฎค่ฏ   โ”‚  โ”‚ - ๅ่ฎฎ่ฝฌๆข   โ”‚  โ”‚ - ๆœๅŠก็ฎก็†          โ”‚  โ”‚
โ”‚  โ”‚ - IP็™ฝๅๅ•   โ”‚  โ”‚ - ่ฏทๆฑ‚ไปฃ็†   โ”‚  โ”‚ - ้…็ฝฎ็”Ÿๆˆ          โ”‚  โ”‚
โ”‚  โ”‚ - ่ฐƒ็”จ่ฎฐๅฝ•   โ”‚  โ”‚ - ๆต้‡็ปŸ่ฎก   โ”‚  โ”‚ - ๅฏ†้’ฅ็ฎก็†          โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚ MCP Protocol
                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  Backend MCP Services                       โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   Weather   โ”‚  โ”‚    HR       โ”‚  โ”‚     File            โ”‚  โ”‚
โ”‚  โ”‚   Service   โ”‚  โ”‚   Service   โ”‚  โ”‚    Service          โ”‚  โ”‚
โ”‚  โ”‚ :8081       โ”‚  โ”‚ :8082       โ”‚  โ”‚    :8083            โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ๆŠ€ๆœฏๆ ˆ

  • ๅŽ็ซฏๆก†ๆžถ: Spring Boot 3.5.4, Spring WebFlux
  • ๆ•ฐๆฎๅบ“: MySQL 8.0+ (ไธปๅญ˜ๅ‚จ), Redis 6.0+ (็ผ“ๅญ˜)
  • ORMๆก†ๆžถ: MyBatis
  • ๆž„ๅปบๅทฅๅ…ท: Maven 3.8+
  • JDK็‰ˆๆœฌ: Java 17+
  • ๅฎนๅ™จๅŒ–: Docker (ๅฏ้€‰)

ๆจกๅ—็ป“ๆž„

mcp-gateway/
โ”œโ”€โ”€ auth/                       # ้‰ดๆƒๆจกๅ—
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ””โ”€โ”€ org/jdt/mcp/gateway/auth/
โ”‚   โ”‚       โ”œโ”€โ”€ config/         # ่ฎค่ฏ้…็ฝฎ็ฑป
โ”‚   โ”‚       โ”œโ”€โ”€ filter/         # ่ฎค่ฏ่ฟ‡ๆปคๅ™จ
โ”‚   โ”‚       โ”œโ”€โ”€ service/        # ่ฎค่ฏๆœๅŠกๅฎž็Žฐ
โ”‚   โ”‚       โ””โ”€โ”€ tool/           # ่ฎค่ฏๅทฅๅ…ท็ฑป
โ”‚   โ””โ”€โ”€ pom.xml
โ”œโ”€โ”€ proxy/                      # ไปฃ็†ๆจกๅ—
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ””โ”€โ”€ org/jdt/mcp/gateway/proxy/
โ”‚   โ”‚       โ”œโ”€โ”€ config/         # ไปฃ็†้…็ฝฎ็ฑป
โ”‚   โ”‚       โ”œโ”€โ”€ ctl/            # RESTๆŽงๅˆถๅ™จ
โ”‚   โ”‚       โ”œโ”€โ”€ handler/        # ่ฏทๆฑ‚ๅค„็†ๅ™จ
โ”‚   โ”‚       โ”œโ”€โ”€ service/        # ไปฃ็†ๆœๅŠกๅฎž็Žฐ
โ”‚   โ”‚       โ””โ”€โ”€ scheduler/      # ๅฎšๆ—ถไปปๅŠก่ฐƒๅบฆๅ™จ
โ”‚   โ””โ”€โ”€ pom.xml
โ”œโ”€โ”€ management/                 # ็ฎก็†ๆจกๅ— ๐Ÿ“‹
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ””โ”€โ”€ org/jdt/mcp/gateway/management/
โ”‚   โ”‚       โ”œโ”€โ”€ ManagementApp.java              # ไธปๅฏๅŠจ็ฑป
โ”‚   โ”‚       โ”œโ”€โ”€ config/                         # ้…็ฝฎ็ฑป
โ”‚   โ”‚       โ”œโ”€โ”€ ctl/                            # RESTๆŽงๅˆถๅ™จ
โ”‚   โ”‚       โ””โ”€โ”€ service/                        # ไธšๅŠกๆœๅŠกๅฑ‚
โ”‚   โ”œโ”€โ”€ src/main/resources/
โ”‚   โ”‚   โ””โ”€โ”€ application.yml                     # ็ฎก็†ๆจกๅ—้…็ฝฎๆ–‡ไปถ
โ”‚   โ””โ”€โ”€ pom.xml
โ”œโ”€โ”€ core/                       # ๆ ธๅฟƒๅ…ฑไบซๆจกๅ—
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ””โ”€โ”€ org/jdt/mcp/gateway/core/
โ”‚   โ”‚       โ”œโ”€โ”€ entity/         # ๅฎžไฝ“็ฑป๏ผˆๆ•ฐๆฎๅบ“ๆ˜ ๅฐ„๏ผ‰
โ”‚   โ”‚       โ”œโ”€โ”€ dto/            # ๆ•ฐๆฎไผ ่พ“ๅฏน่ฑก
โ”‚   โ”‚       โ”œโ”€โ”€ tool/           # ้€š็”จๅทฅๅ…ท็ฑป
โ”‚   โ”‚       โ””โ”€โ”€ exception/      # ่‡ชๅฎšไน‰ๅผ‚ๅธธ็ฑป
โ”‚   โ””โ”€โ”€ pom.xml
โ”œโ”€โ”€ persist/                    # ๆ•ฐๆฎๆŒไน…ๅŒ–ๆจกๅ—
โ”‚   โ”œโ”€โ”€ src/main/java/
โ”‚   โ”‚   โ””โ”€โ”€ org/jdt/mcp/gateway/
โ”‚   โ”‚       โ””โ”€โ”€ mapper/         # MyBatis MapperๆŽฅๅฃ
โ”‚   โ””โ”€โ”€ pom.xml
โ”œโ”€โ”€ ddl.sql                     # ๆ•ฐๆฎๅบ“ๅปบ่กจ่„šๆœฌ
โ”œโ”€โ”€ pom.xml                     # ไธปPOMๆ–‡ไปถ
โ””โ”€โ”€ README.md                   # ้กน็›ฎ่ฏดๆ˜Žๆ–‡ๆกฃ

# ๅ„ๆจกๅ—ๅ…ณ็ณป่ฏดๆ˜Ž

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     Frontend/Client                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                 โ”‚                 โ”‚
    โ–ผ                 โ–ผ                 โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Auth   โ”‚    โ”‚    Proxy    โ”‚    โ”‚ Management  โ”‚
โ”‚ Module  โ”‚โ—„โ”€โ”€โ–บโ”‚   Module    โ”‚โ—„โ”€โ”€โ–บโ”‚   Module    โ”‚
โ”‚ :8080   โ”‚    โ”‚   :8080     โ”‚    โ”‚   :9080     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    โ”‚                 โ”‚                 โ”‚
    โ”‚        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
    โ”‚        โ”‚        โ”‚        โ”‚        โ”‚
    โ–ผ        โ–ผ        โ–ผ        โ–ผ        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 Core Module                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   Entity    โ”‚  โ”‚     DTO     โ”‚  โ”‚      Tool       โ”‚  โ”‚
โ”‚  โ”‚   Classes   โ”‚  โ”‚   Classes   โ”‚  โ”‚    Classes      โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                      โ”‚
                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               Persist Module                            โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚   MyBatis   โ”‚  โ”‚   Mapper    โ”‚  โ”‚   Database      โ”‚  โ”‚
โ”‚  โ”‚    Config   โ”‚  โ”‚ Interfaces  โ”‚  โ”‚   Scripts       โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ๆจกๅ—ๅŠŸ่ƒฝ่ฏดๆ˜Ž

๐Ÿ” Auth ๆจกๅ—

  • ็ซฏๅฃ: 8080๏ผˆ้›†ๆˆๅœจProxyๆจกๅ—ไธญ๏ผ‰
  • ๅŠŸ่ƒฝ: ๆไพ›็ปŸไธ€็š„่ฎค่ฏๅ’Œ้‰ดๆƒๆœๅŠก
  • ็‰นๆ€ง: ๅฏ†้’ฅ่ฎค่ฏใ€IP็™ฝๅๅ•ใ€่ทฏๅพ„็™ฝๅๅ•ใ€่ฐƒ็”จๆ—ฅๅฟ—่ฎฐๅฝ•

๐Ÿš€ Proxy ๆจกๅ—

  • ็ซฏๅฃ: 8080
  • ๅŠŸ่ƒฝ: ้ซ˜ๆ€ง่ƒฝ็š„MCPๅ่ฎฎไปฃ็†่ฝฌๅ‘
  • ็‰นๆ€ง: ๅŸบไบŽWebFluxๅ“ๅบ”ๅผๆžถๆž„ใ€่ฏทๆฑ‚็ปŸ่ฎกใ€ๆต้‡็›‘ๆŽง

๐Ÿ“‹ Management ๆจกๅ—

  • ็ซฏๅฃ: 9080
  • ๅŠŸ่ƒฝ: MCPๆœๅŠกๅ’Œ็”จๆˆทๆƒ้™็š„็ฎก็†็•Œ้ข
  • ๆ ธๅฟƒAPI:
    • MCPๆœๅŠก็ฎก็†๏ผšๆœๅŠกๆณจๅ†Œใ€ๆ›ดๆ–ฐใ€็Šถๆ€็ฎก็†
    • ่ฎค่ฏๅฏ†้’ฅ็ฎก็†๏ผšๅฏ†้’ฅ็”ณ่ฏทใ€ๆ’ค้”€ใ€็ปญๆœŸ
    • ้…็ฝฎ็”Ÿๆˆ๏ผšSpring AI MCP Client้…็ฝฎๆ–‡ไปถ็”Ÿๆˆ

๐ŸŽฏ Core ๆจกๅ—

  • ๅŠŸ่ƒฝ: ๆไพ›ๅ…ฑไบซ็š„ๅฎžไฝ“็ฑปใ€DTOๅ’Œๅทฅๅ…ท็ฑป
  • ๅŒ…ๅซ:
    • Entity: ๆ•ฐๆฎๅบ“ๅฎžไฝ“ๆ˜ ๅฐ„็ฑป
    • DTO: API่ฏทๆฑ‚/ๅ“ๅบ”ๅฏน่ฑก
    • Tool: ้€š็”จๅทฅๅ…ท็ฑป๏ผˆๅฆ‚ๅฏ†้’ฅ็”Ÿๆˆๅ™จ๏ผ‰

๐Ÿ’พ Persist ๆจกๅ—

  • ๅŠŸ่ƒฝ: ๆ•ฐๆฎๆŒไน…ๅŒ–ๅฑ‚ๆŠฝ่ฑก
  • ๆŠ€ๆœฏ: MyBatis + MySQL + Redis
  • ๅŒ…ๅซ: MapperๆŽฅๅฃใ€ๆ•ฐๆฎๅบ“่ฟžๆŽฅ้…็ฝฎ

ๅฟซ้€Ÿๅผ€ๅง‹

็Žฏๅขƒ่ฆๆฑ‚

  • JDK 17+
  • Maven 3.8+
  • MySQL 8.0+
  • Redis 6.0+

1. ๅ…‹้š†้กน็›ฎ

git clone <repository-url>
cd mcp-gateway

2. ๆ•ฐๆฎๅบ“ๅˆๅง‹ๅŒ–

# ๅˆ›ๅปบๆ•ฐๆฎๅบ“
mysql -u root -p -e "CREATE DATABASE mcp_gateway CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"

# ๅฏผๅ…ฅ่กจ็ป“ๆž„
mysql -u root -p mcp_gateway < ddl.sql

3. ้…็ฝฎๆ–‡ไปถ

ไฟฎๆ”นๅ„ๆจกๅ—็š„application.yml้…็ฝฎ๏ผš

spring:
  datasource:
    url: jdbc:mysql://localhost:3306/mcp_gateway
    username: your_username
    password: your_password
  data:
    redis:
      host: localhost
      port: 6379

4. ็ผ–่ฏ‘ๆž„ๅปบ

# ็ผ–่ฏ‘ๆ•ดไธช้กน็›ฎ
mvn clean compile

# ๆ‰“ๅŒ…
mvn clean package

5. ๅฏๅŠจๆœๅŠก

# ๅฏๅŠจไปฃ็†ๆจกๅ—
java -jar proxy/target/proxy-0.0.1-SNAPSHOT.jar

# ๅฏๅŠจ็ฎก็†ๆจกๅ—
java -jar management/target/management-0.0.1-SNAPSHOT.jar

6. ้ชŒ่ฏๆœๅŠก

# ๆฃ€ๆŸฅไปฃ็†ๆœๅŠก
curl http://localhost:8080/mcp/health

# ๆฃ€ๆŸฅ็ฎก็†ๆœๅŠก
curl http://localhost:9080/api/management/services

ไฝฟ็”จๆŒ‡ๅ—

1. ๆณจๅ†ŒMCPๆœๅŠก

curl -X POST http://localhost:9080/api/management/services \
  -H "Content-Type: application/json" \
  -d '{
    "serviceId": "weather-service",
    "name": "ๅคฉๆฐ”ๆŸฅ่ฏขๆœๅŠก",
    "description": "ๆไพ›ๅ…จ็ƒๅคฉๆฐ”ๆŸฅ่ฏขๅŠŸ่ƒฝ",
    "endpoint": "http://localhost:8081",
    "status": "ACTIVE",
    "maxQps": 1000
  }'

2. ็”ณ่ฏท่ฎค่ฏๅฏ†้’ฅ

curl -X POST http://localhost:9080/api/management/auth-keys/apply \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user001",
    "serviceId": "weather-service",
    "remarks": "ๅผ€ๅ‘ๆต‹่ฏ•ไฝฟ็”จ"
  }'

3. ็”Ÿๆˆๅฎขๆˆท็ซฏ้…็ฝฎ

curl -X POST http://localhost:9080/api/management/config/yaml \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user001",
    "serviceIds": ["weather-service"],
    "baseUrl": "http://localhost:8080"
  }'

4. ไปฃ็†่ฎฟ้—ฎMCPๆœๅŠก

# ไฝฟ็”จ็”Ÿๆˆ็š„ๅฏ†้’ฅ่ฎฟ้—ฎๆœๅŠก
curl "http://localhost:8080/mcp/weather-service/api/weather?city=Beijing&key=YOUR_AUTH_KEY"

้…็ฝฎ่ฏดๆ˜Ž

่ฎค่ฏ้…็ฝฎ

jdt:
  mcp:
    auth:
      enabled: true
      authType: db  # ๆ”ฏๆŒ: db, staticKey
      validKeys:
        - "admin-key-jdt"
      whitelist:
        - "/health"
        - "/actuator/**"
      enableIpWhitelist: false
      allowedIps:
        - "127.0.0.1"
        - "::1"

ไปฃ็†้…็ฝฎ

jdt:
  mcp:
    proxy:
      timeout: 300s
      maxInMemorySize: 262144  # 256KB
      connectTimeout: 5s
      readTimeout: 30s
      enableStatistics: true
      enableRequestLogging: true

็›‘ๆŽงๅ’Œ่ฟ็ปด

ๅฅๅบทๆฃ€ๆŸฅ

# ไปฃ็†ๆœๅŠกๅฅๅบทๆฃ€ๆŸฅ
curl http://localhost:8080/mcp/health

# ็ฎก็†ๆœๅŠกๅฅๅบทๆฃ€ๆŸฅ
curl http://localhost:9080/actuator/health

ๆœๅŠก็ปŸ่ฎก

# ๆŸฅ็œ‹ๆœๅŠกๅฎžๆ—ถ็ปŸ่ฎก
curl http://localhost:8080/mcp/stats/weather-service/realtime

# ๆŸฅ็œ‹ๆœๅŠกๅކๅฒ็ปŸ่ฎก
curl http://localhost:8080/mcp/stats/weather-service

ๆ—ฅๅฟ—้…็ฝฎ

logging:
  level:
    org.jdt.mcp.gateway: INFO
  file:
    name: logs/gateway.log

้ƒจ็ฝฒๅปบ่ฎฎ

Docker้ƒจ็ฝฒ

FROM openjdk:17-jdk-slim
COPY proxy/target/proxy-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app.jar"]

็”Ÿไบง็Žฏๅขƒ้…็ฝฎ

  1. ๆ•ฐๆฎๅบ“่ฟžๆŽฅๆฑ ่ฐƒไผ˜

    spring:
      datasource:
        hikari:
          maximum-pool-size: 50
          minimum-idle: 10
    
  2. JVMๅ‚ๆ•ฐ่ฐƒไผ˜

    java -Xms2g -Xmx4g -XX:+UseG1GC -jar app.jar
    
  3. Redis้ซ˜ๅฏ็”จ

    spring:
      data:
        redis:
          cluster:
            nodes:
              - redis1:6379
              - redis2:6379
              - redis3:6379
    

APIๆ–‡ๆกฃ

่ฏฆ็ป†็š„APIๆ–‡ๆกฃ่ฏทๅ‚่€ƒๅ„ๆจกๅ—็š„README๏ผš

ๆ•…้šœๆŽ’ๆŸฅ

ๅธธ่ง้—ฎ้ข˜

  1. ่ฎค่ฏๅคฑ่ดฅ

    • ๆฃ€ๆŸฅ่ฎค่ฏๅฏ†้’ฅๆ˜ฏๅฆๆญฃ็กฎ
    • ็กฎ่ฎคๆœๅŠกๆ˜ฏๅฆๅค„ไบŽๆฟ€ๆดป็Šถๆ€
    • ้ชŒ่ฏIP็™ฝๅๅ•้…็ฝฎ
  2. ไปฃ็†่ถ…ๆ—ถ

    • ๆฃ€ๆŸฅๅŽ็ซฏๆœๅŠกๆ˜ฏๅฆๆญฃๅธธ
    • ่ฐƒๆ•ดไปฃ็†่ถ…ๆ—ถ้…็ฝฎ
    • ็กฎ่ฎค็ฝ‘็ปœ่ฟž้€šๆ€ง
  3. ๆ•ฐๆฎๅบ“่ฟžๆŽฅ้—ฎ้ข˜

    • ๆฃ€ๆŸฅ่ฟžๆŽฅๆฑ ้…็ฝฎ
    • ้ชŒ่ฏๆ•ฐๆฎๅบ“ๆƒ้™
    • ็กฎ่ฎค้˜ฒ็ซๅข™่ฎพ็ฝฎ

RoadMap

  1. ็ฎ€ๅŒ–managementๅ’Œproxy็น็็š„ไปฃ็ 
  2. ๆ›ดๅฎŒๅ–„็š„ๆŒ‡ๆ ‡้‡‡้›†ๅŠŸ่ƒฝ
  3. ๅขžๅŠ ๆต้‡ๆŽงๅˆถๆจกๅ—

่ดก็ŒฎๆŒ‡ๅ—

  1. Fork ้กน็›ฎ
  2. ๅˆ›ๅปบๅŠŸ่ƒฝๅˆ†ๆ”ฏ (git checkout -b feature/AmazingFeature)
  3. ๆไบคๆ›ดๆ”น (git commit -m 'Add some AmazingFeature')
  4. ๆŽจ้€ๅˆฐๅˆ†ๆ”ฏ (git push origin feature/AmazingFeature)
  5. ๆ Pull Request ๐Ÿ˜„

็‰ˆๆœฌๅކๅฒ

  • v0.0.1-SNAPSHOT: ๅˆๅง‹็‰ˆๆœฌ๏ผŒๅŒ…ๅซๅŸบ็ก€็š„่ฎค่ฏใ€ไปฃ็†ๅ’Œ็ฎก็†ๅŠŸ่ƒฝ

ๆ”ฏๆŒ

ๅฆ‚ๆžœไฝ ๅœจไฝฟ็”จ่ฟ‡็จ‹ไธญ้‡ๅˆฐ้—ฎ้ข˜๏ผŒๅฏไปฅ้€š่ฟ‡ไปฅไธ‹ๆ–นๅผ่Žทๅ–ๆ”ฏๆŒ๏ผš

  • ๆไบค [GitHub Issue]
  • ๅ‘้€้‚ฎไปถ่‡ณ: 876989946@qq.com

Made with โค๏ธ by JDT Team

README fetched from the repository 2 hours ago. The original is authoritative.

Questions

About Gateway

How do I install Gateway?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Gateway safe to use with an AI agent?

Its trust score is 48 out of 100 (fair). It passes 2 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Gateway still maintained?

The last commit was a year ago and 1 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.