← Back

models

Building an MCP Bridge for Cloud-Local AI Tool Access

Amazon has developed an MCP bridge that enables cloud-hosted AI agents to securely access local tools and files by tunneling messages over WebSocket and native messaging, without open ports or VPNs.

AS1 NewsSource: aws.amazon.com

mcpcloudprotocolsecurityinfrastructure
AMZN$256.78-0.82%Anthropic$2,054.92-0.61%

Amazon's recent innovation involves creating an MCP (Model Context Protocol) bridge that connects cloud-based AI agents with local MCP servers on user machines. This setup allows AI agents hosted on Amazon Bedrock's AgentCore to interact seamlessly with local tools, such as Excel files, by establishing a secure, low-latency communication channel.

The architecture comprises four main components: the AgentCore runtime hosting the cloud agent, a browser extension providing the user interface and message relay, the MCP Bridge running locally to translate protocols, and the local MCP server managing tool interactions. The bridge acts as a protocol translator, wrapping and unwrapping JSON-RPC messages between the browser extension and the local MCP server, which communicates via stdio.

Communication begins with the extension connecting to the AgentCore runtime over a presigned WebSocket URL, generated using AWS credentials and signed with SigV4. The extension relays messages through native messaging to the MCP Bridge, which forwards requests to the local MCP server. Responses follow the reverse path, enabling the cloud agent to invoke local tools securely.

This setup eliminates the need for open ports or VPNs, maintaining security by keeping credentials on the user's machine and using signed URLs with short expiration times. The system supports multiple concurrent tool calls, with robust request-response matching and error handling.

The source code for this MCP bridge implementation is available on GitHub, providing developers with a template to deploy similar solutions. The architecture is extensible, allowing integration of additional browser actions, local tools, or packaging as standalone binaries for distribution.

Future enhancements include expanding browser automation capabilities, integrating more local MCP servers, and improving security measures such as payload signing and process scoping. This approach demonstrates a scalable method for enabling cloud AI agents to securely and efficiently leverage local resources, broadening the scope of AI applications that require local tool access.

positive

Enables secure, scalable integration of cloud AI agents with local tools, expanding AI application capabilities while maintaining security.