AI Cloud Architect

How we built an MCP bridge to give our AgentCore-hosted AI agent access to local MCP tools

AWSHow-to by Rohan LekhwaniAWS Artificial Intelligence Blog

AI agents on Amazon Bedrock AgentCore run in the cloud, but users’ tools and files live on their laptops. Learn how to build a secure MCP bridge that lets a cloud-hosted agent call local MCP servers by tunneling signed messages over the existing WebSocket connection through a browser extension and Chrome native messaging, with no open ports or VPN required.

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

AI: Summary

What it is

Shows how a cloud-hosted Strands agent on AgentCore calls MCP servers on a user's laptop, relayed through a browser extension and Chrome native messaging over the existing WebSocket.

Who it is for

Architects and developers running AgentCore agents that must reach files or tools on users' local machines without open ports or VPN.

Key points

  • Sample code is on GitHub; setup takes about 15 minutes, with AgentCore pay-per-invocation and standard Claude token pricing.
  • Bridge uses local AWS credentials to generate SigV4 presigned WebSocket URLs valid for 5 minutes; credentials stay on the laptop.
  • The demo limits security to origin checks, URL expiry and process isolation; the post recommends JWT auth, Ed25519 payload signing, file allowlists and audit logs for production.