Repository navigation
v0.4.0: Backups, MCP, and a faster core
Kinglet 0.4.0 adds backups, a log archive, reusable notification channels, an MCP server for AI clients, and a much faster storage layer. Back up /data before upgrading: the first boot migrates the database (see Upgrade notes).
Highlights
- Backups and restore. Optional S3 snapshots (compressed, optionally encrypted with a passphrase), on a schedule with retention. Restores are staged and applied at boot, keeping a pre-restore copy for rollback. Local SQLite only; Turso users rely on Turso's point-in-time restore.
- Log archive. Export events to compressed NDJSON in S3 before retention deletes them, and import them back when needed.
- Notification channels. Reusable webhook, Discord, and Slack channels shared by monitors, with a per-channel test button, rich Discord embeds and Slack attachments, and a delivery log.
- MCP server for AI clients.
npx -y @kinglet/mcpconnects Claude, Cursor, VS Code, Codex, and other MCP clients to one project with akm_MCP key. Scopes:logs.read,monitors.read, andmonitors.write(monitor writes also requireKINGLET_MCP_ALLOW_MONITOR_WRITES=1). - Node SDK on npm.
npm install @kinglet/sdk-node. The SDK and MCP server run on Node 24 or newer. - Faster and leaner. On the same hardware: the default log view loads ~70× faster on large windows, the histogram and grouped counts ~5–6× faster, ingest up to ~3× faster on small batches, and memory under load drops from ~1.2 GB to ~400 MB. Disk per event is ~25–30% smaller.
- New API.
GET /v1/aggregatefor counts and group-by, shareable event links (GET /v1/events/:uid) with surrounding context, alert detail and filters, and per-key usage (key:<id>filter). - UI. Settings split into account, workspace, and project; a reworked log toolbar with a wider time-window picker and refresh rates; histogram range selection; themed tooltips and consistent tables.
New settings
KINGLET_SEARCH=substring(default) |words|off.wordsmatches words and word prefixes with ~20% faster ingest and ~22% less disk;offdrops the full-text index and scans the time window. Changing it rebuilds the index once at boot.- Backups, archive, and notification settings: see the Backups & archive docs.
Upgrade notes
- Back up
/datafirst. The first boot migrates the database to schema v11. It converts all ids to UUID v7 and rebuilds the events table for compact storage, which takes roughly a minute per million events. Kinglet starts listening once it finishes. Upgrading a 0.3.0 install was tested end to end: events, search, users, API keys, and monitors all carry over. - Project ids change to UUIDs. Scripts that pass a numeric
project=id must use the new id shown in Settings → Projects. API keys keep working unchanged. - No downgrade. Older Kinglet versions refuse to open a v11 database; restore your backup to go back.
- Event order.
GET /v1/eventsnow returns newest first by event timestamp (ties by row id) instead of arrival order. The cursor is still the numeric row id. - Node SDK. Batches default to 1,000 events (was 200), with at most 5,000 per request. A backlog no longer risks being truncated, and
close()waits for an in-flight request and drains the buffer. - Event caps. The defaults are unchanged (1M events and 1 GB per project, 4 GB per database). At the default 14-day retention, a project averaging more than ~0.8 events/s reaches the event cap; raise
KINGLET_MAX_EVENTS_PER_PROJECTto fit your volume. See Capacity planning. - Turso. Turso databases on the newer MVCC engine are supported with search
off(they cannot hold the full-text index). For most installs the default local file is fastest; see Storage.
Images and packages
ghcr.io/rushlightlab/kinglet:0.4.0(also0.4,latest), linux/amd64 and linux/arm64.@kinglet/sdk-node@0.4.0and@kinglet/mcp@0.4.0on npm.