# MCPServerAuthorizationConfigProperty

- Source: Generated at build time
- Type last changed: v2.264.0 · 10 Aug 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_devopsagent as devopsagent } from 'aws-cdk-lib';

declare const exchangeParameters: any;
const mCPServerAuthorizationConfigProperty: devopsagent.CfnService.MCPServerAuthorizationConfigProperty = {
  apiKey: {
    apiKeyHeader: 'apiKeyHeader',
    apiKeyName: 'apiKeyName',
    apiKeyValue: 'apiKeyValue',
  },
  bearerToken: {
    tokenName: 'tokenName',
    tokenValue: 'tokenValue',

    // the properties below are optional
    authorizationHeader: 'authorizationHeader',
  },
  oAuthClientCredentials: {
    clientId: 'clientId',
    clientSecret: 'clientSecret',
    exchangeUrl: 'exchangeUrl',

    // the properties below are optional
    clientName: 'clientName',
    exchangeParameters: exchangeParameters,
    scopes: ['scopes'],
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_devopsagent as devopsagent

# exchange_parameters: Any

m_cp_server_authorization_config_property = devopsagent.CfnService.MCPServerAuthorizationConfigProperty(
    api_key=devopsagent.CfnService.ApiKeyDetailsProperty(
        api_key_header="apiKeyHeader",
        api_key_name="apiKeyName",
        api_key_value="apiKeyValue"
    ),
    bearer_token=devopsagent.CfnService.BearerTokenDetailsProperty(
        token_name="tokenName",
        token_value="tokenValue",

        # the properties below are optional
        authorization_header="authorizationHeader"
    ),
    o_auth_client_credentials=devopsagent.CfnService.MCPServerOAuthClientCredentialsConfigProperty(
        client_id="clientId",
        client_secret="clientSecret",
        exchange_url="exchangeUrl",

        # the properties below are optional
        client_name="clientName",
        exchange_parameters=exchange_parameters,
        scopes=["scopes"]
    )
)
```

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

Object exchangeParameters;

MCPServerAuthorizationConfigProperty mCPServerAuthorizationConfigProperty = MCPServerAuthorizationConfigProperty.builder()
        .apiKey(ApiKeyDetailsProperty.builder()
                .apiKeyHeader("apiKeyHeader")
                .apiKeyName("apiKeyName")
                .apiKeyValue("apiKeyValue")
                .build())
        .bearerToken(BearerTokenDetailsProperty.builder()
                .tokenName("tokenName")
                .tokenValue("tokenValue")

                // the properties below are optional
                .authorizationHeader("authorizationHeader")
                .build())
        .oAuthClientCredentials(MCPServerOAuthClientCredentialsConfigProperty.builder()
                .clientId("clientId")
                .clientSecret("clientSecret")
                .exchangeUrl("exchangeUrl")

                // the properties below are optional
                .clientName("clientName")
                .exchangeParameters(exchangeParameters)
                .scopes(List.of("scopes"))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DevOpsAgent;

var exchangeParameters;

var mCPServerAuthorizationConfigProperty = new MCPServerAuthorizationConfigProperty {
    ApiKey = new ApiKeyDetailsProperty {
        ApiKeyHeader = "apiKeyHeader",
        ApiKeyName = "apiKeyName",
        ApiKeyValue = "apiKeyValue"
    },
    BearerToken = new BearerTokenDetailsProperty {
        TokenName = "tokenName",
        TokenValue = "tokenValue",

        // the properties below are optional
        AuthorizationHeader = "authorizationHeader"
    },
    OAuthClientCredentials = new MCPServerOAuthClientCredentialsConfigProperty {
        ClientId = "clientId",
        ClientSecret = "clientSecret",
        ExchangeUrl = "exchangeUrl",

        // the properties below are optional
        ClientName = "clientName",
        ExchangeParameters = exchangeParameters,
        Scopes = new [] { "scopes" }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/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/awscdk"

var exchangeParameters interface{}

mCPServerAuthorizationConfigProperty := &MCPServerAuthorizationConfigProperty{
	ApiKey: &ApiKeyDetailsProperty{
		ApiKeyHeader: jsii.String("apiKeyHeader"),
		ApiKeyName: jsii.String("apiKeyName"),
		ApiKeyValue: jsii.String("apiKeyValue"),
	},
	BearerToken: &BearerTokenDetailsProperty{
		TokenName: jsii.String("tokenName"),
		TokenValue: jsii.String("tokenValue"),

		// the properties below are optional
		AuthorizationHeader: jsii.String("authorizationHeader"),
	},
	OAuthClientCredentials: &MCPServerOAuthClientCredentialsConfigProperty{
		ClientId: jsii.String("clientId"),
		ClientSecret: jsii.String("clientSecret"),
		ExchangeUrl: jsii.String("exchangeUrl"),

		// the properties below are optional
		ClientName: jsii.String("clientName"),
		ExchangeParameters: exchangeParameters,
		Scopes: []*string{
			jsii.String("scopes"),
		},
	},
}
```

## Properties

- `apiKey`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.ApiKeyDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_devopsagent.CfnService.ApiKeyDetailsProperty.html) — API key authentication details.

- `bearerToken`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.BearerTokenDetailsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_devopsagent.CfnService.BearerTokenDetailsProperty.html) — Bearer token authentication details.

- `oAuthClientCredentials`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnService.MCPServerOAuthClientCredentialsConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_devopsagent.CfnService.MCPServerOAuthClientCredentialsConfigProperty.html) — MCP server OAuth client credentials configuration.
