Provides access to Cloudflare Workers logpush data stored in R2 buckets, enabling log browsing, searching with filters, error tracking, and aggregated statistics for production and staging environments.
Reads and analyzes Cloudflare Workers Trace Events logpush data, allowing users to list log dates, search logs by worker name, status code, and outcome, retrieve error logs and exceptions, and access the most recent log entries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Logpush MCPshow me yesterday's error logs from production"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Logpush MCP
MCP server for reading Cloudflare Workers logpush data from R2 buckets.
Features
List available log dates by environment (production/staging)
Browse and read individual log files
Search logs with filters (worker, status code, outcome, text)
Get aggregated statistics
Quick access to errors and exceptions
Get latest logs with one command
Installation
Configuration
Set these environment variables (or create a .env file):
Get R2 API credentials from: Cloudflare Dashboard > R2 > Manage R2 API Tokens
Usage
Run locally
Claude Desktop Configuration
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
MCP Tools
list_log_dates
List available date folders in the bucket.
environment: production, staging, or omit for alllimit: max dates to return (default 30)
list_log_files
List log files for a specific date.
date: YYYYMMDD formatenvironment: production or staginglimit: max files (default 50)cursor: pagination token
read_log_file
Read contents of a specific log file.
path: full object keylimit: max entries (default 100)
search_logs
Search logs with filters.
date: YYYYMMDD formatenvironment: production or stagingscript_name: filter by worker namestatus_code: exact status codestatus_gte: status >= value (e.g., 400)status_lt: status < valueoutcome: "ok" or "exception"search_text: search in URL and log messageslimit: max entries (default 50)
get_log_stats
Get aggregated statistics for a date.
date: YYYYMMDD formatenvironment: production or staging
get_errors
Get error logs and exceptions.
date: YYYYMMDD formatenvironment: production or stagingscript_name: optional filterlimit: max entries (default 50)
get_latest
Get the most recent log entries.
environment: production or stagingscript_name: optional filterlimit: max entries (default 50)
Log Structure
Expects Cloudflare Workers Trace Events logpush format:
Files are NDJSON with Cloudflare's workers_trace_events schema.
Deployment to FastMCP Cloud
Step 1: Sign up at FastMCP Cloud
Go to fastmcp.cloud
Sign in with your GitHub account
Step 2: Create a new project
Click "Create Project"
Select this repository (
logpush-mcp)FastMCP will auto-detect the
pyproject.tomlentry point
Step 3: Configure environment variables
In the FastMCP Cloud dashboard, add these environment variables:
Variable | Description |
| Your Cloudflare account ID |
| R2 API token access key ID |
| R2 API token secret access key |
| Name of your logpush R2 bucket |
Step 4: Deploy
Click "Deploy" - FastMCP handles the rest automatically.
Step 5: Connect to your MCP client
FastMCP Cloud provides a URL like https://your-project.fastmcp.cloud/mcp
For Claude Desktop, add to your config:
Getting R2 API Credentials
Go to Cloudflare Dashboard → R2 → Manage R2 API Tokens
Create a new API token with:
Permissions: Object Read & Write
Scope: Specific bucket (your logpush bucket)
Copy the Access Key ID and Secret Access Key
License
MIT