Skip to content

Support Prompts server features for MCP 2025-11-25 #251

Description

@jmesnil

From the MCP Server Gap Analysis & Implementation Plan, this issue tracks the gaps and implementation steps related to Prompts.

Gap Summary

# Gap Priority Spec Section
6 Prompt title not emitted in prompts/list Medium Prompts
13 notifications/prompts/list_changed not sent Low Prompts

Implementation Steps

Step 3: Extract new annotation fields during deployment scanning

File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/deployment/MCPServerDependencyProcessor.java

3b. processPrompts() — extract from @Prompt annotation:
  • title from annotation.value("title")

Step 4c: prompts/list response

File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/server/PromptMessageHandler.javapromptsList()

Add "title" if non-empty.

Step 5: Declare listChanged in capabilities

File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/server/MCPMessageHandler.java

Update the capabilities declaration:

capabilities.put("prompts", Map.of("listChanged", true));

This declares that the server may send list-changed notifications. The actual sending mechanism is Step 8.

Step 8: Implement list-changed notifications

8a. Infrastructure for sending notifications to all connections

File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/api/ConnectionManager.java

Add a method to broadcast a notification to all active connections:

void broadcast(JsonObject notification);
8b. Send notifications/prompts/list_changed

These would be triggered when the registry changes (e.g., hot deployment of a new WAR). The WildFly deployment processor could fire these on deploy/undeploy. This is inherently tied to WildFly's deployment lifecycle.

For now, provide the infrastructure (broadcast method) and wire it into the deployment lifecycle hooks.

Metadata

Metadata

Assignees

Labels

mcpIssues and PR related to MCP

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions