McpConfiguration
- class aws_cdk.aws_bedrock_agentcore_alpha.McpConfiguration(*, instructions=None, search_type=None, supported_versions=None)
Bases:
object(experimental) MCP protocol configuration The configuration for the Model Context Protocol (MCP).
This protocol enables communication between Amazon Bedrock Agent and external tools.
- Parameters:
instructions (
Optional[str]) – (experimental) The instructions for using the Model Context Protocol gateway. These instructions provide guidance on how to interact with the gateway. Default: - No instructions providedsearch_type (
Optional[McpGatewaySearchType]) – (experimental) The search type for the Model Context Protocol gateway. This field specifies how the gateway handles search operations. Default: - No search type specifiedsupported_versions (
Optional[Sequence[MCPProtocolVersion]]) – (experimental) 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
- Stability:
experimental
- ExampleMetadata:
fixture=default infused
Example:
# Create a KMS key for encryption encryption_key = kms.Key(self, "GatewayEncryptionKey", enable_key_rotation=True, description="KMS key for gateway encryption" ) # Create gateway with KMS encryption gateway = agentcore.Gateway(self, "MyGateway", gateway_name="my-encrypted-gateway", description="Gateway with KMS encryption", protocol_configuration=agentcore.McpProtocolConfiguration( instructions="Use this gateway to connect to external MCP tools", search_type=agentcore.McpGatewaySearchType.SEMANTIC, supported_versions=[agentcore.MCPProtocolVersion.MCP_2025_03_26] ), authorizer_configuration=agentcore.GatewayAuthorizer.using_custom_jwt( discovery_url="https://auth.example.com/.well-known/openid-configuration", allowed_audience=["my-app"], allowed_clients=["my-client-id"] ), kms_key=encryption_key, exception_level=agentcore.GatewayExceptionLevel.DEBUG )
Attributes
- instructions
(experimental) The instructions for using the Model Context Protocol gateway.
These instructions provide guidance on how to interact with the gateway.
- Default:
No instructions provided
- Stability:
experimental
- search_type
(experimental) The search type for the Model Context Protocol gateway.
This field specifies how the gateway handles search operations.
- Default:
No search type specified
- Stability:
experimental
- supported_versions
(experimental) 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
- Stability:
experimental