Package org.mcpjava.server
Annotation Interface McpServer
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Documented
@Repeatable(McpServers.class)
public @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 -
Optional Element Summary
Optional Elements -
Field Summary
Fields
-
Field Details
-
DEFAULT
Constant value for the name of the default server.- See Also:
-
-
Element Details
-
value
String valueThe 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>"
-