feat(ai-gateway): MCP servers aggregator#5266
Open
tomek-labuk wants to merge 2 commits into
Open
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds documentation for a new AI MCP Proxy upstream-server mode and introduces a new how-to guide for aggregating MCP tools using that mode alongside listener, fitting into the existing MCP documentation set under the AI Gateway docs.
Changes:
- Updates the AI MCP Proxy plugin docs to reference
upstream-servermode and its interaction withlistenermode. - Adds a new how-to guide covering aggregation using
upstream-server+listener. - Updates ACL inheritance wording for
listenermode to includeupstream-server.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| app/_kong_plugins/ai-mcp-proxy/index.md | Adds/updates mode and ACL documentation to include upstream-server. |
| app/_how-tos/mcp/aggregate-mcp-tools-upstream-server.md | New how-to guide describing aggregation flow using upstream-server and listener modes. |
Comments suppressed due to low confidence (1)
app/_how-tos/mcp/aggregate-mcp-tools-upstream-server.md:222
- This section says the listener aggregates tools registered by "conversion-only" plugins, but earlier steps configure
upstream-servermode; update the wording so the aggregated source mode matches the configuration in this guide.
## Configure the listener AI MCP Proxy plugin
Now, let's configure another AI MCP Proxy plugin instance in listener mode to aggregate and expose the tools registered by the conversion-only plugins. The listener plugin discovers tools based on their shared tag value—in this case, `mcp-tools`—and serves them through an MCP server that AI clients can connect to.
| Use when you need a single MCP endpoint that aggregates tools from multiple `conversion-only` plugins. | ||
| Typical in multi-service or multi-team environments that expose a unified MCP interface. | ||
| - mode: | | ||
| [`upstream-server`](./examples/pupstream-server/) {% new_in 3.14 %} |
|
|
||
| This mode must be used together with other AI MCP Proxy plugins configured with the `listener` mode. | ||
| usecase: | | ||
| Use when you need a single MCP endpoint that aggregates multiple backend tools. |
Comment on lines
+57
to
+58
| curl -s -o api.js "https://gist.githubusercontent.com/subnetmarco/5ddb23876f9ce7165df17f9216f75cce/raw/a44a947d69e6f597465050cc595b6abf4db2fbea/api.js" | ||
| npm install express |
| You should see: | ||
|
|
||
| ```text | ||
| {"name":"Sample Users API"}% |
Comment on lines
+129
to
+131
| We configure the plugin in `upstream-server` mode because this instance only converts RESTful API paths into MCP tool definitions. It doesn’t handle incoming MCP requests directly. Later, we’ll aggregate these tools from multiple conversion-only instances using listener-mode plugins. | ||
|
|
||
| In this configuration we define `tags[]` at the plugin level because listener AI MCP Proxy plugin will use them to discover, aggregate, and expose the registered tools. |
Comment on lines
+251
to
+261
| 1. If successful, you should see the following output in your terminal: | ||
|
|
||
| ```sh | ||
| Starting MCP inspector... | ||
| ⚙️ Proxy server listening on localhost:6277 | ||
| 🔑 Session token: <YOUR_TOKEN> | ||
| Use this token to authenticate requests or set DANGEROUSLY_OMIT_AUTH=true to disable auth | ||
|
|
||
| 🚀 MCP Inspector is up and running at: | ||
| http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<YOUR_TOKEN> | ||
| ``` |
Comment on lines
+263
to
+274
| 1. The script will automatically open a new browser window with MCP Inspector's UI: | ||
|
|
||
| {: style="display:block; margin-left:auto; margin-right:auto; width:70%; border-radius:10px" } | ||
|
|
||
| 1. Click the **Connect** button on the left. | ||
|
|
||
| {:.warning} | ||
| > Make sure that you use **Streamable HTTP** as **Transport Type** and that the URL points at `http://localhost:8000/mcp-listener` | ||
|
|
||
| 1. In the **Tools** tile, click the **List tools** button. You should see the following tools available: | ||
|
|
||
| {: style="display:block; margin-left:auto; margin-right:auto; width:70%; border-radius:10px" } |
Comment on lines
+280
to
+282
| 1. Navigate to **Settings** in the top right corner. | ||
|
|
||
| 1. In the **Cursor Settings** tab, go to **Tools & MCP** in the left sidebar. |
Comment on lines
+291
to
+296
| "mcp-listener": { | ||
| "url": "http://localhost:8000/mcp-listener" | ||
| } | ||
| } | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Title
Use the format
feat/fix/chore(Product): Title, for example:feat(mesh): Add transparent proxy upgrade guidefix(gateway): Correct decK example in rate limiting how-tochore(ai-gateway): Bump plugin schemachore(platform): Fix issue templaterelease: Kong Gateway 3.14Description
Fixes #issue
Preview Links
Checklist
descriptionentry in frontmatter.