-
Notifications
You must be signed in to change notification settings - Fork 111
Includes specific user-agent for MCP #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small suggestion, but LGTM overall. 👏
| // Product metadata, used to generate the request User-Agent header and | ||
| // passed to the McpServer constructor. | ||
| const product = { | ||
| name: "elasticsearch-mcp-server", | ||
| version: "0.1.1", | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick improvement so you don't have to remember to modify this file before every release.
| // Product metadata, used to generate the request User-Agent header and | |
| // passed to the McpServer constructor. | |
| const product = { | |
| name: "elasticsearch-mcp-server", | |
| version: "0.1.1", | |
| }; | |
| // Product metadata, used to generate the request User-Agent header and | |
| // passed to the McpServer constructor. | |
| const { version } = JSON.parse(fs.readFileSync('package.json')) | |
| const product = { | |
| name: "elasticsearch-mcp-server", | |
| version, | |
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I actually wondered about this while I was writing it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems E&T is still code owners, 🚢 + I will look into adding your team as well
|
buildkite test this |
|
buildkite test this |
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
* Update index.ts to accept path prefix in Elasticsearch URL * Update README.md to include information about path prefix --------- Co-authored-by: Josh Mock <[email protected]>
…c#74) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
…astic#76) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
|
buildkite test this |
|
buildkite test this |

This passes in a specific user agent to identify traffic as originating from the MCP server. The product name and version has been extracted into a separate variable near the top of the script, and this is then used to both populate the User-Agent header and the McpServer object constructor.