Interface McpConfiguration

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
McpConfiguration.Jsii$Proxy

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.458Z") @Stability(Stable) public interface McpConfiguration extends software.amazon.jsii.JsiiSerializable
MCP protocol configuration The configuration for the Model Context Protocol (MCP).

This protocol enables communication between Amazon Bedrock Agent and external tools.

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();
 
  • Method Details

    • getInstructions

      @Stability(Stable) @Nullable default String getInstructions()
      The instructions for using the Model Context Protocol gateway.

      These instructions provide guidance on how to interact with the gateway.

      Default: - No instructions provided

    • getSearchType

      @Stability(Stable) @Nullable default McpGatewaySearchType getSearchType()
      The search type for the Model Context Protocol gateway.

      This field specifies how the gateway handles search operations.

      Default: - No search type specified

    • getSupportedVersions

      @Stability(Stable) @Nullable default List<MCPProtocolVersion> getSupportedVersions()
      The supported versions of the Model Context Protocol.

      This field specifies which versions of the protocol the gateway can use.

      Default: - No specific versions specified

    • builder

      @Stability(Stable) static McpConfiguration.Builder builder()
      Returns:
      a McpConfiguration.Builder of McpConfiguration