Annotation Interface McpServer


Binds features (tools, prompts, resources) to a named MCP server configuration.

A feature can be bound to multiple server configurations. The set of bindings includes all values declared on the feature method and all values defined on the declaring class of the feature.

How MCP server configurations are declared and specified is implementation dependent. It's expected that implementations will provide some way of configuring the name, description and path of each MCP server configuration.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Container annotation for McpServer
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the server configuration the annotated features are bound to.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Constant value for the name of the default server.
  • Field Details

  • Element Details

    • value

      String value
      The name of the server configuration the annotated features are bound to.

      If not specified, they will be linked to the default configuration.

      Returns:
      the server configuration name
      Default:
      "<default>"