interface GatewayTargetMcpServerProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.GatewayTargetMcpServerProps |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#GatewayTargetMcpServerProps |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.GatewayTargetMcpServerProps |
Python | aws_cdk.aws_bedrock_agentcore_alpha.GatewayTargetMcpServerProps |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป GatewayTargetMcpServerProps |
Properties for creating an MCP Server-based Gateway Target.
Example
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-gateway",
});
// OAuth2 authentication (recommended)
// Note: Create the OAuth provider using AWS console or Identity L2 construct when available
const oauthProviderArn = "arn:aws:bedrock-agentcore:us-east-1:123456789012:token-vault/abc123/oauth2credentialprovider/my-oauth";
const oauthSecretArn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:my-oauth-secret-abc123";
// Create a gateway target with MCP Server
const mcpTarget = agentcore.GatewayTarget.forMcpServer(this, "MyMcpServer", {
gatewayTargetName: "my-mcp-server",
description: "External MCP server integration",
gateway: gateway,
endpoint: "https://my-mcp-server.example.com",
credentialProviderConfigurations: [
agentcore.GatewayCredentialProvider.fromOauthIdentityArn({
providerArn: oauthProviderArn,
secretArn: oauthSecretArn,
scopes:['mcp-runtime-server/invoke']
}),
],
});
Properties
| Name | Type | Description |
|---|---|---|
| credential | ICredential[] | Credential providers for authentication. |
| endpoint | string | The HTTPS endpoint URL of the MCP server. |
| gateway | IGateway | The gateway this target belongs to. |
| gateway | string | The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$. |
| description? | string | Optional description for the gateway target The description can have up to 200 characters. |
credentialProviderConfigurations
Type:
ICredential[]
Credential providers for authentication.
endpoint
Type:
string
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
gateway
Type:
IGateway
The gateway this target belongs to.
gatewayTargetName
Type:
string
The name of the gateway target The name must be unique within the gateway Pattern: ^([0-9a-zA-Z][-]?){1,100}$.
description?
Type:
string
(optional, default: No description)
Optional description for the gateway target The description can have up to 200 characters.

.NET
Go
Java
Python
TypeScript (