Logpush MCP
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 "Deploy 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 MCP show 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
Related MCP server: Log MCP Server
Installation
# Using uv (recommended)
uv pip install -e .
# Or with pip
pip install -e .Configuration
Set these environment variables (or create a .env file):
R2_ACCOUNT_ID=your_account_id
R2_ACCESS_KEY_ID=your_access_key_id
R2_SECRET_ACCESS_KEY=your_secret_access_key
R2_BUCKET_NAME=your-bucket-nameGet R2 API credentials from: Cloudflare Dashboard > R2 > Manage R2 API Tokens
Usage
Run locally
uv run logpush-mcpClaude Desktop Configuration
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"logpush": {
"command": "uv",
"args": ["run", "logpush-mcp"],
"cwd": "/path/to/arross-cf-mcp",
"env": {
"R2_ACCOUNT_ID": "your_account_id",
"R2_ACCESS_KEY_ID": "your_access_key_id",
"R2_SECRET_ACCESS_KEY": "your_secret_access_key",
"R2_BUCKET_NAME": "your-bucket-name"
}
}
}
}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:
bucket/
├── production/YYYYMMDD/*.log.gz
└── staging/YYYYMMDD/*.log.gzFiles 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:
{
"mcpServers": {
"logpush": {
"command": "npx",
"args": ["mcp-remote", "https://your-project.fastmcp.cloud/mcp"]
}
}
}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
Available Tools
7 toolsget_errorsB
Get error logs and exceptions for a specific date.
Args: date: Date in YYYYMMDD format. environment: Environment (production or staging). script_name: Filter by worker script name (optional). limit: Maximum entries to return (default 50).
Returns: Dict with error entries including exceptions and error-level logs.
Inputs: date (required), environment, script_name, limit. Returns: object
get_latestB
Get the most recent log entries.
Args: environment: Environment (production or staging). script_name: Filter by worker script name (optional). limit: Maximum entries to return (default 50).
Returns: Dict with the most recent log entries.
Inputs: environment, script_name, limit. Returns: object
get_log_statsB
Get aggregated statistics for logs on a specific date.
Args: date: Date in YYYYMMDD format. environment: Environment (production or staging).
Returns: Dict with statistics including request counts by worker, status distribution, error rate.
Inputs: date (required), environment. Returns: object
list_log_datesB
List available date folders in the logpush R2 bucket.
Args: environment: Filter by environment (production, staging). None for all. limit: Maximum number of dates to return (default 30).
Returns: Dict with dates array containing date, environment, and prefix.
Inputs: environment, limit. Returns: object
list_log_filesA
List log files for a specific date.
Args: date: Date in YYYYMMDD format (e.g., "20260111"). environment: Environment (production or staging). limit: Maximum number of files to return (default 50). cursor: Pagination cursor from previous response.
Returns: Dict with files array, count, and next_cursor for pagination.
Inputs: date (required), environment, limit, cursor. Returns: object
read_log_fileA
Read and parse a specific log file from R2.
Args: path: Full object path/key (e.g., "production/20260111/filename.log.gz"). limit: Maximum number of entries to return (default 100).
Returns: Dict with entries array and count.
Inputs: path (required), limit. Returns: object
search_logsA
Search logs with filters.
Args: date: Date in YYYYMMDD format. environment: Environment (production or staging). script_name: Filter by worker script name. status_code: Filter by exact HTTP status code. status_gte: Filter by status code >= value (e.g., 400 for errors). status_lt: Filter by status code < value. outcome: Filter by outcome ("ok" or "exception"). search_text: Search in URL and log messages. limit: Maximum entries to return (default 50).
Returns: Dict with matching entries and count.
Inputs: date (required), environment, script_name, status_code, +5 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose with no ambiguity: get_errors retrieves error logs, get_latest fetches recent entries, get_log_stats provides aggregated data, list_log_dates lists available dates, list_log_files enumerates files for a date, read_log_file reads a specific file, and search_logs performs filtered searches. The descriptions reinforce these distinct roles, making tool selection straightforward.
All tool names follow a consistent verb_noun pattern using snake_case, such as get_errors, list_log_dates, and search_logs. This uniformity enhances readability and predictability across the toolset, with no deviations in naming conventions.
With 7 tools, this server is well-scoped for log management, covering essential operations like retrieval, listing, statistics, and search. Each tool serves a specific function without redundancy, making the count appropriate for the domain's needs.
The toolset provides comprehensive coverage for log management, including listing dates and files, reading specific files, retrieving errors and latest entries, gathering statistics, and performing searches with filters. There are no obvious gaps, enabling agents to handle typical log analysis workflows effectively.
Related MCP Connectors
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
Ingest and search LogsLoom logs from coding agents.
Read Cloudflare Workers spend, pause runaway scripts, resume them, and set spend limits.
Errors, logs and AI-call costs for apps on Node.js, Next.js, Cloudflare Workers or the browser. Ask your AI what’s broken, why, and how to fix it, right inside Cursor or Claude.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables monitoring and analysis of local application log files with real-time tailing, error tracking, and search capabilities. Perfect for debugging Node.js applications, web servers, or any application that writes to log files through natural language commands.65MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to automatically inspect and analyze application runtime log files for debugging and troubleshooting. Supports monitoring multiple log directories simultaneously with tools for listing, reading, searching, and paginating through log files.840 PyPIMIT
- FlicenseAqualityDmaintenanceEnables querying OpenTelemetry logs stored in OpenSearch across development and production environments. Provides tools for searching logs by various criteria including free-text Lucene queries, trace IDs, service names, error levels, and specific fields.8-
- FlicenseNot gradedqualityDmaintenanceHandles log file management and analysis with tools to list, read, search, filter, and generate analytics on log files.1-