Cloudflare-analytics-with-MCP-Server-Intergration
Verified Safeby vishnusrinivas00
Overview
Analyzes Cloudflare Worker logs stored in DuckDB, providing error summaries and performance metrics via a FastAPI server with MCP compatibility.
Installation
uvicorn main:app --host 0.0.0.0 --port 8000Environment Variables
- CLOUDFLARE_API_TOKEN
- ACCOUNT_ID
- WORKER_NAME
- DB_PATH
- PORT
Security Notes
Sensitive credentials (Cloudflare API Token, Account ID, Worker Name) are correctly handled as environment variables via `os.getenv` and `dotenv`. SQL queries in analytics endpoints (`query_error_summary_range`, `query_performance_range`, `query_summary_range`) use parameterized queries, which prevents SQL injection. The `/db/inspect` endpoint uses f-strings for `DESCRIBE` and `SELECT` statements; while the table names are internally derived from `SHOW TABLES`, which limits external injection risk, robust input validation or parameterization would be ideal if table names could ever be influenced by untrusted input. No 'eval' or malicious obfuscation patterns were found. Standard web server security practices should be applied for deployment.
Similar Servers
tomcp
Converts any website into an MCP (Model-Config-Protocol) server for AI tools and enables AI chat with website content by converting HTML to clean Markdown.
portaljs-mcp-server
A remote Model Context Protocol (MCP) server deployed on Cloudflare Workers, providing AI agent tools to interact with PortalJS datasets for search, retrieval, and data preview.
MyMCP
Dynamically convert any OpenAPI v3 specification into a fully-functional Model Context Protocol (MCP) server, exposing external APIs as MCP tools.
semantic-wake-intelligence-mcp
A Model Context Protocol (MCP) server providing AI agents with a 3-layer temporal intelligence system for memory, causality, and prediction.