Connect an Amazon Bedrock AgentCore Gateway to Teleport
Teleport can provide secure access to MCP servers via Teleport Application Service.
In this guide, you will:
- Configure your Amazon Bedrock AgentCore Gateway service for access by the MCP server.
- Run the Amazon Bedrock AgentCore Gateway MCP Server.
- Enroll the MCP server into your Teleport cluster and connect to it.
How it works
The Amazon Bedrock AgentCore Gateway is configured to trust Teleport as its inbound identity provider. Teleport authenticates client requests and proxies them to the AgentCore Gateway, which then forwards the requests to the target MCP servers.
Prerequisites
-
A running Teleport (v18.7.0 or higher) cluster. If you want to get started with Teleport, sign up for a free trial or set up a demo environment.
-
The
tshclient.Installing
tshclient-
Determine the version of your Teleport cluster. The
tshclient must be at most one major version behind your Teleport cluster version. Send a GET request to the Proxy Service at/v1/webapi/findand use a JSON query tool to obtain your cluster version. Replace teleport.example.com:443 with the web address of your Teleport Proxy Service:TELEPORT_DOMAIN=teleport.example.com:443TELEPORT_VERSION="$(curl -s https://$TELEPORT_DOMAIN/v1/webapi/find | jq -r '.server_version')" -
Follow the instructions for your platform to install
tshclient:- Mac
- Windows - Powershell
- Linux
Download the signed macOS .pkg installer for Teleport, which includes the
tshclient:curl -O https://cdn.teleport.dev/teleport-${TELEPORT_VERSION?}.pkgIn Finder double-click the
pkgfile to begin installation.dangerUsing Homebrew to install Teleport is not supported. The Teleport package in Homebrew is not maintained by Teleport and we can't guarantee its reliability or security.
curl.exe -O https://cdn.teleport.dev/teleport-v${TELEPORT_VERSION?}-windows-amd64-bin.zipUnzip the archive and move the `tsh` client to your %PATH%
NOTE: Do not place the `tsh` client in the System32 directory, as this can cause issues when using WinSCP.
Use %SystemRoot% (C:\Windows) or %USERPROFILE% (C:\Users\<username>) instead.
All of the Teleport binaries in Linux installations include the
tshclient. For more options (including RPM/DEB packages and downloads for i386/ARM/ARM64) see our installation page.curl -O https://cdn.teleport.dev/teleport-v${TELEPORT_VERSION?}-linux-amd64-bin.tar.gztar -xzf teleport-v${TELEPORT_VERSION?}-linux-amd64-bin.tar.gzcd teleportsudo ./installTeleport binaries have been copied to /usr/local/bin
-
- Ability to configure your Amazon Bedrock AgentCore Gateway
- An agent running the Teleport Application Service. If you have not yet done this, follow the Getting Started guide.
- A Teleport user with sufficient permissions (e.g. role
mcp-user) to access MCP servers.
Step 1/2. Configure Amazon Bedrock AgentCore Gateway
To change Inbound Auth Configurations of your Amazon Bedrock AgentCore gateway, go to your gateway in AWS Management Console. Click the Edit button in the Inbound Identity* section.
Select Use JSON Web Tokens (JWT) as the Inbound Auth type and select Use existing Identity provider configurations for JWT schema configuration. Note that creating a new gateway may be required if they cannot be modified after gateway creation.
Use the following as Discovery URL:
https://teleport.example.com/.well-known/openid-configuration
Replace teleport.example.com with your Teleport cluster name.
Use the following for Allowed audiences under JWT Authorization Configuration:
mcp+https://your-mcp-gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp
Replace https://your-mcp-gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp with your Gateway resource URL, which is available after the gateway is created. Note that this value is also the application URI you will use to create the Teleport application.
All other settings under JWT Authorization Configuration like Allowed clients should not be selected.
Step 2/2. Connect via Teleport
You can register an MCP application in Teleport by defining it in your Teleport
Application Service configuration, or by using dynamic registration with tctl
or Terraform:
- Static configuration
- tctl
- Terraform
app_service:
enabled: "yes"
apps:
- name: "bedrock-mcp"
uri: "mcp+https://your-mcp-gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp"
labels:
env: dev
service: "bedrock"
rewrite:
headers:
- "Authorization: Bearer {{internal.id_token}}"
Restart the Application Service.
Create an app resource definition file named app-bedrock-mcp.yaml:
# app-bedrock-mcp.yaml
kind: app
version: v3
metadata:
name: "bedrock-mcp"
labels:
env: dev
service: "bedrock"
spec:
uri: "mcp+https://your-mcp-gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp"
rewrite:
headers:
- name: "Authorization"
value: "Bearer {{internal.id_token}}"
Create the app resource with:
tctl create -f app-bedrock-app.yaml
Create a teleport_app resource in terraform:
resource "teleport_app" "bedrock" {
version = "v3"
metadata = {
name = "bedrock-mcp"
labels = {
"teleport.dev/origin" = "dynamic"
"env" = "dev"
"service" = "bedrock"
}
}
spec = {
uri = "mcp+https://your-mcp-gateway.bedrock-agentcore.us-east-1.amazonaws.com/mcp"
rewrite = {
headers = [{
name = "Authorization"
value = "Bearer {{internal.id_token}}"
}]
}
}
}
Apply the configuration:
terraform apply
To grant access to the MCP server and all its tools, assign the preset
mcp-user role to your Teleport user.
Optionally, you can limit which MCP tools the user can access by adjusting the
mcp.tools list in their role. For example:
kind: role
version: v8
metadata:
name: bedrock-mcp-readonly
spec:
allow:
app_labels:
'service': 'bedrock'
mcp:
# Adjust this list based on the MCP tools exposed by the gateway’s targets.
tools:
- ^(get|query|list|search|find)_.*$
Now wait until the application appears in tsh mcp ls, then configure your MCP
clients to access the MCP server, for example:
tsh mcp config bedrock-mcp --client-config claude
After configuring your MCP client, you will find Amazon Bedrock AgentCore Gateway-related tools from
teleport-mcp-bedrock-mcp. You can now use these tools to interactive with
Amazon Bedrock AgentCore Gateway via Teleport in your MCP clients:
Next steps
- Review Enroll a Streamable-HTTP MCP Server.
- See the dynamic registration guide.
- Learn more about Egress JWT Authentication.
- Connect your MCP clients.