# Logly [Health: Active]

**Category:** 🎯 Marketing  
**Repository:** https://github.com/logly-uk/logly-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 166  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/logly

## Description
Query your Logly web analytics — traffic, funnels and real-time visitors — from any MCP client.

## Tools
Capabilities this server exposes over MCP:

- **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 Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

**Requires environment variables:** `LOGLY_API_KEY`, `LOGLY_API_BASE` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What the Logly MCP server does

The Logly MCP server gives an MCP-compatible AI client access to analytics held in a Logly account. It can identify the sites associated with the account, retrieve traffic metrics, inspect audience and acquisition breakdowns, report current visitors, and examine custom events.

Conversion analysis is covered through separate funnel tools. An assistant can list a site's funnels and steps, then retrieve completion totals and drop-off at each step. The server can also return the Logly tracking script needed to add analytics to a site's HTML head.

Logly describes its analytics product as privacy-first, cookie-free, GDPR compliant by design, and under 1 KB. Those properties belong to the connected Logly product; this server exposes the account data and installation snippet through MCP.

## How it works

The server uses a Logly API key to access account and site analytics. Start with `logly_list_sites` to obtain the site ID needed for site-specific queries. The remaining tools use that account and site context to retrieve the requested metrics or configuration.

Stats queries support either a relative window of 7, 30, or 90 days, or explicit `from` and `to` dates in `YYYY-MM-DD` format. The default window is 30 days. When both styles are supplied, the explicit date pair takes precedence. Results from the statistics tool include headline metrics, a daily series, and a comparison with the previous period.

## Setup and configuration

Node.js 18 or newer is required, along with a Logly account and API key. Create the key in the Logly dashboard under Settings → API keys. The key is shown only once, so store it securely.

No local package installation is required. Run the server with `npx -y @logly-uk/mcp` and provide the key through `LOGLY_API_KEY`.

For Claude Desktop or Cursor, add an MCP server entry whose command is `npx`, whose argument is `-y @logly-uk/mcp`, and whose environment contains the API key. Claude Code can register the same command with `claude mcp add`, passing the key with `-e LOGLY_API_KEY=...`. The optional `LOGLY_API_BASE` variable overrides the default API base URL of `https://app.logly.uk`.

## Tools and capabilities

- `logly_list_sites`: Lists account sites and their IDs.
- `logly_stats`: Returns pageviews, sessions, visitors, bounce rate, average duration, daily data, and prior-period comparison.
- `logly_breakdown`: Reports top pages, referrers, countries, and device or browser splits.
- `logly_realtime`: Shows visitors currently active.
- `logly_events`: Returns custom event counts.
- `logly_funnels`: Lists conversion funnels and their steps.
- `logly_funnel_results`: Reports funnel completions and step-level drop-off.
- `logly_install_snippet`: Provides the script tag for a site's head.

The Logly MCP server is MIT licensed and is intended for clients that support standard MCP server configuration.

_Full upstream README: https://allmcps.com/mcp/logly/readme_

