MCPInstall
Cloudflare AI Gateway logo

Cloudflare AI Gateway

Featured
by cloudflare 4,424 stars cloudflare/mcp-server-cloudflare

Cloudflare's AI Gateway allows you to gain visibility and control over your AI apps. By connecting your apps to AI Gateway, you can gather insights on how people are using your application.

READMEHEAD

Cloudflare AI Gateway MCP Server 📡

[!WARNING] This server is deprecated. Use the Cloudflare API MCP server at https://mcp.cloudflare.com/mcp instead. It covers the full Cloudflare API, including AI Gateway.

This is a Model Context Protocol (MCP) server that supports remote MCP connections, with Cloudflare OAuth built-in.

It integrates tools powered by the Cloudflare AI Gateway API to search your AI Gateway logs, inspect prompts and responses, and get details about gateway usage.

The /mcp URL uses a stateless SDK v2 handler that creates a fresh server with request-scoped auth/account context for every request. The retired /sse URL returns 410 Gone pointing at /mcp. OAuth grants and token validation remain durable security state; the server stores no MCP protocol session.

🔨 Available Tools

Currently available tools:

ToolDescription
list_gatewaysLists all AI Gateways associated with the account, supporting pagination for easy navigation.
list_logsRetrieves logs for a specified gateway, offering filters such as date ranges, feedback scores, success status, model, and provider.
get_log_detailsFetches detailed information about a specific log identified by its log ID within a gateway.
get_log_request_bodyRetrieves the request body associated with a specific log in a gateway.
get_log_response_bodyRetrieves the response body associated with a specific log in a gateway.

Note: These tools are account-scoped. Single-account credentials (and account-scoped API tokens) are detected automatically. If your credentials can access multiple accounts, pass account_id to the tool, or set a cf-account-id request header in your MCP client config.

This MCP server is still a work in progress, and we plan to add more tools in the future.

Prompt Examples

  • List all my AI Gateways.
  • Show logs for gateway 'gateway-001' between January 1, 2023, and January 31, 2023.
  • Fetch the latest errors from gateway-001 and debug what might have happened wrongly

Connect to the MCP server

Connect your MCP client directly to https://ai-gateway.mcp.cloudflare.com/mcp. If prompted, complete the Cloudflare OAuth flow in your browser. The tools become available after authorization.

Interested in contributing, and running this server locally? See CONTRIBUTING.md to get started.

More AI Chatbot MCP servers

Similar servers from the same category.

Jentic

jentic

Enables AI assistants to discover and execute external APIs and workflows through a Python SDK that leverages the Open Agentic Knowledge repository for standardized API access and execution.

AI Chatbot

Provides a bridge to the Flyworks AI lipsync service, enabling creation of digital avatar videos synchronized with audio inputs through a simple API.

git

Official JavaScript implementation that integrates with MiniMax's multimodal capabilities for image generation, video creation, text-to-speech, and voice cloning across multiple transport modes.

APIVideo+7

Provides a bridge to Mureka.ai's music generation capabilities, enabling on-demand creation of lyrics, complete songs, and instrumental tracks without requiring specialized music production knowledge.

AI Chatbot