You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Aggregate/proxy upstream servers' MCP prompts through prompts/list #972
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
feat(server): design spec for aggregating upstream MCP prompts (smart…
feat(server): add per-server expose_prompts override to prompts desig…
feat(server): correct prompts design to reuse colon/__ naming split, …
feat(config): add per-server ExposePrompts override (smart-mcp-proxy#972
feat(upstream): add core.Client.ListPrompts/GetPrompt (smart-mcp-prox…
feat(upstream): add managed.Client.ListPrompts/GetPrompt (smart-mcp-p…
feat(upstream): add Manager.ListPrompts/GetPrompt aggregation (smart-…
fix(upstream): guard nil client/config in Manager.GetPrompt lookup (s…
feat(server): add FormatDirectPromptName helper (smart-mcp-proxy#972)
feat(server): aggregate upstream prompts via RefreshPrompts (smart-mc…
feat(server): refresh aggregated prompts on servers.changed (smart-mc…
fix(storage): persist ExposePrompts field across BBolt round-trip (sm…
fix(server): bound RefreshPrompts upstream fan-out with a timeout (sm…
fix(upstream): use GetConfig() accessor in prompt aggregation (smart-…
docs(oas): regenerate OpenAPI spec for ExposePrompts field (smart-mcp…
5 remaining items
feat(upstream): add core.Client.ListPrompts/GetPrompt (smart-mcp-prox…
feat(upstream): add managed.Client.ListPrompts/GetPrompt (smart-mcp-p…
feat(upstream): add Manager.ListPrompts/GetPrompt aggregation (smart-…
fix(upstream): guard nil client/config in Manager.GetPrompt lookup (s…
feat(server): add FormatDirectPromptName helper (smart-mcp-proxy#972)
feat(server): aggregate upstream prompts via RefreshPrompts (smart-mc…
feat(server): refresh aggregated prompts on servers.changed (smart-mc…
fix(storage): persist ExposePrompts field across BBolt round-trip (sm…
fix(server): bound RefreshPrompts upstream fan-out with a timeout (sm…
fix(upstream): use GetConfig() accessor in prompt aggregation (smart-…
docs(oas): regenerate OpenAPI spec for ExposePrompts field (smart-mcp…
test(prompts): close patch-coverage gaps in prompt aggregation (smart…
fix(config): merge and detect expose_prompts changes on hot-reload
feat: Aggregate upstream MCP prompts through prompts/list (#973)