Skip to content

fix(mcp): refresh commands when prompt list changes#31397

Open
rekram1-node wants to merge 1 commit into
devfrom
fix/mcp-prompts-list-changed
Open

fix(mcp): refresh commands when prompt list changes#31397
rekram1-node wants to merge 1 commit into
devfrom
fix/mcp-prompts-list-changed

Conversation

@rekram1-node
Copy link
Copy Markdown
Collaborator

Summary

  • handle notifications/prompts/list_changed for MCP servers advertising prompts.listChanged
  • publish a prompt-specific MCP event and invalidate the affected instance command cache
  • ignore notifications from disconnected or replaced MCP clients
  • leave resource notification handling out of scope

Fixes #28579

Tests

  • bun typecheck (from packages/opencode)
  • bun test test/mcp/lifecycle.test.ts (from packages/opencode)
  • bun prettier --check src/mcp/index.ts src/command/index.ts test/mcp/lifecycle.test.ts (from packages/opencode)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: MCP prompts are no longer listed after connecting MCP server

1 participant