[KongchangAI]
· 2 min read· 1,015 words

Adding Secure Web Search to Claude Desktop with Amazon Bedrock AgentCore

Adding Secure Web Search to Claude Desktop with Amazon Bedrock AgentCore

Securely connect Claude Desktop to real-time web search via Amazon Bedrock AgentCore Gateway and JWT authentication.

This article presents an enterprise-grade solution for extending Claude Desktop on Amazon Bedrock with real-time search capabilities. Since LLMs are limited by their training knowledge cutoff, the author proposes using Amazon Bedrock AgentCore Gateway to securely connect Claude Desktop to web search tools. The security core is a JWT-based inbound authentication chain: IAM Identity Center manages enterprise user identities, Amazon Cognito issues JWT tokens, and AgentCore Gateway validates each token before forwarding tool-call requests. This gateway-plus-standard-auth architecture unifies capability expansion with security governance, offering low implementation overhead for teams already in the AWS ecosystem.

The Problem: Claude Desktop Stuck Behind a Knowledge Cutoff

Claude Desktop running on Amazon Bedrock has an inherent limitation — its responses are constrained by the model's training knowledge cutoff date, with no access to real-time information. When users ask about the latest news, time-sensitive events, or recently published technical documentation, the model can only fall back on stale internal knowledge. In enterprise settings, this is a significant gap.

The solution isn't complicated in concept: connect Claude Desktop to a web search capability so it can actively retrieve up-to-date information from the internet when needed. But in an enterprise environment, the real challenge isn't whether you can search — it's how to search securely — ensuring only authorized users and applications can invoke that capability.

rss source: Add secure Web Search to Claude Desktop with Amazon Bedrock AgentCore

The Core Approach: Amazon Bedrock AgentCore Gateway

The solution presented here connects Claude Desktop to web search tools through Amazon Bedrock AgentCore Gateway. AgentCore Gateway acts as a secure proxy: it receives tool-call requests from Claude Desktop, validates the requester's identity, and forwards only legitimate requests to the underlying search service.

The architectural value lies in decoupling and centralized control. Search capability is exposed behind the gateway as an independent tool rather than hardcoded into the client. Enterprises can manage which tools are available and who can access them at the gateway layer, without touching the model or client itself. For organizations that need to govern multiple AI tools, this pattern is far easier to scale and audit.

AgentCore Gateway is essentially a managed MCP (Model Context Protocol)-compatible gateway designed specifically for AI Agent tool-calling scenarios. It exposes various tools (search, database queries, code execution, etc.) through a unified API endpoint. An agent only needs to know the gateway address and its own credentials — it doesn't need to understand the implementation details of the underlying tools. This differs from traditional API gateways like Amazon API Gateway in that AgentCore Gateway natively understands the semantics of agent tool calls. It can automatically handle tool description registration and distribution, allowing models like Claude to dynamically discover available tools without having to manually hardcode a tool list in the prompt.

Security Design: JWT + IAM Identity Center + Cognito

The security foundation of this solution is JWT-based inbound authentication, orchestrated by three components working together:

AWS IAM Identity Center

Serving as the hub for enterprise identity management, IAM Identity Center handles centralized user identity management and single sign-on. It allows enterprises to reuse their existing organizational identity infrastructure rather than maintaining a separate account system just for AI tools.

IAM Identity Center (formerly AWS SSO) supports integration with external identity providers (IdPs), including Microsoft Active Directory, Okta, Azure AD, and other common enterprise systems — syncing users and groups via SAML 2.0 or SCIM. This means employees can sign in with their existing corporate accounts without registering separately on the AWS side, significantly reducing identity silo risks. In this solution, IAM Identity Center acts as the "upstream" identity source. Its authentication results are passed to Cognito, which then issues JWTs based on them — forming a complete trust chain: Enterprise IdP → IAM Identity Center → Cognito → JWT → AgentCore Gateway.

Amazon Cognito

Cognito handles token issuance and user pool management within the flow. It generates standards-compliant JWTs (JSON Web Tokens) that carry verified identity information.

JWT Token Validation

When Claude Desktop initiates a search request, the request carries a JWT. Before forwarding the request, AgentCore Gateway validates the token's authenticity and permission scope. Only requests that pass validation can reach the actual web search service. This mechanism ensures that even if the gateway is externally exposed, it cannot be abused by unauthorized parties.

The entire flow reflects a clear security principle: identity first, capability second. Every tool call is an authenticated, controlled operation — not an indiscriminate open interface.

JWT (JSON Web Token) is an open standard (RFC 7519) for securely transmitting signed JSON-format claims between parties. A JWT consists of three parts: a Header (algorithm and type), a Payload (claims such as user ID, role, and expiration time), and a Signature (for verifying the token hasn't been tampered with). In this solution, when Cognito issues a JWT, it embeds user identity and authorization scope information in the Payload. When AgentCore Gateway receives a request, it decides whether to allow it by verifying the signature and checking claims (such as the exp expiration time and aud audience field) — all without querying a central database, providing excellent horizontal scalability. The key difference between JWT and traditional session cookies is that JWT is stateless — the server doesn't need to store session information; validation logic relies entirely on the secret key and the token itself.

Why This Combination Is Worth Attention

From an architectural perspective, this solution accomplishes three things at once:

  • Capability expansion — Breaks through the model's knowledge cutoff limitation, giving Claude real-time retrieval capabilities
  • Security governance — Meets enterprise compliance requirements through a standardized JWT authentication chain
  • Maintainability — The gateway-based design separates tool management from model usage

For teams that have already deployed Claude within the AWS ecosystem, the implementation cost is relatively manageable, since IAM Identity Center and Cognito are both AWS-native services with no need to introduce third-party identity systems. This also represents a typical design pattern for current AI Agent tool chains: using a gateway to centrally manage tool access, and using standard authentication protocols to enforce security boundaries.

Summary

Adding web search to Claude Desktop may seem like a simple feature enhancement, but underneath it lies a complete enterprise-grade AI security architecture. Amazon Bedrock AgentCore Gateway handles connectivity and request forwarding; IAM Identity Center and Cognito form the identity and authentication foundation; and JWT tokens flow through the entire request chain to ensure security.

For enterprises looking to safely use AI Agent tools in production, this solution offers a practical reference template — one that addresses the pain point of accessing real-time information without making any compromises on security.

#Amazon Bedrock AgentCore#Claude Desktop web search#JWT authentication#IAM Identity Center#Amazon Cognito#AI Agent security#MCP gateway
Share:

Related articles