-
Notifications
You must be signed in to change notification settings - Fork 255
[WIP] feat(mcp): serve multiple MCP servers from one router on separate paths #3151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d85134c
844d887
ee8bbe9
513d6b1
736064a
5a99bba
78e8084
cdaeec8
1385b18
e39bcb1
845d31a
2f95ae7
359b5bb
0b7ce0a
b6d33fc
29dd40e
73878c5
89ac4f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,18 @@ GET /.well-known/oauth-protected-resource/mcp | |
|
|
||
| This follows the [RFC 9728](https://datatracker.ietf.org/doc/rfc9728/) path-aware format. MCP clients use this endpoint to automatically discover the authorization server and all supported scopes. | ||
|
|
||
| <Info> | ||
| This example uses `mcp.server.base_url` and the default `/mcp` path from the deprecated single-server form. With | ||
| `mcp.servers`, each server publishes its own metadata at its own `base_url` and `path`. See | ||
| [Multiple Servers with OAuth Behind a Load Balancer](/router/mcp/configuration#multiple-servers-with-oauth-behind-a-load-balancer). | ||
| </Info> | ||
|
Comment on lines
+127
to
+131
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Inspect how the resource identifier and metadata path are derived from base_url and mount path.
set -uo pipefail
fd -t f 'paths.go|paths_test.go|server.go' router/pkg/mcpserver --exec rg -n -C 6 'oauth-protected-resource|Resource|base_url|BaseURL|MountPath'Repository: wundergraph/cosmo Length of output: 13681 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- OAuth configuration example ---'
sed -n '110,155p' docs-website/router/mcp/oauth/configuration.mdx
printf '%s\n' '--- Multiple-server configuration reference ---'
sed -n '220,245p' docs-website/router/mcp/configuration.mdx
printf '%s\n' '--- base_url and path references in the OAuth documentation ---'
rg -n -C 3 'base_url|oauth\.jwks|audiences|resource' docs-website/router/mcp/oauth/configuration.mdx docs-website/router/mcp/configuration.mdxRepository: wundergraph/cosmo Length of output: 29131 Include 🤖 Prompt for AI Agents |
||
|
|
||
| <Warning> | ||
| Without a matching audience, the router accepts a token minted for one MCP server on every other server. When | ||
| you run more than one MCP server with OAuth, set `oauth.jwks[].audiences` on each server to that server's | ||
| resource identifier. | ||
| </Warning> | ||
|
|
||
| **Example response:** | ||
|
|
||
| ```json | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the scope of the deprecation notice.
The block marks the whole table as deprecated. The table includes
mcp.enabled(Line 340) andmcp.server.listen_addr(Line 341).docs-website/router/mcp/configuration.mdxLines 249-250 state thatmcp.server.listen_addrandmcp.server.base_urlare not deprecated, and Lines 121-122 state thatmcp.enabledstill controls all servers. Name the exceptions here so the two pages agree.📝 Proposed wording fix
📝 Committable suggestion
🤖 Prompt for AI Agents