Skip to content

Conversation

@rahulguptajss
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for overriding the default TSDB (Prometheus/VictoriaMetrics) URL and credentials on a per-request basis in the Harvest MCP server. This allows a single MCP server instance to query multiple TSDB instances dynamically.

Key Changes:

  • Introduced TSDBOverride struct to allow per-request specification of TSDB URL and authentication credentials
  • Renamed request type structs from *Args to *Request for consistency and added TSDBOverride field to all of them
  • Added resolveTSDBConfig() function to determine which TSDB configuration to use (override or default)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
mcp/pkg/mcptypes/types.go Added TSDBOverride struct and renamed all request types from *Args to *Request, adding optional TSDB override field to each
mcp/cmd/server/main.go Updated all handler functions to accept new request types, added resolveTSDBConfig() function, and modified API call functions to accept auth.TSDBConfig parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cgrinds cgrinds merged commit fa8b59d into main Nov 26, 2025
10 checks passed
@cgrinds cgrinds deleted the rg2-mcp-prom branch November 26, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Override default HARVEST_TSDB_URL on a per-request basis for MCP HTTP mode

4 participants