How we built an MCP bridge to give our AgentCore-hosted AI agent access to local MCP tools
AWS•How-to••by Rohan Lekhwani•AWS 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.
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.
AI:Gateway tool calls can reach private ALBs and private API Gateway endpoints through a VPC Lattice resource gateway placed in the network account, so traffic crosses the central firewall in both directions.
AI:Compares three OAuth setups for AgentCore Gateway to reach the Snowflake-managed MCP server: Snowflake OAuth per-user, three-legged with corporate IdP, and two-legged with a shared service user.
AI:A reference architecture shows a LangChain orchestrator on ECS calling a Strands agent on Bedrock AgentCore over A2A, with OAuth in both directions and no shared SDK or secrets.