Build a multi-account AI agent with AgentCore Gateway and MCP
aws ·
This article details a reference architecture for building multi-account AI agents using Amazon Bedrock AgentCore Gateway and the Model Context Protocol (MCP). It addresses the challenge of enabling agents to reason over data distributed across multiple line-of-business accounts without centralizing or copying that data. The solution employs a hub-and-spoke model where a central platform account hosts the agent and LLM inference, while individual LOB accounts expose their data as MCP servers. AgentCore Gateway acts as the single entry point, handling tool discovery, semantic search, and cross-account authentication via OAuth 2.0 machine-to-machine credentials. Security is enforced through Policy in AgentCore, which uses Cedar rules to apply fine-grained authorization based on user identity claims propagated from Okta. The architecture also includes continuous evaluation, safe version rollouts, and comprehensive observability to ensure production readiness. Finally, it outlines governance strategies for cost attribution, audit logging, and network security using VPC endpoints.
aws