Skip to content
New storyWe built Skald to count visitors. It caught an AI-key thief.
SkaldEvery visit, truly told.

Solutions · developers

Analytics for developers: one command, a read-only API and an MCP server

Analytics for developers should start from the log you already have. One command connects your server, a read-only API hands every figure to your scripts, and an MCP server lets Claude answer questions about your traffic.

Analytics for developers means web analytics you can install, script and check like the rest of your stack. Skald reads the server's access log (nginx, Apache or Caddy), sorts every line into five groups, and serves every figure as JSON, with a null where a figure was not recorded. See how server log analytics works.

30-day free trial · no card · we set it up within one working day · free to self-host

you@laptop: ~ · sampleread-only
$ curl -H "Authorization: Bearer skald_<id>_<secret>" \
    https://analytics.example.com/traffic-api/v1/example.com/overview

{"schema_version": 1, "site": "example.com",
 "days": [
  {"day": "2026-10-21", "state": "withheld",
   "problems": "the audit did not agree"},
  {"day": "2026-10-22", "state": "ok",
   "not_found_people": null,
   "visits": {"visits": 140, "views": 190}}
 ]}

Sample answer, cut short. A withheld day has no figures; a value not recorded is null.

[01] the way in

Server log analytics for developers: pick how the requests reach Skald

Your own server is the best source: its log saw every request, the machines too. No server? There is a way in for that. Part of AI traffic analytics by role.

pick your set-up

One command on the web server

Skald makes the sending token for you and gives a single-use link that lasts 24 hours. The installer finds the log by itself, and the Test starts on its own.

root@your-server: ~from Settings, Connections
$ curl -fsSL …/traffic-kit/<code> | sudo bash

[02] on your server

What the one-command installer does, and how to undo it

It ships the log your web server already writes, with its own sending token that can add lines to one site and read nothing. It never loses a line or sends one twice.

  1. With or without Docker

    Docker when the server has it, else a systemd service with Python 3.9 or newer. Prefer a file? Download the installer as one script.

  2. Formats it reads

    nginx and Apache, combined or extended, and Caddy's JSON log. An optional request_length field records large POST bodies.

  3. Next.js, counted right

    One field in the log format tells a click inside the site from a prefetch, so in-site page views count and prefetches never do.

  4. Check and uninstall

    sudo skald-ship-check says in plain words what is wrong. A clean uninstall is in the same kit.

[03] the API

A read-only analytics API with scoped tokens

The same JSON files the dashboard reads, rewritten every 2 minutes. Read each day's state first: ok, partial, withheld, missing or before.

A token works until an admin revokes it, or until the person who made it leaves the team or stops being an admin. Skald keeps only its fingerprint.

token scopes4
  1. read every figure, as JSONreading figures
  2. read_private visitor addresses, person lookupowners, admins
  3. mcp an AI assistant, through MCPassistant
  4. ingest send log lines, read nothingsending logs

Files include overview, live, pages, breakdowns, bots, leads, conversions, funnels and quality.

[04] ask your assistant

An MCP server for analytics: ask Claude about your traffic

Connect Claude Code, Claude Desktop or any MCP client that can send a header. Ask "How did last week compare with the week before?" and it reads the answer from Skald, with withheld days named and never counted as zero.

you@laptop: ~ · put in your own address and tokenClaude Code
$ claude mcp add --transport http skald https://analytics.example.com/traffic-mcp \
    --header "Authorization: Bearer skald_<id>_<secret>"
  • list_sites
  • overview
  • breakdown
  • top_pages
  • ai_activity
  • leads
  • funnel
  • compare
  • page_story
  • live_today
  • data_quality
  • site_health
  • conversions
  • find_person

Every tool only reads. Without the visitor-address scope, no answer carries an address and find_person is off. One more thing you will see: when Claude Code fetches one of your pages for you, it says Claude-User from your own address, so Skald files it as not verifiable, never as a fake.

[05] leads from your code

Send leads from your backend in one file, and follow them across domains

Download one file for PHP, Node or Python and call one function where a sign-up or a form lands. It signs the call, retries without ever breaking the form, and waits at most 3 seconds.

  1. Test leads stay out

    Send your own accounts with "test": true, or mark leads already sent with a signed call. They are listed, never counted.

  2. Check every lead arrived

    A signed, read-only address your server asks for the leads Skald has, so it can resend any it missed. Re-sends are deduplicated.

  3. One ID across your domains

    With visitor IDs on, one setting links app.example.com sign-ups to www.example.com visits, and data-link-domains carries the ID to your other domains.

[06] how it is made

Self-hosted analytics with a small, plain stack

Source-available under the Elastic License 2.0, free to self-host for your own sites or your clients'. Read it, change it and run it.

  1. Standard library

    Python, standard library only. No pip install.

  2. SQLite files

    One file each for history, accounts and conversions. Backed up daily and weekly, each copy tested by restoring it.

  3. Counted twice

    A separate audit with its own parser recounts every figure from the raw log. A day the two disagree on is withheld.

  4. 2,500+ tests

    Exact numbers against hand-built logs. Upgrades in one command, with a backup and a rollback.

The same log also shows who scans your site: probes for secret files, fake browsers and attack attempts, set against your own stack. See security from your log, or read the code on GitHub.

[07] what it does not do

The limits of Skald for developers, said plainly

What to know before you wire it in.

What it does not do

  • The API and MCP only read. Nothing can be changed through them, and there is no write API.
  • MCP needs team accounts and a server admin who switched it on. Skald has no OAuth sign-in yet, so clients that cannot send a header cannot connect.
  • The one-command install is for Linux servers. On Microsoft IIS, or a host with no log, only the script tag works, and it sees people only.
  • Vercel log drains need Vercel Pro.
  • Joining a lead to its visits needs the script tag with anonymous visitor IDs on, which is off by default.
  • Skald blocks nothing itself. Crawler rules are applied by nginx, once your server admin sets them up.

questions

Analytics for developers FAQ

Straight answers, including what Skald does not do.

Does Skald have an API?

Yes, a read-only JSON API. Every figure the dashboard shows is a JSON file you read with a token in the Authorization header, rewritten every 2 minutes. Tokens have scopes, and nothing can be changed through the API. A figure that was not recorded is null, never 0.

Can Claude or ChatGPT read my analytics?

Yes, through Skald's MCP server: 14 read-only tools, from overview and breakdown to funnel, page story and data quality. Claude Code connects with one command and a token. The ChatGPT app cannot send a token yet; a developer can add Skald as a remote MCP server through the OpenAI API.

Do I need Docker?

No. The one-command installer uses Docker when the server has it, and a systemd service with Python 3.9 or newer when it does not. To run Skald itself on your own server, the Docker image is the simplest way.

Which log formats does Skald read?

nginx and Apache logs in the combined or extended format, and Caddy's JSON log. A Cloudflare Worker or Cloudflare Logpush covers sites behind Cloudflare, and a Vercel log drain covers Vercel Pro.

Can I read and change the code?

Yes. Skald is source-available under the Elastic License 2.0 and free to self-host: read it, change it and run it for your own sites or your clients' sites. Python standard library only, SQLite files, no build step, and 2,500+ tests.

How big is the script tag?

Under 6.5 KB of plain JavaScript, and it is optional. Counting from the log needs nothing in the page. The tag adds in-page events (form steps, clicks, bookings) and is the only way in for hosts with no log, where it sees people only.

$ tail -f access.log | skald

See what AI does with your site. Free for 30 days.

No card. We set up hosted Skald for you within one working day, or you self-host it free. Every line of your log, sorted and added up.

Start free trial Live demo