# AddMcpServerTargetOptions

Options for adding an MCP Server target to a gateway.

Used as argument in: [Gateway.addMcpServerTarget](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.Gateway.html#addmcpservertarget)

- Source: [`lib/gateway/gateway.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/gateway.ts#L197)

## Example

TypeScript:

```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';

declare const credentialProviderConfig: bedrock_agentcore_alpha.ICredentialProviderConfig;
const addMcpServerTargetOptions: bedrock_agentcore_alpha.AddMcpServerTargetOptions = {
  credentialProviderConfigurations: [credentialProviderConfig],
  endpoint: 'endpoint',

  // the properties below are optional
  description: 'description',
  gatewayTargetName: 'gatewayTargetName',
};
```

Python:

```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

# credential_provider_config: bedrock_agentcore_alpha.ICredentialProviderConfig

add_mcp_server_target_options = bedrock_agentcore_alpha.AddMcpServerTargetOptions(
    credential_provider_configurations=[credential_provider_config],
    endpoint="endpoint",

    # the properties below are optional
    description="description",
    gateway_target_name="gatewayTargetName"
)
```

Java:

```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.*;

ICredentialProviderConfig credentialProviderConfig;

AddMcpServerTargetOptions addMcpServerTargetOptions = AddMcpServerTargetOptions.builder()
        .credentialProviderConfigurations(List.of(credentialProviderConfig))
        .endpoint("endpoint")

        // the properties below are optional
        .description("description")
        .gatewayTargetName("gatewayTargetName")
        .build();
```

C# / .NET:

```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;

ICredentialProviderConfig credentialProviderConfig;

var addMcpServerTargetOptions = new AddMcpServerTargetOptions {
    CredentialProviderConfigurations = new [] { credentialProviderConfig },
    Endpoint = "endpoint",

    // the properties below are optional
    Description = "description",
    GatewayTargetName = "gatewayTargetName"
};
```

Golang:

```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 bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"

var credentialProviderConfig ICredentialProviderConfig

addMcpServerTargetOptions := &AddMcpServerTargetOptions{
	CredentialProviderConfigurations: []ICredentialProviderConfig{
		credentialProviderConfig,
	},
	Endpoint: jsii.String("endpoint"),

	// the properties below are optional
	Description: jsii.String("description"),
	GatewayTargetName: jsii.String("gatewayTargetName"),
}
```

## Properties

- `credentialProviderConfigurations`: [ICredentialProviderConfig](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.ICredentialProviderConfig.html)[] (required) — Credential providers for authentication.

  MCP servers require explicit authentication configuration.
  OAuth2 is strongly recommended over NoAuth.

- `description`: string — Optional description for the gateway target.

  **Default:** No description

- `endpoint`: string (required) — 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

- `gatewayTargetName`: string — The name of the gateway target Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen).

  **Default:** auto generate
