Repository navigation
feat: add Basic and Digest authentication for upstream connections - #250
Merged
Merged
Conversation
sparfenyuk
previously approved these changes
Oct 10, 2026
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (25.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #250 +/- ##
==========================================
- Coverage 89.37% 88.67% -0.71%
==========================================
Files 12 12
Lines 1318 1333 +15
Branches 72 75 +3
==========================================
+ Hits 1178 1182 +4
- Misses 121 132 +11
Partials 19 19
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
sparfenyuk
approved these changes
Oct 10, 2026
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.
MCP servers behind embedded Apache (or similar built-in HTTP frontends) often require Basic or Digest authentication. Bypassing that layer is usually impractical. Basic can already be forced with a static
Authorizationheader, but Digest needs a proper challenge/response flow — and that is where most setups fall short.Aside from a generic reverse proxy — which is not always convenient — I could not find an MCP proxy with Digest support for upstream connections. This change would make
mcp-proxythe first of its kind in that niche.mcp-proxyalready forwardshttpx.Authinto the Streamable HTTP and SSE clients, with OAuth2 client credentials wired the same way. Opening Basic and Digest through the CLI is a small, natural extension — reuse the existing HTTPX capability without changing the MCP transport.--username/--password→httpx.BasicAuth--username/--password/--digest→httpx.DigestAuth--client-id+--client-secret+--token-url) still takes priorityUses stock
httpx.DigestAuth— no custom Digest implementation.Verified against a real Streamable HTTP MCP endpoint with both Basic and Digest, including a full handshake rather than a single HTTP request.