Cloudflare AI Gateway MCP Server ๐Ÿ“ก

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

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

๐Ÿ”จ Available Tools

Currently available tools:

Tool Description
list_gateways Lists all AI Gateways associated with the account, supporting pagination for easy navigation.
list_logs Retrieves logs for a specified gateway, offering filters such as date ranges, feedback scores, success status, model, and provider.
get_log_details Fetches detailed information about a specific log identified by its log ID within a gateway.
get_log_request_body Retrieves the request body associated with a specific log in a gateway.
get_log_response_body Retrieves 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

Access the remote MCP server from any MCP Client

If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (https://ai-gateway.mcp.cloudflare.com) directly within its interface (for example inCloudflare AI Playground).

If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using mcp-remote (https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.

Replace the content with the following configuration:

{
	"mcpServers": {
		"cloudflare": {
			"command": "npx",
			"args": ["mcp-remote", "https://ai-gateway.mcp.cloudflare.com/mcp"]
		}
	}
}

Once you've set up your configuration file, restart MCP client and a browser window will open showing your OAuth login page. Proceed through the authentication flow to grant the client access to your MCP server. After you grant access, the tools will become available for you to use.

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

MCP Server ยท Populars

MCP Server ยท New

    trendsmcp-ai

    Trends MCP

    MCP server for live trend data. Query Google Search, YouTube, TikTok, Reddit, Amazon, Wikipedia, News sentiment, Web Traffic, App Downloads, Steam, npm and more. Works with Claude, Cursor, VS Code, GitHub Copilot, ChatGPT, Windsurf, Cline, Raycast and any MCP-compatible.

    Community trendsmcp-ai
    jacob-bd

    Gemini Notebook (formerly Google NotebookLM) CLI & MCP Server

    Programmatic access to Gemini Notebook - via command-line interface (CLI), Model Context Protocol (MCP) server, and AI agent skills.

    Community jacob-bd
    PxyUp

    Fitter โ€” web data for AI agents

    New way for collect information from the API's/Websites

    Community PxyUp
    kayhendriksen

    foehn

    Download MeteoSwiss Open Government Data โ€” weather stations, radar, hail, forecasts and climate series โ€” via Python API, CLI, or MCP server, as DataFrames, Parquet, xarray Datasets or Zarr stores

    Community kayhendriksen
    mldsveda

    pyscrappy

    All-in-one Web Scrapper for Python

    Community mldsveda