Skip to content

[Feature]: Aggregate/proxy upstream servers' MCP prompts through prompts/list #972

Closed

Description

@nlaurance

Problem / motivation

mcpproxy supports the MCP prompts capability, but only exposes two built-in, hardcoded prompts (setup-new-mcp-server, troubleshoot-mcp-server) via registerPrompts() in
internal/server/mcp.go. Upstream MCP servers connected through mcpproxy that advertise their own prompts capability are not surfaced to the client at all — mcpproxy's upstream
client code detects and logs whether an upstream advertises Capabilities.Prompts (internal/upstream/cli/client.go:208), but nothing forwards those prompts through mcpproxy's
own prompts/list/prompts/get. This is inconsistent with how mcpproxy already handles tools/list, where tools from all connected upstream servers are aggregated and re-exposed.
As a result, any workflow or client relying on prompts loses access to upstream-defined prompts as soon as it goes through the proxy.

Proposed solution

Extend mcpproxy's prompt handling to aggregate prompts from connected upstream servers, the same way tools are aggregated today:

  • On prompts/list, merge the two built-in prompts with the prompts advertised by every connected upstream server whose Capabilities.Prompts is non-nil, applying the same
    namespacing/prefixing convention used for tools to avoid name collisions across servers.

  • On prompts/get, resolve the requested (possibly prefixed) prompt name to its owning upstream server and forward the request, returning that server's GetPromptResult
    unchanged.

  • Respect the existing enable_prompts config flag as the master switch for this behavior.

  • Opt-in per-server aggregation flag: Add a per-upstream-server config option (e.g. expose_prompts: true) instead of aggregating by default for every server that advertises the
    capability. This gives finer control and avoids surprises if two servers register colliding prompt names, but adds config surface area and an extra step users must remember
    when adding a new server. Could be layered on top of the default-aggregation approach later if collisions or unwanted exposure become a real problem.

Alternatives considered

do nothing

Which edition?

Both / not sure

Pre-submission checklist

  • I searched existing issues and discussions for a similar request

Activity

  1. 5 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions