AI Cloud Architect

Connecting MCP servers to Amazon Bedrock AgentCore Gateway using Authorization Code flow

AWSHow-to by Arko Dutta, Eashan Kaushik, Sheetal Mohite and Tanuja JoshiAWS Artificial Intelligence Blog

Amazon Bedrock AgentCore Gateway provides a centralized layer for managing how AI agents connect to tools and MCP servers across your organization. In this post, we walk through how to configure AgentCore Gateway to connect to an OAuth-protected MCP server using the Authorization Code flow.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

AgentCore Gateway now supports the OAuth 2.0 Authorization Code flow for MCP server targets, with admin-time sync or schema provided upfront.

Who it is for

Teams running AI agents through AgentCore Gateway that need to connect OAuth-protected MCP servers such as GitHub without embedding credentials.

Key points

  • Gateway must be created with MCP version 2025-11-25 or later to enable the Authorization code grant (3LO) option.
  • Schema-upfront method avoids admin browser consent at target creation but does not support SynchronizeGatewayTargets.
  • Authorization URL and session URI are valid for 10 minutes.

Timeline

Posts about Amazon Bedrock AgentCore Gateway, oldest first.

  1. Blog postTransform your MCP architecture: Unite MCP servers through AgentCore Gateway · AWS · Blog post
  2. How-toBuild a biomedical research agent with Biomni tools and Amazon Bedrock AgentCore Gateway · AWS · How-to
  3. New featureApply fine-grained access control with Bedrock AgentCore Gateway interceptors · AWS · Announcement
  4. Blog postStreamline AI agent tool interactions: Connect API Gateway to AgentCore Gateway with MCP · AWS · Blog post
  5. This postConnecting MCP servers to Amazon Bedrock AgentCore Gateway using Authorization Code flow
  6. How-toConfiguring Amazon Bedrock AgentCore Gateway for secure access to private resources · AWS · How-to
  7. Read nextAWS Quick integration with time-series databases for market intelligence using MCP · AWS · How-to
  8. How-toSecure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway · AWS · How-to
  9. Blog postExtending MCP support for Amazon Bedrock AgentCore Gateway · AWS · Blog post
Show all 31 posts
  1. New featureAmazon Bedrock AgentCore Gateway supports AWS PrivateLink invocation and invocation logging · AWS · Announcement
  2. How-toSecure ingress connectivity to Amazon Bedrock AgentCore Gateway using interface VPC endpoints · AWS · How-to
  3. Blog postTransform your MCP architecture: Unite MCP servers through AgentCore Gateway · AWS · Blog post
  4. How-toBuild a biomedical research agent with Biomni tools and Amazon Bedrock AgentCore Gateway · AWS · How-to
  5. New featureApply fine-grained access control with Bedrock AgentCore Gateway interceptors · AWS · Announcement
  6. Blog postStreamline AI agent tool interactions: Connect API Gateway to AgentCore Gateway with MCP · AWS · Blog post
  7. This postConnecting MCP servers to Amazon Bedrock AgentCore Gateway using Authorization Code flow
  8. How-toConfiguring Amazon Bedrock AgentCore Gateway for secure access to private resources · AWS · How-to
  9. Read nextAWS Quick integration with time-series databases for market intelligence using MCP · AWS · How-to
  10. How-toSecure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway · AWS · How-to
  11. Blog postExtending MCP support for Amazon Bedrock AgentCore Gateway · AWS · Blog post
  12. How-toBuilding a secure auth code flow setup using AgentCore Gateway with MCP clients · AWS · How-to
  13. Generally availableIntroducing Web Search on Amazon Bedrock AgentCore · AWS · Announcement
  14. Generally availableAWS WAF adds support for Amazon Bedrock AgentCore Gateway · AWS · Announcement
  15. How-toImplement on-behalf-of token exchange for multi-tenant agents with Amazon Bedrock AgentCore Gateway · AWS · How-to
  16. Update to an existing featureHow AgentCore Gateway supports the MCP 2026-07-28 spec · AWS · Announcement
  17. How-toConfigure rate limits for AI traffic on AgentCore gateway · AWS · How-to
  18. How-toSecuring AI agents with temporal policies in Amazon Bedrock AgentCore · AWS · How-to
  19. How-toGovern AI agent tool access with Amazon Bedrock AgentCore Gateway · AWS · How-to
  20. Explained inConnect an AgentCore Runtime hosted MCP server to AWS Quick · AWS · How-to
  21. How-toBuild a multi-account AI agent with AgentCore Gateway and MCP · AWS · How-to
  22. Update to an existing featureAgentCore Gateway supports private TLS certificates for VPC endpoints · AWS · Announcement
  23. Blog postHow Eon built multi-cloud investigation with an MCP Gateway on Amazon Bedrock AgentCore · AWS · Blog post
  24. New featureAgentCore Gateway now supports Bedrock InvokeModel APIs and model fallback · AWS · Announcement
  25. New featureAWS Step Functions workflows now available as AI agent tools · AWS · Announcement
  26. Customer storyHow MoEngage turned over 400 APIs into agent tools with AgentCore Gateway · AWS · Customer story
  27. How-toServiceNow on-behalf-of token exchange with Bedrock AgentCore Gateway · AWS · How-to
  28. How-toGovern AI agent access with Okta Cross App Access and Amazon Bedrock AgentCore – Part 2 · AWS · How-to
  29. Read nextSecure OAuth patterns for Snowflake Cortex AI through Amazon Bedrock AgentCore · AWS · How-to
  30. How-toConnect Amazon Bedrock AgentCore Gateway to private APIs in a hub-and-spoke network with centralized inspection · AWS · How-to
  31. Blog postProtect agent tool calls with Skyflow and Amazon Bedrock AgentCore Gateway · AWS · Blog post

Go deeper