Repository navigation
fix(mcp-worker): set explicit fetch cache mode for axios 1.20 - #596
Merged
Merged
Conversation
jonathannorris
marked this pull request as ready for review
October 8, 2026 20:20
jonathannorris
requested review from
jsalaber and
suthar26
and
a balanced review from Copilot
October 8, 2026 20:20
suthar26
approved these changes
Oct 8, 2026
There was a problem hiding this comment.
🟡 Changes recommended
The critical compatibility fix lacks regression coverage for both Axios request paths.
1 open finding
What changed in this PR
Configures Axios for Cloudflare Workers compatibility after the Axios 1.20 upgrade.
Changes:
- Sets
cache: 'no-store'for global and shared Axios clients. - Loads these defaults from the worker entry point.
| File | Description |
|---|---|
mcp-worker/src/index.ts |
Initializes Worker-specific Axios defaults. |
mcp-worker/src/axiosFetchDefaults.ts |
Applies the supported fetch cache mode. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+12
to
+13
| axios.defaults.fetchOptions = fetchOptions | ||
| axiosClient.defaults.fetchOptions = fetchOptions |
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.

Summary
cache: 'default', which the Workers runtime rejects withUnsupported cache mode: default. This broke every tool on the remote MCP server.fetchOptions: { cache: 'no-store' }on both the globalaxios.defaultsand the sharedaxiosClientfrom the worker entry, so directaxioscalls (e.g.src/mcp/utils/github.ts) are covered too. The CLI is unchanged.Related Issues
Relates to #592