McpConfiguration Struct
MCP protocol configuration The configuration for the Model Context Protocol (MCP).
This protocol enables communication between Amazon Bedrock Agent and external tools.
| Source | lib/gateway/protocol.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
const mcpConfiguration: bedrock_agentcore_alpha.McpConfiguration = {
instructions: 'instructions',
searchType: bedrock_agentcore_alpha.McpGatewaySearchType.SEMANTIC,
supportedVersions: [bedrock_agentcore_alpha.MCPProtocolVersion.MCP_2025_06_18],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha
mcp_configuration = bedrock_agentcore_alpha.McpConfiguration(
instructions="instructions",
search_type=bedrock_agentcore_alpha.McpGatewaySearchType.SEMANTIC,
supported_versions=[bedrock_agentcore_alpha.MCPProtocolVersion.MCP_2025_06_18]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;
McpConfiguration mcpConfiguration = McpConfiguration.builder()
.instructions("instructions")
.searchType(McpGatewaySearchType.SEMANTIC)
.supportedVersions(List.of(MCPProtocolVersion.MCP_2025_06_18))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
var mcpConfiguration = new McpConfiguration {
Instructions = "instructions",
SearchType = McpGatewaySearchType.SEMANTIC,
SupportedVersions = new [] { MCPProtocolVersion.MCP_2025_06_18 }
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
mcpConfiguration := &McpConfiguration{
Instructions: jsii.String("instructions"),
SearchType: bedrock_agentcore_alpha.McpGatewaySearchType_SEMANTIC,
SupportedVersions: []MCPProtocolVersion{
bedrock_agentcore_alpha.MCPProtocolVersion_MCP_2025_06_18,
},
}
Properties
instructionsoptionalstringinstructionsoptionalstrinstructionsoptionalStringInstructionsoptionalstringInstructionsoptional*string #The instructions for using the Model Context Protocol gateway.
Default: No instructions provided
These instructions provide guidance on how to interact with the gateway.
searchTypeoptionalMcpGatewaySearchTypesearch_typeoptionalMcpGatewaySearchTypesearchTypeoptionalMcpGatewaySearchTypeSearchTypeoptionalMcpGatewaySearchTypeSearchTypeoptionalMcpGatewaySearchType #The search type for the Model Context Protocol gateway.
Default: No search type specified
This field specifies how the gateway handles search operations.
supportedVersionsoptionalMCPProtocolVersion[]supported_versionsoptionaltyping.List[MCPProtocolVersion]supportedVersionsoptionalList<MCPProtocolVersion>SupportedVersionsoptionalMCPProtocolVersion[]SupportedVersionsoptional*[]MCPProtocolVersion #The supported versions of the Model Context Protocol.
Default: No specific versions specified
This field specifies which versions of the protocol the gateway can use.