Skip to content

feat(ai-gateway): MCP servers aggregator#5266

Open
tomek-labuk wants to merge 2 commits into
release/ai-gateway-2.0from
feat/upstream-mcp-servers
Open

feat(ai-gateway): MCP servers aggregator#5266
tomek-labuk wants to merge 2 commits into
release/ai-gateway-2.0from
feat/upstream-mcp-servers

Conversation

@tomek-labuk
Copy link
Copy Markdown
Contributor

PR Title

Use the format feat/fix/chore(Product): Title, for example:

  • feat(mesh): Add transparent proxy upgrade guide
  • fix(gateway): Correct decK example in rate limiting how-to
  • chore(ai-gateway): Bump plugin schema
  • chore(platform): Fix issue template
  • release: Kong Gateway 3.14

Description

Fixes #issue

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@tomek-labuk tomek-labuk requested a review from a team as a code owner May 18, 2026 07:14
Copilot AI review requested due to automatic review settings May 18, 2026 07:14
@netlify
Copy link
Copy Markdown

netlify Bot commented May 18, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit e93bde0
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a0abc55801519000833b87f
😎 Deploy Preview https://deploy-preview-5266--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-server mode and its interaction with listener mode.
  • Adds a new how-to guide covering aggregation using upstream-server + listener.
  • Updates ACL inheritance wording for listener mode to include upstream-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-server mode; 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:

![MCP Inspector's UI](/assets/images/ai-gateway/mcp-inspector.png){: 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:

![MCP tools in MCP Inspector](/assets/images/ai-gateway/mcp-tools.png){: 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"
}
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants