Skip to content

Remote MCP server URL query parameters are silently dropped, ignoring server configuration #4153

@theJC

Description

@theJC

Bug Description

When registering a remote MCP server whose URL includes query parameters (e.g., ?toolsets=core,alerting,...), those query parameters are not forwarded to the upstream server. Requests arrive at the remote server with only the base path — the query string is silently discarded. The server falls back to its default behavior as if no configuration was provided.

There is no error or warning — the server registers and starts successfully, making the data loss invisible to the user.

Steps to Reproduce

  1. Register a remote MCP server with query parameters that configure its behavior:
    thv run --name datadog \
      "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp?toolsets=core,alerting,apm,cases,dbm,error-tracking,feature-flags,llmobs,product-analytics,networks,onboarding,security,software-delivery,synthetics" \
      --remote-auth
  2. Connect an MCP client (e.g., Claude Code) to the registered server.
  3. Inspect the available tools.

Expected Behavior

All query parameters present in the registration URL are forwarded to the remote server on every request. For the Datadog example above, all explicitly requested toolsets are available — approximately 76 tools across the configured toolsets.

See the Datadog MCP server documentation for how toolsets are selected via query parameters.

Actual Behavior

The remote server receives requests with no query string and falls back to its default configuration. For the Datadog example, only the default toolset is returned — approximately 20 tools — regardless of which toolsets were specified in the registration URL.

Environment

  • ToolHive version: v0.12.1 (and current main)
  • OS: macOS (code path is platform-independent; likely affects all platforms)
  • Affects all remote MCP servers that rely on URL query parameters for configuration

Additional Context

This affects any remote MCP server that uses query parameters to select capabilities, namespaces, or configuration at the URL level. The registration appears to succeed, so there is no indication to the user that their configuration is being ignored.

I plan to submit a PR to resolve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliChanges that impact CLI functionalitygoPull requests that update go codeproxy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions