npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@frontmcp/storage-sqlite

v1.6.1

Published

SQLite storage backend for FrontMCP - local session, elicitation, and event persistence without Redis

Readme

@frontmcp/storage-sqlite

SQLite storage backend for FrontMCP — session, task, elicitation, and event persistence without running Redis.

NPM

When to use it

Reach for SQLite when you need state to survive a restart but do not want a network dependency:

  • Local development — restart frontmcp dev without losing sessions.
  • Single-node deployments — a VPS or container with a mounted volume.
  • CLI / desktop distributions — a single binary with embedded storage.
  • Background tasks — the CLI task runner spawns detached workers that need a shared store the parent process can also read.

Use Redis instead when more than one node has to see the same state — SQLite is a local file, so it cannot coordinate across machines.

Install

npm install @frontmcp/storage-sqlite

better-sqlite3 is a native module and is loaded lazily, so importing @frontmcp/sdk never pulls it in unless you actually enable SQLite. It does not work on Edge/V8-isolate runtimes (Cloudflare Workers) — use Redis or Upstash there.

Usage

Most servers never import this package directly. Point a store at SQLite in config and the SDK wires it up:

@FrontMcp({
  info: { name: 'my-server', version: '1.0.0' },
  apps: [MyApp],
  // Persist sessions across restarts.
  transport: { persistence: { sqlite: { path: './data/frontmcp.sqlite' } } },
  // Persist background tasks (required for the `cli` task runner).
  tasks: { enabled: true, sqlite: { path: './data/tasks.sqlite', walMode: true } },
})
class Server {}

Direct use

import { openDatabase, SqliteSessionStore } from '@frontmcp/storage-sqlite';

const store = new SqliteSessionStore({ path: './data/sessions.sqlite', walMode: true });
await store.set('session-id', { userId: 'u1' }, { ttlSeconds: 3600 });

Stores

| Export | Backs | | ------------------------ | ----------------------------------------------------- | | SqliteSessionStore | MCP transport sessions | | SqliteTaskStore | Background tasks (status, outcome, cancel signalling) | | SqliteElicitationStore | Pending elicitation round trips | | SqliteEventStore | Streamable-HTTP event replay | | SqliteKvStore | Generic key/value with TTL | | SqliteStorageAdapter | The StorageAdapter the SDK's factories accept |

Options

| Option | Default | Notes | | ---------------------- | ------- | ------------------------------------------------------ | | path | — | Database file. Parent directories are created for you. | | walMode | true | Write-ahead logging. Leave on for concurrent readers. | | ttlCleanupIntervalMs | 60000 | How often expired rows are swept. | | encryption | — | Encrypt values at rest; pass a key to enable. |

Operational notes

  • Back up the file. It is ordinary SQLite — copy it, or use sqlite3 .backup.
  • WAL creates sidecar files (-wal, -shm). Ship the whole set, or check point before copying.
  • One writer. Multiple processes can read; concurrent writers serialize. The CLI task runner relies on WAL for exactly this.

Full guide: SQLite Setup

License

Apache-2.0