Skip to content

Propagate backend resources/prompts list_changed in vMCP #5969

Closed

Description

@JAORMX

Part of #5743 (Workstream B: 2025-11-25 compliance). Follow-up to #5965 / #5748.

Context

#5965 landed backend list_changed propagation in vMCP for tools only: a persistent backend connection observes notifications/tools/list_changed, invalidates the capability cache, and re-syncs the session's advertised tool set so the per-session go-sdk server auto-emits tools/list_changed downstream. WithToolCapabilities(true) was flipped.

Resources/prompts were explicitly deferred (see pkg/vmcp/server/serve_list_changed.go file doc and docs/arch/10-virtual-mcp-architecture.md §"Scope: tools only"). Today:

  • the backend connector (pkg/vmcp/session/internal/backend) does not dispatch notifications/resources/list_changed / notifications/prompts/list_changed to the resync sink;
  • serve.go still advertises WithResourceCapabilities(true, false) and no prompt listChanged.

Proposed work

  • Dispatch backend notifications/resources/list_changed and notifications/prompts/list_changed to the resync path (extend the ListChangedSink contract / connector handler).
  • Extend the resync worker to re-derive and apply the session's advertised resources (and resource templates) and prompts, so the per-session go-sdk server emits the corresponding downstream list_changed.
  • Flip WithResourceCapabilities(true, true) and add WithPromptCapabilities(true).
  • Reuse the existing coalescing/liveness/shutdown machinery from Consume backend list_changed in vMCP and propagate to clients #5965 rather than a parallel implementation.

Known limitation (separate toolhive-core follow-up)

mcpcompat's per-session syncSessionResources/syncSessionResourceTemplates/syncSessionPrompts are add-only (unlike syncSessionTools, which reconciles adds+removes). So additions will propagate but removals will not, and advertising listChanged: true is honest for additions only. Making those sync paths reconciling (using go-sdk's RemoveResources/RemoveResourceTemplates/RemovePrompts) is a stacklok/toolhive-core (mcpcompat) change + version bump — track separately. This issue delivers the toolhive-side propagation + additions.

Priority: Medium.

Activity

  1. self-assigned this
    on Jul 24, 2026
  2. added
    vmcp
    on Jul 24, 2026
  3. added
    needs-triage
    on Jul 24, 2026
  4. added a commit that references this issue on Jul 24, 2026
    5264c7e
  5. added a commit that references this issue on Jul 24, 2026
    d77dafc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-triagevmcp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions