feat: set User-Agent: cloudflare-mcp on all outbound Cloudflare API requests - #203
Open
jhutchings1 wants to merge 2 commits into
Open
feat: set User-Agent: cloudflare-mcp on all outbound Cloudflare API requests#203jhutchings1 wants to merge 2 commits into
jhutchings1 wants to merge 2 commits into
Conversation
jhutchings1
force-pushed
the
feat/user-agent
branch
from
August 24, 2026 16:20
5bb5113 to
871d0e6
Compare
jhutchings1
marked this pull request as ready for review
August 24, 2026 16:22
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.
Adds
User-Agent: cloudflare-mcpto all outbound requests the MCP server makes to the Cloudflare API, making server-originated traffic identifiable in Cloudflare's own analytics and logs.Without this, requests from the MCP server are indistinguishable from any other bearer token usage at the HTTP layer.
USER_AGENTconstant defined insrc/constants.tsalongsideSERVER_INFOfetchWithRetryinjects the header on every call — handles both string-URL andRequest-object inputs, always overriding any caller-supplied valuecloudflare-auth.ts) are intentionally excludedUser-Agentis present viaHeaders.get()(fixing stale bracket-access assertions in the process)