How MoEngage turned over 400 APIs into agent tools with AgentCore Gateway

MoEngage used Amazon Bedrock AgentCore Gateway to securely expose 400 internal APIs as scoped AI agent tools, eliminating the need for multiple MCP servers and complex networking.

How MoEngage turned over 400 APIs into agent tools with AgentCore Gateway

Introduction

MoEngage, a customer‑engagement platform serving over 1,350 brands, needed a way for its AI agents to call roughly 400 internal REST APIs without exposing them to the public internet, leaking identity information, or overwhelming the agents’ context windows. By adopting Amazon Bedrock AgentCore Gateway, MoEngage turned those private APIs into permission‑scoped agent tools, cutting months of engineering effort and reducing onboarding time from days to hours.

The problem with a naĂŻve MCP approach

The Model Context Protocol (MCP) provides a standard for agents to discover and invoke tools. MoEngage initially considered deploying a separate MCP server for each of its 25 engineering teams. This would have meant:

  • Over 20 independent deployments to monitor, patch, and keep protocol‑compatible.
  • Agents needing to stitch together responses from many servers.
  • Each team learning MCP details unrelated to its core product work.

The result would be a fragile, high‑maintenance architecture that conflicted with three core constraints:

  1. No public endpoints – APIs must remain VPC‑private across seven AWS regions.
  2. Identity must be injected, not model‑controlled – tenant and role information cannot be exposed as model parameters.
  3. Tool catalog size – 400 tools translate to >20,000 tokens, exceeding LLM context limits.

Four constraints that shaped the solution

MoEngage defined a set of non‑negotiable requirements before evaluating any option:

  1. Zero public exposure – the solution must keep all APIs private.
  2. Server‑side identity enforcement – IAM‑based policies must determine access, not the model.
  3. Scalable tool discovery – agents should receive only the subset of tools they are authorized to use.
  4. Minimal operational overhead – no custom MCP servers, tool‑generation pipelines, or per‑API networking changes.

How AgentCore Gateway satisfies the constraints

Amazon Bedrock AgentCore Gateway is a fully managed MCP server that maps OpenAPI specifications directly to MCP tools. Its key capabilities line up perfectly with MoEngage’s needs:

OpenAPI‑driven tool generation

  • Teams continue to maintain their existing OpenAPI specs.
  • Each operation is automatically exposed as a tool (e.g., `CampaignsAPI___searchCampaigns`).
  • Updates to the spec instantly reflect in the tool catalog—no extra deployment steps.

Cedar‑based, server‑side authorization

  • Agents authenticate with distinct IAM roles.
  • Cedar policies are evaluated before the tool list is serialized, ensuring agents only see tools they are permitted to call.
  • Example policy snippet:

``` permit(principal == Agent::"campaign-qa-bot-v1", action == Action::"tools/call", resource in ToolGroup::"campaigns-read"); forbid(principal == Agent::"campaign-qa-bot-v1", action == Action::"tools/call", resource in ToolGroup::"write-actions"); ```

  • This eliminates the token‑budget problem because the filtered list is far smaller.

Private VPC connectivity

  • AgentCore Gateway routes calls through AWS PrivateLink, keeping traffic inside the VPCs across all regions.
  • No NAT gateways, reverse proxies, or VPN tunnels are required for each new API.

Centralized, managed MCP layer

  • The AI Platform team owns the MCP layer end‑to‑end; product teams focus solely on their REST APIs.
  • No custom code, tool‑alias registries, or circuit‑breaker logic is needed.
  • Operational burden drops dramatically—MoEngage saved an estimated six months of engineering effort.

Practical outcomes

  • Rapid onboarding – Adding a new API now takes hours instead of days.
  • Secure, fine‑grained access – Agents cannot see or invoke unauthorized operations.
  • Reduced latency and cost – Private routing eliminates public‑internet hops and associated data‑transfer fees.
  • Scalable agent development – Teams can build richer agents without worrying about tool‑catalog size.

Closing thoughts

MoEngage’s experience shows that when an organization has a large, private API surface, a managed MCP solution like Amazon Bedrock AgentCore Gateway can turn a complex networking and security challenge into a streamlined, developer‑friendly workflow. By leveraging existing OpenAPI specs, server‑side Cedar policies, and private VPC routing, MoEngage delivered a secure, scalable agent toolset while freeing engineering resources to focus on core product innovation.

Source

Read original source

Why we picked this

Core AI tooling release integrating 400 APIs with Amazon Bedrock AgentCore Gateway.

← Back to all articles