Skip to content

mcp: query param APIKey#1800

Merged
nacx merged 8 commits intomainfrom
queryparammcp
Feb 8, 2026
Merged

mcp: query param APIKey#1800
nacx merged 8 commits intomainfrom
queryparammcp

Conversation

@mathetake
Copy link
Member

@mathetake mathetake commented Jan 21, 2026

Description
This adds support for API Key upstream auth as a HTTP query parameter for MCP servers. There are several public MCP server that employ this pattern, thus this unlocks several patterns.

To adds support for that, this remove the use of CredentialsInjector for inserting API Keys as it doesn't support the query parameter as a location.

Related Issues/PRs (if applicable)
Closes #1731

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 90.32258% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.55%. Comparing base (4347d17) to head (0c84721).

Files with missing lines Patch % Lines
internal/controller/mcp_route.go 89.83% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1800      +/-   ##
==========================================
+ Coverage   83.48%   83.55%   +0.06%     
==========================================
  Files         124      124              
  Lines       16438    16427      -11     
==========================================
+ Hits        13723    13725       +2     
+ Misses       1814     1805       -9     
+ Partials      901      897       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
@mathetake mathetake marked this pull request as ready for review January 27, 2026 18:25
@mathetake mathetake requested a review from a team as a code owner January 27, 2026 18:25
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 27, 2026
@nacx nacx enabled auto-merge (squash) February 2, 2026 19:14
@nacx nacx merged commit 08b18e2 into main Feb 8, 2026
34 checks passed
@nacx nacx deleted the queryparammcp branch February 8, 2026 17:36
changminbark pushed a commit to changminbark/ai-gateway that referenced this pull request Feb 9, 2026
**Description**
This adds support for API Key upstream auth as a HTTP query parameter
for MCP servers. There are several public MCP server that employ this
pattern, thus this unlocks several patterns.

To adds support for that, this remove the use of CredentialsInjector for
inserting API Keys as it doesn't support the query parameter as a
location.



**Related Issues/PRs (if applicable)**
Closes envoyproxy#1731

---------

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Ignasi Barrera <ignasi@tetrate.io>
@mtparet
Copy link
Contributor

mtparet commented Feb 12, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcp: support passing query parameters to the MCP URL

4 participants