# McpConfiguration

MCP protocol configuration The configuration for the Model Context Protocol (MCP).

This protocol enables communication between Amazon Bedrock Agent and external tools.

Extends: McpConfiguration
Used as props by: McpProtocolConfiguration

- Source: [`aws-bedrockagentcore/lib/gateway/protocol.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/gateway/protocol.ts#L126)
- Type last changed: v2.255.0 · 19 May 2026

## Example

```ts
// Create a KMS key for encryption
const encryptionKey = new kms.Key(this, "GatewayEncryptionKey", {
  enableKeyRotation: true,
  description: "KMS key for gateway encryption",
});

// Create gateway with KMS encryption
const gateway = new agentcore.Gateway(this, "MyGateway", {
  gatewayName: "my-encrypted-gateway",
  description: "Gateway with KMS encryption",
  protocolConfiguration: new agentcore.McpProtocolConfiguration({
    instructions: "Use this gateway to connect to external MCP tools",
    searchType: agentcore.McpGatewaySearchType.SEMANTIC,
    supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],
  }),
  authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({
    discoveryUrl: "https://auth.example.com/.well-known/openid-configuration",
    allowedAudience: ["my-app"],
    allowedClients: ["my-client-id"],
    allowedScopes: ["read", "write"],
  }),
  kmsKey: encryptionKey,
  exceptionLevel: agentcore.GatewayExceptionLevel.DEBUG,
});
```

## Properties

- `instructions`: 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.

- `searchType`: [McpGatewaySearchType](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.McpGatewaySearchType.html) — The search type for the Model Context Protocol gateway.

  **Default:** No search type specified

  This field specifies how the gateway handles search operations.

- `supportedVersions`: [MCPProtocolVersion](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.MCPProtocolVersion.html)[] — 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.
