GatewayTargetMcpServerProps
- class aws_cdk.aws_bedrock_agentcore_alpha.GatewayTargetMcpServerProps(*, gateway_target_name, description=None, credential_provider_configurations, endpoint, gateway)
Bases:
GatewayTargetCommonProps(experimental) Properties for creating an MCP Server-based Gateway Target.
- Parameters:
gateway_target_name (
str) – (experimental) The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.description (
Optional[str]) – (experimental) Optional description for the gateway target The description can have up to 200 characters. Default: - No descriptioncredential_provider_configurations (
Sequence[ICredentialProviderConfig]) – (experimental) Credential providers for authentication.endpoint (
str) – (experimental) The HTTPS endpoint URL of the MCP server. The endpoint must: - Use HTTPS protocol - Be properly URL-encoded - Point to an MCP server that implements tool capabilitiesgateway (
IGateway) – (experimental) The gateway this target belongs to.
- Stability:
experimental
- ExampleMetadata:
fixture=default infused
Example:
gateway = agentcore.Gateway(self, "MyGateway", gateway_name="my-gateway" ) # OAuth2 authentication (recommended) # Note: Create the OAuth provider using AWS console or Identity L2 construct when available oauth_provider_arn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/oauth2credentialprovider/my-oauth" oauth_secret_arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:my-oauth-secret-abc123" # Create a gateway target with MCP Server mcp_target = agentcore.GatewayTarget.for_mcp_server(self, "MyMcpServer", gateway_target_name="my-mcp-server", description="External MCP server integration", gateway=gateway, endpoint="https://my-mcp-server.example.com", credential_provider_configurations=[ agentcore.GatewayCredentialProvider.from_oauth_identity_arn( provider_arn=oauth_provider_arn, secret_arn=oauth_secret_arn, scopes=["mcp-runtime-server/invoke"] ) ] )
Attributes
- credential_provider_configurations
(experimental) Credential providers for authentication.
- Stability:
experimental
- description
(experimental) Optional description for the gateway target The description can have up to 200 characters.
- Default:
No description
- Stability:
experimental
- endpoint
(experimental) The HTTPS endpoint URL of the MCP server.
The endpoint must:
Use HTTPS protocol
Be properly URL-encoded
Point to an MCP server that implements tool capabilities
- Stability:
experimental
- gateway
(experimental) The gateway this target belongs to.
- Stability:
experimental
- gateway_target_name
^([0-9a-zA-Z][-]?){1,100}$.
- Stability:
experimental
- Type:
(experimental) The name of the gateway target The name must be unique within the gateway Pattern