home / mcp / logpush mcp server
MCP server for reading Cloudflare Workers logpush data from R2 buckets, enabling search, stats, and quick error access.
Configuration
View docs{
"mcpServers": {
"digibugcat-logpush-mcp": {
"command": "uv",
"args": [
"run",
"logpush-mcp"
],
"env": {
"R2_ACCOUNT_ID": "your_account_id",
"R2_BUCKET_NAME": "your-bucket-name",
"R2_ACCESS_KEY_ID": "your_access_key_id",
"R2_SECRET_ACCESS_KEY": "your_secret_access_key"
}
}
}
}You run the Logpush MCP server to read Cloudflare Workers logpush data from your R2 bucket, browse and search logs across environments, and quickly access error details. It exposes practical commands to list dates, read files, search across logs, and retrieve statistics so you can monitor and troubleshoot efficiently.
You run the MCP server locally or connect to it from your MCP client. Start by launching the server using the included runtime command, then use your client’s MCP interface to access log dates, lists of log files, and individual log entries. Key workflows include listing available log dates by environment, reading specific log files, searching logs with filters, and retrieving aggregated statistics.
Prerequisites: Python and the uv runtime are available on your system.
# Using uv (recommended)
uv pip install -e .
# Or with pip
pip install -e .Set these environment variables to connect to Cloudflare R2 and your log bucket. You can place them in a .env file at the project root.
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-nameStart the MCP server with the runtime command so you can connect from Claude Desktop or another MCP client.
uv run logpush-mcpConfigure Claude Desktop to run the MCP server locally. Add the following to your Claude Desktop config, replacing the path with your actual project path and your credentials.
{
"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"
}
}
}
}You can deploy the MCP server to FastMCP Cloud to make it accessible from anywhere. The flow is centered on signing up, creating a project, configuring environment variables, and deploying.
Step 1. Sign up at FastMCP Cloud and create a new project, selecting this MCP server configuration.
Step 2. Configure environment variables for your project in the FastMCP Cloud dashboard.
R2_ACCOUNT_ID=Your Cloudflare account ID
R2_ACCESS_KEY_ID=Your R2 API token access key ID
R2_SECRET_ACCESS_KEY=Your R2 API token secret access key
R2_BUCKET_NAME=Your logpush R2 bucket nameAfter deployment, FastMCP Cloud provides a URL to connect your MCP client to the remote server. For Claude Desktop, add the following to your client config.
{
"mcpServers": {
"logpush": {
"command": "npx",
"args": ["mcp-remote", "https://your-project.fastmcp.cloud/mcp"]
}
}
}List available date folders in the bucket by environment. Optional limit to restrict results.
List log files for a specific date. Supports date, environment, limit, and pagination cursor.
Read the contents of a specific log file by its path, with an optional entry limit.
Search logs using filters such as date, environment, worker/script name, status code, outcome, and text. Supports result limiting.
Retrieve aggregated statistics for a given date and environment.
Fetch error logs and exceptions with optional script name filtering and limit.
Get the most recent log entries with optional environment and script name filters.