Cloudflare Workers Observability
Workers observability and debugging.
What it can do
- Accounts List: List all accounts in your Cloudflare account
- Set Active Account: Set active account to be used for tool calls that require accountId
- Workers List: List all Workers in your Cloudflare account. If you only need details of a single Worker, use workers_get_worker.
What data it sees
Do you need an account
No: the server works without sign-in
Workers observability and debugging. Inspect application logs, analytics, and runtime behavior.
How to connect
How to connect Cloudflare Workers Observability to Claude
The server address to paste into Claude settings:
https://workers-observability--cloudflare.run.tools
- Open Claude (claude.ai or the desktop app).
- Go to Settings → Connectors.
- Click Add custom connector.
- Paste the server address copied below into Remote MCP server URL and click Add.
- In a chat, click + → Connectors and switch the new connector on.
Custom connectors are available on Free, Pro, Max, Team and Enterprise plans (Free is limited to one). On Team and Enterprise an organization Owner adds the connector first under Organization settings → Connectors.
Authorization
After you click Add, a sign-in window for the service opens. Sign in with your own account and approve access. Claude never sees your password.
How to connect Cloudflare Workers Observability to ChatGPT
The server address to paste into ChatGPT settings:
https://workers-observability--cloudflare.run.tools
- Open ChatGPT in a browser (chatgpt.com). A Plus, Pro, Business, Enterprise or Edu plan is required.
- Turn on developer mode once: Settings → Apps → Advanced settings → Developer mode.
- Open Settings → Connectors and click Create.
- Fill in the form: Name (anything), Description (one line about what the service does), MCP server URL (copy it below).
- Under Authentication choose OAuth if the service requires sign-in, otherwise None. Click Create.
- In a new chat open + → Apps/Connectors and enable the connector.
OpenAI has renamed this section before (Connectors → Apps/Plugins). If the label differs, search settings for "developer mode". On Business/Enterprise workspaces an admin must allow custom connectors first.
Authorization
On first use ChatGPT opens the service's sign-in window. Sign in and approve access.
How to connect Cloudflare Workers Observability to Cursor
The server address to paste into Cursor settings:
https://workers-observability--cloudflare.run.tools
Fastest: click Open in Cursor below and confirm the prompt.
Manually:
- In Cursor open Settings → Cursor Settings → MCP and click Add new global MCP server.
- Paste the JSON copied below into
~/.cursor/mcp.json(per project:.cursor/mcp.jsonin the repo root). - Save the file. The server appears in the MCP list; authorize it there if asked.
Authorization
If the service needs sign-in, an authorize button appears next to the server in the MCP list.
Server tool list (10)
Raw names from tools/list. Only developers need these.
| accounts_list | List all accounts in your Cloudflare account |
| set_active_account | Set active account to be used for tool calls that require accountId |
| workers_list | List all Workers in your Cloudflare account. If you only need details of a single Worker, use workers_get_worker. |
| workers_get_worker | Get the details of the Cloudflare Worker. |
| workers_get_worker_code | Get the source code of a Cloudflare Worker. Note: This may be a bundled version of the worker. |
| query_worker_observability | Query the Workers Observability API to analyze logs and metrics from your Cloudflare Workers. * A query typical query looks like this: {"view":"events","queryId":"workers-logs-events","limit":5,"dry":true,"parameters":{"datasets":["cloudflare-workers"],"filters":[{"id":"520","key":"message","operation":"eq","type":"string","value":"Clickhouse Statistics"},{"id":"2088","key":"statistics.elapsed","operation":"gt","type":"number","value":"0.269481519"}],"calculations":[],"groupBys":[],"havings":[]},"timeframe":{"to":"2025-04-30T20:53:15Z","from":" ""2025-04-30T19:53:15Z"}} ## Core Capabilities This tool provides three primary views of your Worker data: 1. **List Events** - Browse individual request logs and errors 2. **Calculate Metrics** - Compute statistics across requests (avg, p99, etc.) 3. **Find Specific Invocations** - Locate individual requests matching criteria ## Filtering Best Practices - Before applying filters, use the observability_keys and observability_values tools to confirm available filter fields and the correct filter value to add unless you have the data in a response from a previous query. - Common filter fields: $metadata.service, $metadata.trigger, $metadata.message, $metadata.level, $metadata.requestId, ## Calculation Best Practices - Before applying calculations, use the observability_keys tools to confirm key that should be used for the calculation ## Troubleshooting - If no results are returned, suggest broadening the time range or relaxing filters - For errors about invalid fields, recommend using observability_keys to see available options |
| observability_keys | Find keys in the Workers Observability Data ## Best Practices - Set a high limit (1000+) to ensure you see all available keys - Add the $metadata.service filter to narrow results to a specific Worker ## Troubleshooting - If expected fields are missing, verify the Worker is actively logging - For empty results, try broadening your time range |
| observability_values | Find values in the Workers Observability Data. ## Troubleshooting - For no results, verify the field exists using observability_keys first - If expected values are missing, try broadening your time range |
| search_cloudflare_documentation | Search the Cloudflare documentation. This tool should be used to answer any question about Cloudflare products or features, including: - Workers, Pages, R2, Images, Stream, D1, Durable Objects, KV, Workflows, Hyperdrive, Queues - AI Search, Workers AI, Vectorize, AI Gateway, Browser Rendering - Zero Trust, Access, Tunnel, Gateway, Browser Isolation, WARP, DDOS, Magic Transit, Magic WAN - CDN, Cache, DNS, Zaraz, Argo, Rulesets, Terraform, Account and Billing Results are returned as semantically similar chunks to the query. |
| migrate_pages_to_workers_guide | ALWAYS read this guide before migrating Pages projects to Workers. |