Connecting MCP Servers to Amazon Bedrock AgentCore Gateway
Amazon Bedrock AgentCore Gateway provides a centralized layer for managing how AI agents connect to tools and MCP servers across your organization. It consolidates authentication, observability, and policy enforcement into a single endpoint, removing the need to configure and secure each MCP server connection individually. In this post, we walk through how to configure AgentCore Gateway to connect to an OAuth-protected MCP server using the Authorization Code flow.
As organizations scale their AI agent deployments, the number of MCP servers that each team relies on grows quickly. Developers are adopting Amazon Bedrock AgentCore Gateway as a single endpoint for accessing multiple MCP servers. Instead of configuring each MCP server individually per IDE, teams point to one Gateway URL for consistent access to their full MCP toolset across tools.
This pattern is accelerating as teams move beyond custom MCP servers and adopt production-grade third-party ones, like those from AWS, GitHub, Salesforce, and Databricks. Many of these MCP servers are protected by their primary identity provider through federation, while others are secured by their own authorization servers. As the number of MCP servers per organization grows, managing connections, authentication, and routing at the IDE level becomes unsustainable. AgentCore Gateway centralizes this complexity, giving teams a single control plane for MCP access while providing developers a frictionless experience.
Many enterprise MCP servers require OAuth 2.0 authorization, where the agent must authenticate on behalf of a user before invoking tools. AgentCore Gateway now supports the OAuth 2.0 Authorization Code flow through Amazon Bedrock AgentCore Identity. With this, your agents can securely access protected MCP servers without embedding credentials in application code or managing the token lifecycle manually.
To provide support for the Authorization Code Grant type, we offer two ways for target creations. The first method involves implicit sync during MCP Server target creation, where the admin user completes the authorization code flow during CreateGatewayTarget, UpdateGatewayTarget, or SynchronizeGatewayTargets operations. The second method allows admin users to provide the tool schema directly during CreateGatewayTarget or UpdateGatewayTarget operations, which eliminates the need for the admin user to complete the authorization code flow during target creation or update. This is the recommended approach when human intervention isn’t possible.
In this post, we show how to attach the GitHub MCP server to Amazon Bedrock AgentCore Gateway using both methods. The accompanying code is available in the post.
Run Claude Code Agents in Parallel for Enhanced Efficiency
OpenAI Proposes Reforms for AI Economy Including Robot Taxes
Related articles
Salesforce launches Headless 360 for AI agents
Salesforce has launched Headless 360, exposing all platform capabilities for AI agents.
OpenAI updates Codex to compete with Anthropic
OpenAI has revamped Codex, adding new features to compete with Anthropic.
OpenAI updates Codex to access all applications on your computer
OpenAI updates Codex, enabling access to all applications on your computer and new features.