Workers可观测性MCP服务器

Workers Observability MCP Server 是一款基于远程 MCP 协议并内置 Cloudflare OAuth 的可观测性服务,通过查询 Workers 日志与指标帮助开发者调试和监控 Cloudflare Workers。

  • by cloudflare
  • TypeScript
  • 本地部署
  • 4429 星标
  • 更新于
在 GitHub 查看 cloudflare/mcp-server-cloudflare

使用说明

Workers Observability 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 Workers Observability.

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

It integrates tools powered by Workers Observability to debug and get insight into your Workers' logs and analytics.

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 and application search bindings remain durable application/security state; no MCP protocol session or protocol Durable Object is retained.

🔨 Available Tools

Currently available tools:

Category Tool Description
Workers Analytics query_worker_observability Queries Workers Observability API to analyze logs and metrics from your Cloudflare Workers. Supports listing events, calculating metrics, and finding specific invocations
Schema Discovery observability_keys Discovers available data fields in your Workers logs including metadata fields, worker-specific fields, and custom logged fields
Value Exploration observability_values Finds available values for specific fields in Workers logs to help build precise filters for analytics queries

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

Prompt Examples

  • Can you tell me about any potential issues on this particular worker 'my-worker-name'?
  • Show me the CPU time usage for my worker 'api-gateway' over the last 24 hours
  • What were the top 5 countries by request count for my worker yesterday?
  • How many requests were made to my worker 'my-app' broken down by HTTP status code?
  • Compare the error rates between my production and staging workers

Connect to the MCP server

Connect your MCP client directly to https://observability.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.