This article is a machine translation of the contents of the following URL, which I wrote in Japanese:

【AWS】AgentCore harness の外部ツール連携を connections で簡単にする【AgentCore】 #AIエージェント - Qiita

はじめに AIエージェントに GitHub や Jira などの外部サービスを操作させたい場面は多いです。Amazon Bedrock AgentCore では、外部の MCP サーバーのツールを AgentCore Gateway 経由でエージェントに渡せます。ただ、そ...

favicon qiita.com

Introduction

There are many situations where you want an AI agent to operate external services such as GitHub or Jira. In Amazon Bedrock AgentCore, you can pass the tools of an external MCP server to an agent through AgentCore Gateway. However, this requires you to set up a gateway, inbound authentication, IAM roles, targets, outbound authentication to the external service, and tool synchronization, and you often end up repeating the same setup for each agent.

On November 30, 2026 (JST), connections for AgentCore harness were announced as a public preview. Once you create a connection to an external service, you only need to attach it to a harness, and the agent can use the tools of that external service.

Announcement: Simplified external tool integration for AgentCore harness is now available in preview

https://aws.amazon.com/about-aws/whats-new/2026/11/agentcore-connections-preview/

Documentation: Connect harness agents to external tools with connections

https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/connections.html

In this article, I organize how connections work and how they differ from using AgentCore Gateway directly. I also check the whole flow, from creating a connection to using it from an agent, on a real environment in us-east-1.

What Are Connections?

A connection is a resource that gives the tools of an external service to the agents of an AgentCore harness. The developer guide explains why connections were introduced as follows.

Without connections, connecting an agent to an external MCP service can mean setting up a gateway, inbound identity, IAM roles, targets, outbound authentication, tool discovery, and synchronization before you can test a single tool. Teams often repeat that setup for each agent, and they manage credentials, tools, and access controls in different places.

Source: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/connections.html

Here are the terms related to connections, taken from the Concepts section of the developer guide.

Term Description
Connection An AgentCore resource that gives harness agents the tools of an external service. It holds the connector configuration and a reference to the credential
Connector An AWS-maintained definition for each supported service. It has the public MCP endpoint, the supported authentication method, and a recommended starting tool set
Shared credential A shared credential used to authenticate to the external service (an API key, a provider token, or a personal access token)
Managed execution resources The gateway and target resources that AgentCore creates and operates to run a connection

Relationship with the GitHub MCP Server

Connections are not separate from integrating with MCP servers provided by GitHub and others. A connector is a definition that points to the public MCP endpoint of an external service, and what the agent calls are the tools of that MCP server. Connections are a mechanism in which AgentCore takes over the work of connecting to the MCP server.

Lining up the ways to connect to the GitHub MCP server gives the following.

How to connect What you prepare Suitable situations
Connect directly from a client such as Claude Code Configure the MCP server URL and a token in your own client Personal development work
Register the MCP server as a target of AgentCore Gateway Set up the gateway, inbound authentication, IAM roles, targets, outbound authentication to the external service, and tool synchronization When you have destinations inside a VPC, or want fine-grained control of the gateway
Connections Choose a connector and enter the credential. AgentCore creates and operates the gateway and other resources When you want to reuse the same external service across multiple harnesses

A gateway also runs behind connections. In the related services section, the developer guide describes the gateway as follows.

AgentCore Gateway – Provides the managed execution layer behind a connection: MCP routing, inbound IAM and SigV4 authentication, outbound credential injection, tool calls, and observability.

The URL that the GitHub connector connects to is not written in the developer guide. In the console, it was not shown on the connection details page, the gateway target details page, or the "Additional settings" of the target. Therefore, whether the destination is the official GitHub MCP server could not be confirmed within the scope of this article.

Overview of connections: create a connection, add it to a harness, and call the tools of an external MCP server through a gateway

Flow of a Tool Call

When an agent calls a tool of a connection, AgentCore processes it in the following order.

  1. Routes the request through the managed execution resources for the connection
  2. Injects the shared credential and sends the tool call to the external service
  3. Returns the result to the agent

Permissions on the external service side are determined by the credential.

The external service applies its own permissions, based on the credential. For example, a GitHub personal access token can reach only the repositories it's been granted.

Source: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/connections-how-it-works.html

Supported Connectors

The release notes list the following 12 connectors.

Atlassian, Bright Data, Exa, Firecrawl, GitHub, Linear, PagerDuty, Parallel, Smartsheet, Stripe, Tavily, Zapier

Source: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/release-notes.html

On the connection creation page in the console (us-east-1), the same 12 were available as providers. (The screenshots in this article are from the Japanese console.)

Provider options

Verification

Prerequisites

Item Details
Region us-east-1
Date 2026-11-30
Harness An existing harness, edited for the test
External service GitHub (one test repository)
Credential A GitHub fine-grained personal access token, limited to the test repository, with only read and write access to Issues and read access to Contents

I narrowed the permissions of the credential because the developer guide asks for least privilege.

Use a credential with the smallest scope that your agents need.

Verification 1: Create a Connection

When I opened Connections (Preview) under "Connectors" in the left menu of the console, the page was named "External connections" in the Japanese console.

Connections page

The main input fields on the "Create connection" page are as follows.

Field Value I entered
Provider GitHub
Connection name github-connections-test
API key A GitHub fine-grained personal access token

Create connection page

"Supported tools" listed 45 tools and was display-only. There was no way to select tools individually, and the page said "All of these tools will be available as part of this connection."

Supported tools

In "Associated gateway" at the bottom of the page, you can choose "Default gateway" or "Existing gateway." This time, I created the connection with the default gateway.

Associated gateway

Before creating it, there was only one gateway, which had been created by the quick start when I created the harness.

Gateway list before creating the connection

After creation, the status became Ready right away. A banner at the top of the details page said, "To use this, add it as a tool in the settings and connect it to a harness agent."

Connection details after creation

After creation, the following resources had been created automatically.

Resource Created? Name and details
Gateway Yes <account ID>-default-v1. Created at the same time as the connection. Inbound authentication is IAM
Gateway target Yes github-connections-test. The protocol is MCP, the path is /github-connections-test, and the target type is shown as "Unknown"
AgentCore Identity credential Yes One outbound auth entry, github-connections-test-09lci7oucg (type: API Key), was added. The same name is set in the outbound auth configuration of the target. The API key itself is stored in a Secrets Manager secret (bedrock-agentcore-identity!default/apikey/...)
IAM role Yes A service role named AmazonBedrockAgentCoreGatewayDefaultServiceRole followed by numbers, dedicated to the default gateway. Two managed policies were attached. The creation time was not checked

Gateway list after creating the connection

Gateway details

Gateway target

Identity

Identity details

The description on the creation page said "This connection uses the default gateway and IAM role that AgentCore has already created," but in fact a new gateway was created at the same time as the connection. This matches the developer guide: "Default gateway – AgentCore creates a gateway and an IAM role with the necessary permissions."

Verification 2: Add the Connection to a Harness

The "Tools" section of the harness edit page has the following toggles.

# Toggle
1 Gateway
2 Browser tool
3 Code interpreter tool
4 Remote MCP server
5 Connections - Preview
6 Custom functions

The toggle for connections is the fifth one, "Connections - Preview." Its description says, "Use all connections available in this account. These are managed by the default gateway."

When you turn it on, a table of included connections lists the connections managed by the default gateway (name, provider, and tools). The table had no way to select connections. Since there was only one connection this time, I did not check whether you can select connections individually when there are two or more.

Connections toggle on the harness edit page

The fourth toggle, "Remote MCP server," lets you specify the URL and authentication headers of an MCP server directly in the harness. It is an option separate from connections.

After saving the harness, three entries appeared in the tools table: the gateway that was already attached, the browser tool, and github-connections-test. The type of the connection was shown as "Connection," the tool endpoint as "-," and the outbound auth as "IAM role." A gateway and a connection can be attached to the same harness.

Harness tools after the update

Verification 3: Use It from the Agent

# Prompt Expected Result
1 List the open Issues in the test repository A list of Issues is returned Success. Three Issues (#3, #2, #1) were returned
2 Create an Issue in the test repository It is created, and its author is the token owner Success. Issue #4 was created, and its author was the token owner (Nananao)

I sent the prompts from the harness playground (harness harness_d8gc0, endpoint DEFAULT).

For the first prompt, the agent trace showed one step, a tool call named "Github-Connections-Test List Issues," with a successful status. The input was {"state":"OPEN","owner":"Nananao","repo":"connections-test"}, and the output was three Issues. The agent returned the three Issues as a table.

Listing Issues

For the second prompt, "Github-Connections-Test Issue Write" succeeded in 2.2 seconds, and Issue #4 was created. Write tools can be used as well.

Creating an Issue

When I opened Issue #4 on GitHub, the author was Nananao, the same account as the token owner. Nothing on the page indicated the agent or AgentCore.

The created Issue on GitHub

Because the token this time belonged to my own account, the Issue cannot be distinguished from one I created myself. This result matches the developer guide: "A connection acts as one shared project, application, machine user, or token owner, so it doesn't preserve each employee's own permissions or attribution in the external service."

Verification 4: Attach a Connection to an Existing Gateway

In "Associated gateway" on the connection creation page, you can also choose "Existing gateway." Here, I prepared a gateway with no targets, connections-test-gw, attached a connection to it, and checked whether it can be used from a harness.

I created connections-test-gw with the CLI for this test. In the console's gateway creation page, I could not delete the default target (the trash button did not respond), so I could not create a gateway without targets. Its settings are as follows.

Item Setting
Inbound authentication IAM
Supported versions 2025-11-25, 2026-07-28
Session timeout 3600 seconds
IAM role A service role created for this test
Targets None

On the connections page, I opened "Create connection," chose "Existing gateway" in "Associated gateway," and specified connections-test-gw. When you choose it, a gateway drop-down, a refresh button, and a "Create gateway" link appear.

Field Value I entered
Provider GitHub
Connection name github-connections-test-console-gw
API key The same token as the first one
Associated gateway Existing gateway (connections-test-gw)

Create connection for an existing gateway

Choosing the existing gateway

After creation, the list on the connections page showed only the first connection, not the one I had just created.

Connections list

Checking with the CLI, I found that the following had been created. No new gateway was created.

Created Details
Target github-connections-test-console-gw was added to connections-test-gw, and it was READY
Credential A credential provider github-connections-test-console-gw-… and its secret
IAM policy A managed policy AmazonBedrockAgentCoreGatewayApiKeyProd_… was automatically attached to the IAM role of the gateway

The automatically attached managed policy contained the following three permissions. All of them were limited to this gateway and the credential created this time.

Action Resource
bedrock-agentcore:GetWorkloadAccessToken The workload identity of this gateway
bedrock-agentcore:GetResourceApiKey The credential provider created this time
secretsmanager:GetSecretValue The secret created this time

A connection attached to an existing gateway does not appear in the list on the connections page, so you check it as a target on the gateway details page.

On the harness edit page, I selected connections-test-gw under "Gateway" and turned "Connections - Preview" off.

Selecting the existing gateway in the harness

In a new session, I sent the following prompt.

# Prompt Expected Result
1 Get the details of Issue #1 in Nananao/connections-test using the GitHub tools A tool call "Github-Connections-Test-Console-Gw …" appears in the trace and succeeds Success. "Github-Connections-Test-Console-Gw Issue Read" succeeded in 2.2 seconds, and the content of Issue #1 was returned

The trace had two steps, with one tool call, "Github-Connections-Test-Console-Gw Issue Read," which succeeded in 2.2 seconds. The "Console-Gw" in the display name comes from the target name github-connections-test-console-gw. The tool output included the body of Issue #1 and author_association (OWNER), and the agent returned the title, state, author, body, URL, and other details as a table.

Result in the harness

A connection attached to an existing gateway can be used by attaching that gateway to the harness under "Gateway." The harness had been saved before I created the connection, and it worked without saving it again. This is probably because the harness configuration contains only the ARN of the gateway and does not specify targets (I checked the configuration with the CLI).

Summary of the Results

Here is a summary of the results.

Item Result
Tool approval Supported tools on the creation page are display-only. There is no way to select them individually, and at the connection level all listed tools are available, as the developer guide says. Whether tools can be narrowed with allowedTools in the harness was not checked
Adding destinations The console offers only 12 providers, and I found no option to add one by entering a URL. To specify a URL and authentication headers directly, use "Remote MCP server" in the harness
Attaching to a harness Turning on "Connections - Preview" lists the connections managed by the default gateway as included connections. There is no way to select them individually (checked with one connection)
Existing gateway A connection created with an existing gateway does not appear in the list on the connections page, but it worked when that gateway was attached to the harness under "Gateway"

Other findings from the verification are as follows.

Item Details
What a connection is A gateway target. It consists of the connector github (1.0.0) and an API key credential provider. The destination URL is not shown in the console either
Automatically created resources With the default gateway, a gateway, a target, a credential (Identity and a Secrets Manager secret), and an IAM role were created
With an existing gateway No new gateway is created, and a target is added to that gateway. A managed policy for reading the credential is automatically attached to the gateway's IAM role
Credential storage The API key is stored in a Secrets Manager secret as an AgentCore Identity provider. The value of the API key is not shown in the console
Records on the external service The author of the Issue created by the agent is the token owner. Nothing indicates the agent or AgentCore

Choosing Between Connections and AgentCore Gateway

Connections in preview have the following constraints (from Preview considerations in the developer guide).

Item Details
Supported resources AgentCore harness only
Targets Publicly reachable remote MCP services only
Authentication Shared credentials only. Per-user OAuth (three-legged OAuth) and on-behalf-of access are not supported
Dependence on external services Depends on each external service's availability, rate limits, licenses, credential model, and data-handling terms
Advanced gateway features If you need gateway-specific identity or networking controls, use AgentCore Gateway directly and attach it to the harness as a tool
Changes before GA Features, quotas, and supported Regions can change before general availability

The constraint with the biggest impact is authentication.

A connection acts as one shared project, application, machine user, or token owner, so it doesn't preserve each employee's own permissions or attribution in the external service.

Source: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/connections.html

Every agent that uses a connection operates the external service as the single token owner. The external service does not record which employee's request led to an operation.

Based on the above, you can choose as follows.

Condition Suitable approach
Using a public MCP server with a shared account is enough Connections
You have destinations inside a VPC Use AgentCore Gateway directly
You want fine-grained control of gateway authentication or networking Use AgentCore Gateway directly
You want to operate the external service with each user's own permissions Connections are not suitable. Consider an approach that supports per-user OAuth
You want fine-grained access control per tool Combine with Policy in AgentCore

Sending Data to External Services

Tool arguments are sent to the external service. The developer guide asks you to review the provider's terms before creating a connection.

When your agent calls a tool through a connection, AgentCore sends the tool request, including its arguments, to the external service. The service processes that data under its own terms and privacy policy. Review the provider's terms before you create a connection.

Source: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/connections-how-it-works.html

Conclusion

Connections for AgentCore harness let you create a connection to an external service once and then use its tools from a harness without worrying about credentials or gateways. In this verification, creating a connection automatically prepared a gateway and a credential, and by simply attaching it to a harness, the agent could list and create GitHub Issues. A connection attached to an existing gateway also worked when that gateway was attached to the harness.

On the other hand, all listed tools become available, and the external service is operated as the token owner. When using connections in practice, I think it is good to limit the token's permissions to the operations you need and to check in advance whether the lack of per-person records meets your audit requirements.

The operation in the announcement, "approves the actions agents can take," was not found on the console pages I checked. Since this is a preview, I would like to check again at GA whether per-tool approval and per-user authentication are supported.

References