Interface McpServer
- All Superinterfaces:
BaseResource
Represents an MCP Server configuration that exposes a set of tools to AI agents via the Model Context Protocol.
Example to create an instance using the builder pattern
McpServer mcpServer = McpServer.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.authenticationMode(McpServerAuthenticationMode.CLIENT_CREDENTIALS)
.state(McpServerState.ENABLED)
.mcpServer(mcpServerBuilder -> mcpServerBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic McpServerBuilderbuilder()builder factory method for McpServerstatic McpServerBuildercreate builder for McpServer instancecopyDeep()static McpServerfactory method to create a deep copy of McpServer@NotNull McpServerAuthenticationModeDetermines how AI agents authenticate when connecting to the MCP Server.@NotNull ZonedDateTimeDate and time (UTC) the MCP Server was initially created.@Valid CreatedByIDs and references that created the MCP Server.@Valid LocalizedStringDescription of the MCP Server.@NotNull StringgetId()Unique identifier of the MCP Server.@NotNull StringgetKey()User-defined unique identifier of the MCP Server within a Project.@NotNull ZonedDateTimeDate and time (UTC) the MCP Server was last updated.@Valid LastModifiedByIDs and references that last modified the MCP Server.@NotNull @Valid McpServerConfigConfiguration of the MCP Server connection.@Valid LocalizedStringgetName()Name of the MCP Server.@NotNull McpServerStategetState()State of the MCP Server.@NotNull LongCurrent version of the MCP Server.static McpServerof()factory methodstatic McpServerfactory method to create a shallow copy McpServervoidsetAuthenticationMode(McpServerAuthenticationMode authenticationMode) Determines how AI agents authenticate when connecting to the MCP Server.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the MCP Server was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the MCP Server.voidsetDescription(LocalizedString description) Description of the MCP Server.voidUnique identifier of the MCP Server.voidUser-defined unique identifier of the MCP Server within a Project.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the MCP Server was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the MCP Server.voidsetMcpServer(McpServerConfig mcpServer) Configuration of the MCP Server connection.voidsetName(LocalizedString name) Name of the MCP Server.voidsetState(McpServerState state) State of the MCP Server.voidsetVersion(Long version) Current version of the MCP Server.static tools.jackson.core.type.TypeReference<McpServer>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithMcpServer(Function<McpServer, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the MCP Server.
- Specified by:
getIdin interfaceBaseResource- Returns:
- id
-
getVersion
Current version of the MCP Server.
- Specified by:
getVersionin interfaceBaseResource- Returns:
- version
-
getCreatedAt
Date and time (UTC) the MCP Server was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the MCP Server was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the MCP Server.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the MCP Server.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the MCP Server within a Project.
- Returns:
- key
-
getName
Name of the MCP Server.
- Returns:
- name
-
getDescription
Description of the MCP Server.
- Returns:
- description
-
getAuthenticationMode
Determines how AI agents authenticate when connecting to the MCP Server.
- Returns:
- authenticationMode
-
getState
State of the MCP Server. A
DisabledMCP Server rejects all AI agent tool requests.- Returns:
- state
-
getMcpServer
Configuration of the MCP Server connection.
- Returns:
- mcpServer
-
setId
Unique identifier of the MCP Server.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the MCP Server.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the MCP Server was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the MCP Server was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the MCP Server.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the MCP Server.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the MCP Server within a Project.
- Parameters:
key- value to be set
-
setName
Name of the MCP Server.
- Parameters:
name- value to be set
-
setDescription
Description of the MCP Server.
- Parameters:
description- value to be set
-
setAuthenticationMode
Determines how AI agents authenticate when connecting to the MCP Server.
- Parameters:
authenticationMode- value to be set
-
setState
State of the MCP Server. A
DisabledMCP Server rejects all AI agent tool requests.- Parameters:
state- value to be set
-
setMcpServer
Configuration of the MCP Server connection.
- Parameters:
mcpServer- value to be set
-
of
factory method- Returns:
- instance of McpServer
-
of
factory method to create a shallow copy McpServer- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
McpServer copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of McpServer- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for McpServer- Returns:
- builder
-
builder
create builder for McpServer instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withMcpServer
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-