mcpproxy-go
mcpproxy-go copied to clipboard
[Feature]: Forward upstream sampling requests to the client
Problem / motivation
mcpproxy initializes upstreams with empty client capabilities (connection_lifecycle.go#L32) and has no handler for sampling/createMessage, so upstreams that ask the client's LLM to generate text can't do it.
Proposed solution
Declare sampling to upstreams and forward sampling/createMessage to the client that made the tool call; decline when that client doesn't support sampling.
Alternatives considered
Same mechanism as #1964 (elicitation). Sampling is deprecated in the 2026-07-28 spec (#532), but 2025-11-25 upstreams still use it.
Which edition?
Personal
Pre-submission checklist
- [x] I searched existing issues and discussions for a similar request