Logly

by logly-uk

315 downloads
Not rated
GitHub

About

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…

Details

Author
logly-uk
Downloads
315
Categories
Other

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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Logly
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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.

logly_list_sites

List every website in the authenticated Logly account with its site ID. Start here to find the site ID the other tools need.

logly_stats

Traffic totals for a site — pageviews, sessions, visitors, bounce rate, average duration — plus a daily series and a comparison against the previous period.

logly_breakdown

Top pages, top referrers, top countries and device/browser split for a site over the given period.

logly_realtime

Visitors currently active on a site (real-time, the last few minutes).

logly_events

Custom event counts for a site (events sent via logly('event', ...)) over the given period.

logly_funnels

List the conversion funnels defined for a site, with their IDs and step sequences.

logly_funnel_results

Completion counts and drop-off per step for one conversion funnel.

logly_install_snippet

Return the Logly tracking snippet for a site — the single <script> tag to add to the site's <head>. Works offline, no API call.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "logly": {
            "logly": {
                "command": "npx",
                "args": [
                    "-y",
                    "@logly-uk/mcp"
                ],
                "env": {
                    "LOGLY_API_KEY": "your_logly_api_key_here"
                }
            }
        }
    }
}

McpServers

{
    "logly": {
        "command": "npx",
        "args": [
            "-y",
            "@logly-uk/mcp"
        ],
        "env": {
            "LOGLY_API_KEY": "your_logly_api_key_here"
        }
    }
}

Logly MCP server

Query your Logly web analytics from Claude, Cursor, or any
Model Context Protocol client.

Logly is privacy-first web analytics — under 1 KB, cookie-free, GDPR compliant by
design. This server exposes your analytics over MCP so an AI assistant can answer
questions like "how did traffic change this week?" or "where is my signup
funnel losing people?"
— and even hand you the install snippet for a new site.

Requirements

- Node.js 18 or newer
- A Logly account and an API key — create one in Settings → API keys in your
Logly dashboard. The key looks like logly_a1b2c3...
and is shown only once.

Setup

The server runs via npx — no install step needed.

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "logly": {
      "command": "npx",
      "args": ["-y", "@logly-uk/mcp"],
      "env": { "LOGLY_API_KEY": "logly_your_key_here" }
    }
  }
}

Restart Claude Desktop.

Claude Code

claude mcp add logly -e LOGLY_API_KEY=logly_your_key_here -- npx -y @logly-uk/mcp

Cursor

Add to .cursor/mcp.json in your project (or the global one):

{
  "mcpServers": {
    "logly": {
      "command": "npx",
      "args": ["-y", "@logly-uk/mcp"],
      "env": { "LOGLY_API_KEY": "logly_your_key_here" }
    }
  }
}

Tools

| Tool | What it does |
|---|---|
| logly_list_sites | List every site in your account with its site ID — start here. |
| logly_stats | Pageviews, sessions, visitors, bounce rate, avg duration, daily series, previous-period comparison. |
| logly_breakdown | Top pages, referrers, countries and device/browser split. |
| logly_realtime | Visitors active right now. |
| logly_events | Custom event counts. |
| logly_funnels | List a site's conversion funnels and their steps. |
| logly_funnel_results | Completion counts and drop-off per funnel step. |
| logly_install_snippet | The <script> tag to add Logly to a site's <head>. |

Date filters

Stats tools accept a days window (7, 30 or 90 — defaults to 30) or an explicit
from / to pair (YYYY-MM-DD). If both are given, from/to wins.

Environment variables

| Variable | Required | Purpose |
|---|---|---|
| LOGLY_API_KEY | yes | Your Logly API key. |
| LOGLY_API_BASE | no | Override the API base URL (default https://app.logly.uk). |

Links

- Logly — <https://logly.uk>
- MCP server page — <https://logly.uk/mcp/>
- Public API reference — <https://logly.uk/docs>

MIT licensed.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.