Brifing

How Cloudflare Detects and Secures MCP Traffic

How are security risks posed by AI agents being controlled?

Cloudflare Blog2 min

1New Security Risks from AI Agents

Traditional systems are designed with human users in mind. However, AI agents can operate beyond human speed and decision-making processes. This can turn a wrong decision into thousands of faulty actions. Cloudflare introduces new features to control these risks.

2What is Model Context Protocol (MCP)?

MCP is a protocol that enables AI agents to interact with third-party SaaS products, internal applications, and APIs. While it facilitates tool discovery and usage, it also increases security risks. MCP traffic is indistinguishable from traditional HTTPS calls.

3Detecting MCP Traffic with Cloudflare One

Cloudflare One offers new capabilities to identify and control MCP traffic. These features allow administrators to see if agents are using approved paths. It also ensures direct connections are controlled over managed network paths.

4The Anatomy of MCP Traffic

An MCP tool call takes three forms within a system: a decision inside the client, an HTTP transaction on the network, and a tool call at the server. These calls can contain sensitive data and provide critical control points for security teams.

5Controls Inside the MCP Client

Hooks inside the MCP client activate after the model selects a tool. At this stage, the destination server, tool name, and arguments can be seen unencrypted. This allows security teams to exercise control at the earliest stage.

6Controls at the Network Boundary

Secure web gateways observe HTTP requests after they leave the client. With TLS decryption, the request can be associated with a user and device. The network layer offers the broadest lens to detect remote MCP traffic on managed paths.

7Controls at the MCP Server

The MCP server controls the call after authenticating and parsing the MCP message. This is the last point where the request can be denied before the tool is invoked. The server provides the richest execution context.

8Detecting Shadow MCP Traffic with Cloudflare Gateway

Cloudflare Gateway uses protocol signals to find shadow MCP traffic and enforces access only to trusted MCP servers. This allows administrators to block unauthorized connections.

9Secure Access with MCP Portal

The MCP Portal shows administrators whether agents are using approved paths. This prevents agents from bypassing managed network paths and enhances security.

10Inspecting JSON-RPC Messages

JSON-RPC messages can contain sensitive data. Request inspection stops unsafe actions before execution. Response inspection and logging show what the tool returned to the agent.

11Three Control Points for Security Teams

The MCP request offers three control points for security teams: inside the client, at the network boundary, and before the server. These points are critical for minimizing security risks.

12Secure AI Agents with Cloudflare

Cloudflare provides a comprehensive solution to control security risks posed by AI agents. Detecting and controlling MCP traffic enhances organizational security and ensures the safe use of AI agents.

Original article: Cloudflare Blog — Cloudflare ile MCP Trafiği Tespiti ve Güvenliği