Skip to content

Send custom User-Agent on all MCP server API calls#22

Merged
mars-steven merged 2 commits into
mainfrom
custom-user-agent
May 12, 2026
Merged

Send custom User-Agent on all MCP server API calls#22
mars-steven merged 2 commits into
mainfrom
custom-user-agent

Conversation

@mars-steven
Copy link
Copy Markdown
Contributor

Summary

  • Adds a User-Agent: gemini-mcp/<pkg-version> (node/<node-version>) header to every Gemini API request made from the MCP server (both publicGet and authenticatedPost in packages/mcp-server/src/client/http.ts).
  • Version pulled from package.json via createRequire so it stays in sync with release bumps. Bumped to 1.0.1.

Test plan

  • npx tsc --noEmit clean
  • npm test — 22/22 pass
  • Confirm User-Agent shows up in upstream access logs after deploy

🤖 Generated with Claude Code

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@mars-steven mars-steven merged commit 313cc32 into main May 12, 2026
5 checks passed
@mars-steven mars-steven deleted the custom-user-agent branch May 12, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants