概要
What is Logly?
Logly is an MCP server that lets you query your Logly privacy-first web analytics directly from AI assistants like Claude Desktop, Claude Code, or Cursor. It exposes analytics data—pageviews, sessions, visitors, funnels, real-time activity, and more—through the Model Context Protocol, enabling natural-language questions about your site’s performance.
How to use Logly?
Install is zero-config via npx. Add the server to your MCP client’s config file (e.g., claude_desktop_config.json) with the command npx -y @logly-uk/mcp and the LOGLY_API_KEY environment variable. Restart the client, then use the provided tools (e.g., logly_list_sites, logly_stats) via the assistant. No separate installation step is required.
Key features of Logly
- Nine MCP tools covering stats, breakdowns, funnels, and more.
- Privacy-first analytics: cookie-free, under 1 KB, GDPR compliant.
- Supports both relative date windows (7, 30, 90 days) and explicit date ranges.
- Real-time visitor counts via
logly_realtime. - Funnel analysis with completion and drop-off data.
- Install snippet generation for new sites.
- Runs via
npx—no manual install needed.
Use cases of Logly
- Ask an AI assistant how traffic changed this week compared to last.
- Identify where your signup funnel loses users.
- Get the install
<script>tag for adding Logly to a new site’s<head>. - Monitor current active visitors on your site in real time.
- Analyze top pages, referrers, countries, and device/browser splits.
FAQ from Logly
What dependencies or runtime are required?
Node.js 18 or newer is required. You also need a Logly account and an API key from Settings → API keys in the Logly dashboard.
How do I get a Logly API key?
Create one in your Logly dashboard under Settings → API keys. The key starts with logly_ and is shown only once.
What tools does the server provide?
It provides nine tools: logly_list_sites, logly_stats, logly_breakdown, logly_realtime, logly_events, logly_funnels, logly_funnel_results, and logly_install_snippet. Each returns analytics data relevant to its name.
How do date filters work?
Stats tools accept a days window (7, 30, or 90; defaults to 30) or explicit from/to parameters in YYYY-MM-DD format. If both are given, from/to takes precedence.
Where is the API base URL configurable?
You can override the base URL with the optional LOGLY_API_BASE environment variable. The default is https://app.logly.uk.