lmdb-js

Node.js bindings for LMDB (Lightning Memory-Mapped Database) — an extremely fast embedded key-value store using memory-mapped files. Provides ordered key access, ACID transactions, multi-reader/single-writer concurrency, and optionally msgpack or CBOR value encoding. Orders of magnitude faster than SQLite for pure key-value operations.

Evaluated Mar 06, 2026 (0d ago) v3.x
Homepage ↗ Repo ↗ Databases lmdb embedded key-value node.js high-performance persistent transactions mmap
⚙ Agent Friendliness
64
/ 100
Can an agent use this?
🔒 Security
78
/ 100
Is it safe for agents?
⚡ Reliability
84
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
78
Error Messages
72
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
70
Scope Granularity
60
Dep. Hygiene
80
Secret Handling
85

Local embedded database. No network exposure. Data stored in binary format (not human-readable). Native bindings add supply chain risk — verify prebuilt binary provenance.

⚡ Reliability

Uptime/SLA
90
Version Stability
82
Breaking Changes
78
Error Recovery
88
AF Security Reliability

Best When

You need the fastest possible persistent key-value storage in Node.js with ACID transactions and memory-mapped I/O — an order of magnitude faster than SQLite for pure KV operations.

Avoid When

You need SQL queries, document search, or complex filtering — use better-sqlite3 or MongoDB for richer query capabilities.

Use Cases

  • Store and retrieve agent state, embeddings indexes, or large caches with sub-millisecond latency using memory-mapped I/O
  • Build high-throughput agent pipelines that need persistent key-value storage without a database server
  • Cache LLM API responses or pre-computed embeddings with fast ordered key iteration for range scans
  • Store agent conversation history or tool call results with ACID transaction guarantees for durability
  • Index large datasets for agent retrieval workflows where read performance is critical

Not For

  • Complex queries requiring SQL or document-style filtering — LMDB is key-value only; use SQLite or MongoDB for richer queries
  • Windows environments requiring write concurrency — LMDB has limitations on Windows with multiple write transactions
  • Applications expecting JSON/SQL query language — pure key-value API requires application-level indexing

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local library — filesystem permissions control access. No built-in authentication.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT license. Uses native bindings (node-gyp compilation required).

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Map size must be set at open time (mapSize option) and cannot shrink — set 100x expected data size; LMDB uses virtual memory mapping which is cheap on 64-bit systems
  • Native bindings require node-gyp compilation — prebuilt binaries available for common platforms but CI/CD may need build tools installed
  • LMDB has a single-writer constraint — concurrent write transactions from multiple async operations must be serialized; lmdb-js handles this automatically with transaction queuing
  • Database files (.mdb) are platform-specific — databases cannot be copied between big-endian and little-endian architectures
  • Transactions must be explicitly committed or aborted — unclosed transactions leak memory; always use the transaction() helper for automatic lifecycle management
  • getRange() returns a lazy iterator — must consume fully or call return() to release; partial iteration without cleanup causes LMDB cursor leaks

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for lmdb-js.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered