Cloudflare Observability MCP Server
The Observability MCP exposes Workers logs, traces and error analytics to agents โ ask why a Worker is failing and get data back, after OAuth authorization.
- Provider
- Cloudflare โ
- Source
- https://github.com/cloudflare/mcp-server-cloudflare โ
- Categories
- โ๏ธ Cloud, Infrastructure & DevOps
ไธญๆ็ฎไป
Cloudflare ่ฎค่ฏ็ๅฏ่งๆตๆง MCP ๆๅกๅจใๅฏไปไปปๆ MCP ๅฎขๆท็ซฏๆฅ่ฏข Worker ๆฅๅฟใ้พ่ทฏไบไปถไธ้่ฏฏๅๆใ
Legacy SSE endpoint
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"cloudflare-observability": {
"url": "https://observability.mcp.cloudflare.com/mcp"
}
}
}claude mcp add --transport http cloudflare-observability https://observability.mcp.cloudflare.com/mcp
Or add to .vscode/mcp.json:
{
"servers": {
"cloudflare-observability": {
"type": "http",
"url": "https://observability.mcp.cloudflare.com/mcp"
}
}
}- Open Settings โ Connectors (Integrations) โ Add Custom Connector.
- Paste the endpoint URL:
https://observability.mcp.cloudflare.com/mcp - Complete the browser OAuth 2.1 login flow when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"cloudflare-observability": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://observability.mcp.cloudflare.com/mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"cloudflare-observability": {
"serverUrl": "https://observability.mcp.cloudflare.com/mcp"
}
}
}๐งฐ Tools exposed by Cloudflare Observability MCP (3)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| query_worker_logs | ๐ข Read | Query recent logs (invocations, exceptions, console output) for a Worker. | scriptName*: stringfilter: stringminutes: number |
| list_Trace_events | ๐ข Read | List trace events captured by Workers observability. | scriptName: stringlimit: number |
| get_error_analytics | ๐ข Read | Get error-rate analytics for Workers in the account. | scriptName: stringdays: number |
๐ OAuth 2.1 & Security
- Auth type
- OAuth 2.1
- Dynamic Client Registration
- โ Supported
- PKCE S256
- โ Supported
- Protected resource metadata
- https://observability.mcp.cloudflare.com/.well-known/oauth-protected-resource (expected location)
๐งฉ Recommended Agent Skills
๐ Guide
Cloudflare Observability MCP โ Remote MCP Server
Cloudflare's Observability MCP turns your Workers telemetry into agent tools: query recent Worker logs, list trace events and pull error analytics. Combined with an agent's code context it makes 'why is my Worker 500ing' a one-prompt investigation.
Endpoint & Transport
- Endpoint URL:
https://observability.mcp.cloudflare.com/mcp - Legacy SSE endpoint:
https://observability.mcp.cloudflare.com/sse - Transport: Streamable HTTP + legacy SSE
Authentication
Cloudflare Observability MCP uses OAuth 2.1 โ the first request returns a 401 Unauthorized challenge with a WWW-Authenticate header pointing at the authorization metadata. Compliant clients (Cursor, Claude, VS Code, ChatGPT) handle the whole flow โ PKCE and Dynamic Client Registration, so no manual client setup is needed โ and simply open a browser consent screen.
Available Tools (3)
| Tool | Safety | Description |
|---|---|---|
query_worker_logs |
read | Query recent logs (invocations, exceptions, console output) for a Worker. |
list_Trace_events |
read | List trace events captured by Workers observability. |
get_error_analytics |
read | Get error-rate analytics for Workers in the account. |
Connect in 30 Seconds
Claude Code โ one command:
claude mcp add --transport http cloudflare-observability https://observability.mcp.cloudflare.com/mcp
Cursor โ add to ~/.cursor/mcp.json:
{ "mcpServers": { "cloudflare-observability": { "url": "https://observability.mcp.cloudflare.com/mcp" } } }
VS Code โ add to .vscode/mcp.json:
{ "servers": { "cloudflare-observability": { "type": "http", "url": "https://observability.mcp.cloudflare.com/mcp" } } }
Claude Desktop & stdio clients โ bridge with mcp-remote:
{ "mcpServers": { "cloudflare-observability": { "command": "npx", "args": ["-y", "mcp-remote", "https://observability.mcp.cloudflare.com/mcp"] } } }
On first connect your client opens a browser OAuth consent screen โ approve it and tools become available immediately.
Troubleshooting
- 401 Unauthorized on connect โ that's expected; the server is OAuth-protected. Let your client complete the browser consent flow, or inspect the endpoint in our OAuth debugger to see the exact
WWW-Authenticatechallenge. - Which URL should I use? Prefer
https://observability.mcp.cloudflare.com/mcp(Streamable HTTP). The SSE URL is only for older clients pinned to the pre-2025-03-26 spec. - "Session expired" / stale
Mcp-Session-Idโ just re-sendinitialize; stateless clients can ignore session headers entirely. - Requires OAuth โ telemetry is scoped to the authorizing account's data.
- Log retention follows your Cloudflare plan's observability limits.
๐ How to Connect
- Copy the Cloudflare Observability MCP endpoint URLThe remote endpoint is https://observability.mcp.cloudflare.com/mcp. A legacy SSE endpoint is also available at https://observability.mcp.cloudflare.com/sse.
- Add it to your MCP clientClaude Code:
claude mcp add --transport http cloudflare-observability https://observability.mcp.cloudflare.com/mcp. Cursor: add"cloudflare-observability": { "url": "https://observability.mcp.cloudflare.com/mcp" }undermcpServersin ~/.cursor/mcp.json. Other clients work similarly. - Complete the OAuth consentOn first connection your client opens a Cloudflare consent screen in the browser. Approve it to grant access; the token is stored by the client and refreshed automatically.
- Verify with the online inspectorPaste https://observability.mcp.cloudflare.com/mcp into remotemcp.net/inspector, run initialize and tools/list, and confirm Cloudflare Observability MCP's 3 tools respond.
โ FAQ
What is the Cloudflare Observability MCP remote MCP endpoint?
The primary endpoint is https://observability.mcp.cloudflare.com/mcp, with a legacy SSE endpoint at https://observability.mcp.cloudflare.com/sse. It is an official first-party server operated by Cloudflare, speaking the Streamable HTTP + legacy SSE transport.
Should I use Cloudflare Observability MCP's /mcp or /sse endpoint?
Use https://observability.mcp.cloudflare.com/mcp โ Streamable HTTP is the current MCP transport and what every modern client defaults to. https://observability.mcp.cloudflare.com/sse exists only for clients still on the legacy HTTP+SSE transport from the 2024 spec.
How do I authenticate with Cloudflare Observability MCP?
Cloudflare Observability MCP uses OAuth 2.1. When your client first connects it receives a 401 challenge, discovers the authorization server via RFC 9728 metadata, and opens a browser consent screen. Dynamic Client Registration is supported, so compliant clients register themselves automatically.
I'm getting a 401 Unauthorized from Cloudflare Observability MCP โ what's wrong?
A 401 means your client hasn't completed (or has lost) the OAuth authorization. Remove and re-add the server in your client to restart the consent flow, and check that your browser session can reach the provider's login page. If the 401 arrives without a WWW-Authenticate header, run it through our OAuth debugger to see what's missing.
Which MCP clients work with Cloudflare Observability MCP?
Any client that supports remote MCP servers: Cursor, Claude Code (`claude mcp add --transport http cloudflare-observability https://observability.mcp.cloudflare.com/mcp`), VS Code Copilot, ChatGPT connectors, Windsurf, and Claude Desktop via the `mcp-remote` bridge.
What tools does Cloudflare Observability MCP expose?
3 tools are cataloged in this directory โ including `query_worker_logs`, `list_Trace_events`, `get_error_analytics`. Use our online inspector to fetch the live tool list straight from the endpoint.
๐ Connect Guides
๐ Embed Status Badge in README
Related Servers
Cloudflare's free, authless documentation MCP server. Agents can search the full Cloudflare docs corpus โ no account or token required.
Vercel's official remote MCP server. Agents can list deployments, fetch build logs and search Vercel docs with a token-authorized connection.
Sentry's hosted MCP server for error monitoring. Agents can inspect issues, search events and resolve regressions directly from your IDE.
Cloudflare's authenticated MCP server for account bindings. Agents can list Workers, query D1 databases, and inspect KV and R2 namespaces.