Cloudflare AI Gateway
Connect AI tools to Cloudflare AI Gateway to search your logs and get details about prompts and responses. The Cloudflare AI Gateway MCP server gives AI assistants secure, programmatic access to your AI Gateway data through the Model Context Protocol (MCP).
1. Overview
Cloudflare AI Gateway is a remote, vendor-hosted MCP server provided by Cloudflare. You connect to it from Cequence AI Gateway; the server uses Streamable HTTP (the standard transport for remote MCP per Cloudflare’s MCP docs).
- Server URL:
https://ai-gateway.mcp.cloudflare.com/mcp - Transport: HTTP (Streamable HTTP)
- Hosted by: Cloudflare
Cloudflare’s MCP servers use OAuth for authorization so agents only access resources the user has granted permission to use.
2. Supported authentication types
| Type | Supported | Notes |
|---|---|---|
| OAuth 2.0 | Yes | Required. Uses Dynamic Client Registration (DCR); sign in with your Cloudflare account. |
| API key | No | Not used for this remote MCP server. |
When you add Cloudflare AI Gateway in Cequence AI Gateway, authentication is handled via OAuth 2.0 with Dynamic Client Registration. You sign in with your Cloudflare account and grant access during the gateway flow. Cloudflare uses a subset of OAuth 2.1 for authorization.
3. What can you do with this MCP server
With the Cloudflare AI Gateway MCP server, you can:
- Search your logs — Query and search AI Gateway logs from your AI client.
- Get details about prompts and responses — Inspect prompt and response data for debugging, analytics, or compliance.
- List gateways and accounts — List all AI Gateways in your account and set the active account for subsequent tool calls.
- List and filter logs — List logs by gateway, with ordering by created_at, provider, model, success, cost, tokens_in, tokens_out, duration, or feedback.
- Analyze usage — Get average latency, token usage, cost, and request duration across your AI Gateway traffic (e.g. “What is my average latency for my AI Gateway logs?”).
- Inspect request data — Access user prompts, model responses, AI provider info, timestamps, request status, and cached status from individual requests.
4. Prerequisites
Before adding Cloudflare AI Gateway in Cequence AI Gateway, ensure you have:
- Access to Cequence AI Gateway (e.g. beta.aigateway.cequence.ai)
- A Cloudflare account with access to AI Gateway and the logs you want to query
- A modern browser to complete the OAuth authorization flow
- For OAuth authentication: an auth app with client credentials (client ID and client secret) in your Cloudflare (vendor) account, unless the server supports Dynamic Client Registration (DCR).
5. Example workflows
- “Search my AI Gateway logs for requests from the last 24 hours that returned errors.”
- “Show me details for the last 10 prompts sent to the summarization model.”
- “Find prompts and responses that mention [topic] in my AI Gateway logs.”
6. Connecting MCP server from Cequence AI Gateway
- Log in to Cequence AI Gateway.
- Choose your tenant.
- Go to App catalogue.
- Filter by Remote MCP server.
- Search for Cloudflare AI Gateway and then select it.
- Click Create MCP server.
- Choose auth method. If OAuth, you need an auth app with client credentials in your vendor account (see Prerequisites).
- Complete the setup as prompted, select tools, and deploy.
Use the generated MCP server URL in your client as described in the Client Configuration docs. For detailed UI steps and screenshots, see Create a third-party MCP Server.
7. Additional information
- Transport: This server uses Streamable HTTP, the standard transport for remote MCP connections on Cloudflare. See Transport.
- Timeout: The remote server uses a 30-second timeout for requests.
- Cloudflare MCP: You can build and deploy MCP servers on Cloudflare; remote connections use Streamable HTTP and OAuth. See Model Context Protocol (MCP) and Build a Remote MCP server.
- Official repository: For tools, source, and updates, see mcp-server-cloudflare. For other Cloudflare MCP servers (Audit Logs, Radar, Logpush, Observability, etc.), search the App catalogue by “Cloudflare.”