Cloudflare's AI Engineering Stack Revealed

Cloudflare details its internally built AI engineering stack, powered by its own products and widely adopted across R&D.

Diagram showing the Cloudflare AI engineering stack architecture
An overview of Cloudflare's internal AI engineering stack.· Cloudflare
Contents(3)

Cloudflare has revealed the inner workings of its proprietary AI engineering stack, built entirely on its own platform. In the last month, 93% of the company's R&D organization has leveraged AI coding tools powered by this internal infrastructure. This initiative, launched eleven months ago, aimed to deeply integrate AI into the engineering workflow, necessitating the creation of MCP servers, an access layer, and essential AI tooling.

A dedicated tiger team, dubbed iMARS (Internal MCP Agent/Server Rollout Squad), spearheaded the project, with the Dev Productivity team ultimately taking ownership. The numbers underscore the impact: 3,683 internal users actively engaged with AI coding tools, generating 47.95 million AI requests. Over 295 teams are utilizing these agentic AI tools, with AI Gateway processing 20.18 million requests and routing 241.37 billion tokens monthly. Workers AI alone processed 51.83 billion tokens.

The adoption of these tools has directly fueled developer velocity, evidenced by a dramatic increase in merge requests. The 4-week rolling average climbed from approximately 5,600 per week to over 8,700, peaking at 10,952 in late March, nearly doubling the Q4 baseline.

The architecture spans three core layers: platform, knowledge, and enforcement. The platform layer handles authentication, routing, and inference, leveraging Cloudflare Access for Zero Trust security, AI Gateway for centralized LLM control, and Workers AI for on-platform inference with open-weight models. The MCP Server Portal, built with Workers and Access, provides a single OAuth endpoint for multiple tools.

Platform Layer: Security and Developer Experience

Cloudflare Access ensures secure authentication and Zero Trust policy enforcement for over 3,600 internal users. All LLM requests are routed through AI Gateway, enabling centralized management of provider keys, cost tracking, and data retention policies. AI Gateway handles approximately 688,000 requests and 10.57 billion tokens daily, routing to four providers.

While Frontier models handle complex tasks, Workers AI is becoming a significant component, accounting for 8.84% of internal requests. Workers AI, Cloudflare's serverless AI inference platform, offers substantial cost savings and reduced latency by keeping inference on the same network as other Cloudflare services.

The platform utilizes Workers AI for tasks like documentation review and generating context files, significantly reducing costs. For example, a security agent processing over 7 billion tokens daily on Kimi K2.5 via Workers AI costs 77% less than a proprietary model equivalent, as detailed in Cloudflare's AI Code Review Overhaul.

A single proxy Worker centralizes control, enabling per-user attribution, model catalog management, and permission enforcement without client configuration changes. This pattern allows for seamless integration of future coding assistant tools.

The setup is streamlined via a single command, opencode auth login, which configures providers, models, and permissions automatically. This eliminates manual configuration for users, ensuring API keys remain server-side.

MCP Server Portal: Unified Access and Code Mode

The MCP Server Portal aggregates 13 production MCP servers, exposing over 182 tools across various services like GitLab, Jira, and Sentry. This unified endpoint simplifies access management through a single Cloudflare Access flow.

MCP servers are built on the Agents SDK, workers-oauth-provider, and Cloudflare Access. Adding new servers involves adapting existing wrappers.

Code Mode addresses the token overhead associated with loading tool schemas upfront. Instead of exposing individual tool definitions, the portal collapses them into two central tools: portal_codemode_search and portal_codemode_execute. This significantly reduces context bloat and token costs, offering a cleaner architecture as more servers are integrated.

Knowledge Layer: Understanding the Engineering Ecosystem

Backstage, the open-source internal developer portal, serves as Cloudflare's service catalog. It tracks over 2,055 services, 167 libraries, and 122 packages, alongside APIs, systems, databases, and teams, with detailed ownership mappings and dependency graphs. This structured data enables agents to understand the broader engineering context beyond just code.

The Backstage MCP server provides agents access to service ownership, dependencies, and API specs directly within coding sessions. This comprehensive knowledge graph is crucial for effective AI agent operation, transforming individual repositories into a connected map of the organization.

StartupHub data

Backstage and Cloudflare

An open-source developer portal for building and managing software.

Founded
2016
Location
Stockholm, Sweden
Valuation
$1.1B

Cloud infrastructure platform providing CDN, security, and web optimization services.

Founded
2009
Location
San Francisco, United States
Funding
$2.2B
Founded
2011
Location
San Francisco, USA
Funding
$146M

A widely used project management and issue tracking software developed by the company Atlassian.

Founded
2002
Location
Sydney, Australia
© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.

More from Daniel Singer