Skip to main content
Glama
Logpush MCP

Logpush MCP

by DigiBugCat

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-name

Get R2 API credentials from: Cloudflare Dashboard > R2 > Manage R2 API Tokens

Usage

Run locally

uv run logpush-mcp

Claude 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 all

  • limit: max dates to return (default 30)

list_log_files

List log files for a specific date.

  • date: YYYYMMDD format

  • environment: production or staging

  • limit: max files (default 50)

  • cursor: pagination token

read_log_file

Read contents of a specific log file.

  • path: full object key

  • limit: max entries (default 100)

search_logs

Search logs with filters.

  • date: YYYYMMDD format

  • environment: production or staging

  • script_name: filter by worker name

  • status_code: exact status code

  • status_gte: status >= value (e.g., 400)

  • status_lt: status < value

  • outcome: "ok" or "exception"

  • search_text: search in URL and log messages

  • limit: max entries (default 50)

get_log_stats

Get aggregated statistics for a date.

  • date: YYYYMMDD format

  • environment: production or staging

get_errors

Get error logs and exceptions.

  • date: YYYYMMDD format

  • environment: production or staging

  • script_name: optional filter

  • limit: max entries (default 50)

get_latest

Get the most recent log entries.

  • environment: production or staging

  • script_name: optional filter

  • limit: max entries (default 50)

Log Structure

Expects Cloudflare Workers Trace Events logpush format:

bucket/
├── production/YYYYMMDD/*.log.gz
└── staging/YYYYMMDD/*.log.gz

Files are NDJSON with Cloudflare's workers_trace_events schema.

Deployment to FastMCP Cloud

Step 1: Sign up at FastMCP Cloud

  1. Go to fastmcp.cloud

  2. Sign in with your GitHub account

Step 2: Create a new project

  1. Click "Create Project"

  2. Select this repository (logpush-mcp)

  3. FastMCP will auto-detect the pyproject.toml entry point

Step 3: Configure environment variables

In the FastMCP Cloud dashboard, add these environment variables:

Variable

Description

R2_ACCOUNT_ID

Your Cloudflare account ID

R2_ACCESS_KEY_ID

R2 API token access key ID

R2_SECRET_ACCESS_KEY

R2 API token secret access key

R2_BUCKET_NAME

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

  1. Go to Cloudflare Dashboard → R2 → Manage R2 API Tokens

  2. Create a new API token with:

    • Permissions: Object Read & Write

    • Scope: Specific bucket (your logpush bucket)

  3. Copy the Access Key ID and Secret Access Key

License

MIT

Available Tools

7 tools
get_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

    A3.8/5.0

    Scored across 7 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables 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.
      6
      5
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables 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.
      8
      40 PyPI
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables 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
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Handles log file management and analysis with tools to list, read, search, filter, and generate analytics on log files.
      1
      -