Annotation Interface McpProgress


@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) @Documented public @interface McpProgress
Annotation for methods that handle progress notifications from MCP servers. This annotation is applicable only for MCP clients.

Methods annotated with this annotation can be used to consume progress messages from MCP servers. The methods takes a single parameter of type ProgressNotification

Example usage:

{@code
 @McpProgress(clientId = "my-client-id")
 public void handleProgressMessage(ProgressNotification notification) {
     // Handle the progress notification
 }</pre>

 @author Christian Tzolov

 @see io.modelcontextprotocol.spec.McpSchema.ProgressNotification
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Used as connection or client identifier to select the MCP client, the progress consumer is associated with.
  • Element Details

    • clients

      String[] clients
      Used as connection or client identifier to select the MCP client, the progress consumer is associated with. At least one client identifier must be specified.