Class MCPProtocolVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.MCPProtocolVersion
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.456Z") @Stability(Stable) public class MCPProtocolVersion extends software.amazon.jsii.JsiiObject
MCP protocol versions.

The Model Context Protocol uses string-based version identifiers following the format YYYY-MM-DD, to indicate the last date backwards incompatible changes were made. Versions are available at https://github.com/modelcontextprotocol/modelcontextprotocol/releases

Example:

 // Create a KMS key for encryption
 Key encryptionKey = Key.Builder.create(this, "GatewayEncryptionKey")
         .enableKeyRotation(true)
         .description("KMS key for gateway encryption")
         .build();
 // Create gateway with KMS encryption
 Gateway gateway = Gateway.Builder.create(this, "MyGateway")
         .gatewayName("my-encrypted-gateway")
         .description("Gateway with KMS encryption")
         .protocolConfiguration(McpProtocolConfiguration.Builder.create()
                 .instructions("Use this gateway to connect to external MCP tools")
                 .searchType(McpGatewaySearchType.SEMANTIC)
                 .supportedVersions(List.of(MCPProtocolVersion.MCP_2025_03_26))
                 .build())
         .authorizerConfiguration(GatewayAuthorizer.usingCustomJwt(CustomJwtConfiguration.builder()
                 .discoveryUrl("https://auth.example.com/.well-known/openid-configuration")
                 .allowedAudience(List.of("my-app"))
                 .allowedClients(List.of("my-client-id"))
                 .allowedScopes(List.of("read", "write"))
                 .build()))
         .kmsKey(encryptionKey)
         .exceptionLevel(GatewayExceptionLevel.DEBUG)
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final MCPProtocolVersion
    MCP version 2025-03-26.
    static final MCPProtocolVersion
    The latest version of the MCP protocol.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MCPProtocolVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    MCPProtocolVersion(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The version string value.
    of(String value)
    Use a custom MCP protocol version not yet defined in this class.
    Returns the string value.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • MCP_2025_03_26

      @Stability(Stable) public static final MCPProtocolVersion MCP_2025_03_26
      MCP version 2025-03-26.
    • MCP_2025_06_18

      @Stability(Stable) public static final MCPProtocolVersion MCP_2025_06_18
      The latest version of the MCP protocol.
  • Constructor Details

    • MCPProtocolVersion

      protected MCPProtocolVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • MCPProtocolVersion

      protected MCPProtocolVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • of

      @Stability(Stable) @NotNull public static MCPProtocolVersion of(@NotNull String value)
      Use a custom MCP protocol version not yet defined in this class.

      Parameters:
      value - The version string (YYYY-MM-DD format). This parameter is required.
    • toString

      @Stability(Stable) @NotNull public String toString()
      Returns the string value.
      Overrides:
      toString in class Object
    • getValue

      @Stability(Stable) @NotNull public String getValue()
      The version string value.