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
$ 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.
$ curl -fsSL …/traffic-kit/<code> | sudo bashSelf-host the whole of Skald
One container: the dashboard, the helpers and the scheduler. Mount the log read-only; the data lives in a volume. The :2 tag follows the major version.
$ docker run -d --name skald -p 127.0.0.1:8080:8080 \
-v /var/log/nginx:/logs:ro -v skald-data:/var/lib/skald \
-e SKALD_SITE=example.com ghcr.io/spcaeo/skald:2The Skald Worker, on any Cloudflare plan
A small Worker posts each request to Skald after the page has gone out, so it never slows the page, and pages served from Cloudflare's cache are counted too. Deploy it with one button. Where your plan has Logpush, Skald reads that as well.
A Vercel log drain
Vercel sends each request to Skald through its log drain. Nothing to install and no change to the site's code. Log drains need Vercel Pro.
Only the script tag
For a host with no readable log. One tag, under 6.5 KB, posting straight to Skald. It sees people and in-page events, but no AI crawler, fetcher or bot, because none of them run a script.
[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.
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.
Formats it reads
nginx and Apache, combined or extended, and Caddy's JSON log. An optional
request_lengthfield records large POST bodies.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.
Check and uninstall
sudo skald-ship-checksays 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.
readevery figure, as JSONreading figuresread_privatevisitor addresses, person lookupowners, adminsmcpan AI assistant, through MCPassistantingestsend 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.
$ 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.
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.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.
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-domainscarries 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.
Standard library
Python, standard library only. No pip install.
SQLite files
One file each for history, accounts and conversions. Backed up daily and weekly, each copy tested by restoring it.
Counted twice
A separate audit with its own parser recounts every figure from the raw log. A day the two disagree on is withheld.
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.
keep reading
More on analytics for developers
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.