Amazon Web Services has introduced a new event-driven architecture designed to automate the updating of its AWS Agent Registry, a component of Amazon Bedrock AgentCore. This enhancement aims to resolve issues caused by stale metadata, ensuring that consumers have access to the most current information about Model Context Protocol (MCP) servers and their capabilities.
The Chenab Times has learned that the lack of automated synchronization can lead to significant trust erosion in the registry. When developers update an MCP server with new tools or schema changes, and the registry record remains outdated, users may miss out on new functionalities or encounter runtime errors due to incompatible information. This can force organizations to rely on less reliable methods like hardcoded endpoints or informal knowledge sharing.
Architecture Overview
The new solution leverages a combination of AWS CloudTrail, Amazon EventBridge, and AWS Lambda to create a pipeline that automatically detects and synchronizes runtime changes to the registry. This architecture supports both single-account and multi-account environments.
In a single-account setup, all components reside within one AWS account. For multi-account deployments, runtime events from an MCP server account (Account B) are securely forwarded to a central registry account (Account A). Account A houses the AWS Agent Registry, Amazon EventBridge rule, and the push-sync Lambda function, while Account B hosts the MCP server runtime and its associated Amazon Cognito OAuth provider.
The sample architecture is designed for two accounts but can be scaled to accommodate multiple MCP server accounts feeding into a single registry account.
The system initiates when AWS CloudTrail captures an UpdateAgentRuntime API call. This event is then routed by Amazon EventBridge to an AWS Lambda function in the registry account. The Lambda function queries the MCP server for its current tools and updates the corresponding registry record if any changes are detected.
Key AWS Services in the Pipeline
The automated update process relies on five core AWS services:
- AWS CloudTrail: Records
UpdateAgentRuntimeAPI calls as management events, serving as the initial trigger. - Amazon EventBridge: Manages the routing of events to the Lambda function, with support for cross-account event forwarding.
- AWS Lambda: Executes the logic to query the MCP server, compare tool schemas, and update the registry.
- AWS Agent Registry: Acts as the central repository for MCP server records and their tool schemas.
- AgentCore Identity: Facilitates secure OAuth token exchanges, enabling the Lambda function to authenticate without storing sensitive secrets.
Business Logic Flow
The end-to-end workflow begins when a developer updates an MCP server in Account B, triggering the UpdateAgentRuntime API call, which CloudTrail captures. Amazon EventBridge then forwards this event to Account A’s central event bus. The sync Lambda function in Account A parses the event to extract the MCP server’s runtime ARN and dynamically constructs its invocation URL. It then obtains a secure OAuth bearer token via AgentCore Identity before calling the MCP server to retrieve its latest tools. Finally, the Lambda compares these tools with the existing registry record, updating it if schema differences are found.
This process assumes a pre-registered record for the MCP server exists in the Agent Registry. The Lambda function is designed to update existing records, not create new ones.
Technical Implementation Details
When an MCP server is updated, AWS CloudTrail in Account B logs the UpdateAgentRuntime event. This event is delivered to Account A’s Amazon EventBridge bus, either directly or via cross-account forwarding. The Amazon EventBridge rule then invokes the Lambda function, passing the CloudTrail event data.
The Lambda function extracts the runtime ARN from the event payload. It then constructs the target MCP server’s URL, including URL-encoded ARN components for secure identification. Authentication is handled through a two-step process: the Lambda exchanges its execution identity for a temporary workload token and then uses this token to obtain a scoped OAuth bearer token from the target account’s credential provider.
Following authentication, the Lambda establishes a session with the MCP server by calling the initialize method and then retrieves the list of current tools and schemas via the tools/list method. It queries the AWS Agent Registry to find the record corresponding to the MCP server’s runtime ARN, matching it based on the ARN embedded within the server schema.
Before updating, the Lambda normalizes both the current tools from the MCP server and those in the registry. This normalization involves sorting by name and comparing key fields like name, description, and input schema. The registry record is only updated if a discrepancy is detected. If changes are necessary, the Lambda logs the additions or removals and pushes the updated tool definitions to the registry record.
Governance and Approval Workflow
The AWS Agent Registry enforces a governance lifecycle for its records, moving them from Draft to Pending Approval and finally to Approved status. This process ensures that all updates are reviewed before becoming discoverable. When the Lambda function updates a record with new tool definitions, the record automatically reverts to Draft status, requiring administrators to re-approve the changes. This mechanism prevents automated updates from bypassing organizational review processes.
Deployment Considerations
Deploying this solution involves several steps, including defining configuration parameters, creating and approving a registry record for the MCP server, provisioning AgentCore Identity, deploying the Lambda function with appropriate IAM roles, and setting up the Amazon EventBridge rule. For multi-account setups, cross-account EventBridge forwarding must also be configured.
Prerequisites include an AWS account with necessary permissions, a configured AWS CLI, Python 3.12 runtime, an existing AWS Agent Registry with an MCP server record, a deployed MCP server on Amazon Bedrock AgentCore, and configured AgentCore Identity workload identity and OAuth2 credential providers. For multi-account scenarios, cross-account Amazon EventBridge permissions are also required.
Known Limitations and Future Enhancements
The current implementation requires a pre-existing registry record for each MCP server. Future enhancements could include automatic registration of new MCP servers upon their first detection. Additionally, a manual trigger for immediate synchronization could be implemented via Amazon API Gateway or a CLI command. The system also plans to add resilience for cold starts and improve retries when MCP servers initially return zero tools.

The Chenab Times News Desk

