Skip to content

Add support for MCP notifications/prompts/list_changed notifications #4094

Description

@Helmi

Description

Claude Code currently doesn't respond to notifications/prompts/list_changed notifications sent by MCP servers. This prevents dynamic prompt updates from appearing in the UI without restarting Claude Code.

Current Behavior

When an MCP server:

  1. Advertises prompts.listChanged: true capability
  2. Detects changes to prompt files
  3. Sends notifications/prompts/list_changed notification

Claude Code does not:

  • Refresh the prompt list
  • Update prompt descriptions
  • Show newly added prompts
  • Remove deleted prompts

Expected Behavior

When receiving a notifications/prompts/list_changed notification, Claude Code should:

  1. Re-fetch the prompt list from the server
  2. Update the UI to reflect changes
  3. Show new prompts without requiring a restart

Technical Details

MCP servers can advertise support for dynamic prompt updates:

const server = new Server(
  { name: 'my-server', version: '1.0.0' },
  {
    capabilities: {
      prompts: {
        listChanged: true,  // Indicates support for notifications
      },
    },
  },
);

// When prompts change, server sends:
await server.notification({
  method: 'notifications/prompts/list_changed',
  params: {},
});

Use Case

This feature enables:

  • Hot-reloading of prompt templates during development
  • Dynamic prompt loading based on context
  • Better developer experience when creating/modifying prompts
  • Plugin systems where prompts can be added at runtime

Additional Context

  • The MCP specification includes this capability
  • Other MCP clients (e.g., GitHub Copilot) support these notifications
  • Similar notifications exist for tools (notifications/tools/list_changed) and resources

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions