Registry / database / easy-sqlite-mcp

easy-sqlite-mcp

JSON →
library1.0.5jsnpmunverified

An MCP server for LLMs to interact with SQLite databases, built with Node.js and TypeScript. Current stable version is 1.0.5. Supports two modes: Manual (agent must call sqlite_open/sqlite_close) and Fixed (single database path via SQLITE_PATH environment variable). Provides tools for querying, executing writes, listing tables, and describing schemas. Uses better-sqlite3 under the hood and ships TypeScript definitions. Released as an npm package that can be run directly via npx. Does not support multiple simultaneous databases in Manual mode.

npm install easy-sqlite-mcp
INSTALL
IMPORT
SIG · EASY-SQLITE-MCP
E
easy-sqlite-mcp
databasejavascriptv1.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MCP server (CLI)
npx easy-sqlite-mcp
Running as a library import (e.g., import { something } from 'easy-sqlite-mcp') is not intended; use MCP client configuration.
This package is primarily used as a CLI tool via npx or direct npm execution. Not a library to import in code.
MCP server configuration (Claude Desktop)
Add to Claude Desktop's mcpServers config: command: 'npx', args: ['-y', 'easy-sqlite-mcp']
Using 'npm start' or 'node index.js' as the command.
Always use npx -y to auto-install and run. Ensure Node >=18.
MCP server configuration (Fixed mode)
Set env.SQLITE_PATH to absolute path.
Providing relative paths or not setting SQLITE_PATH when expecting fixed mode.
In Fixed mode, sqlite_open/sqlite_close are not available. Manual mode is default if SQLITE_PATH is missing.

Manual mode workflow: start server, open database, execute query, close connection.

// Quickstart: Run in Manual mode, then use MCP client (e.g., Claude) to interact. // 1. Start the MCP server: // npx easy-sqlite-mcp // // 2. From your MCP client, call tools sequentially: // - sqlite_open({ path: '/absolute/path/to/your/database.sqlite' }) // - sqlite_query({ sql: 'SELECT * FROM users LIMIT 5' }) // - sqlite_close({}) // Note: Only one database connection at a time. Always close before opening another.
Debug
Known issues
gotchaIn Manual mode, only one database file can be open at a time. Opening another file closes the previous connection.
fix
Design your workflow to open, use, and close databases sequentially. Or use Fixed mode if you only need one database.
affects: >=1.0.0
gotchaFixed mode is only active if SQLITE_PATH environment variable is set at server startup. Otherwise, the server starts in Manual mode and cannot be switched.
fix
Always set SQLITE_PATH as an environment variable when starting the server (e.g., SQLITE_PATH=/data/db.sqlite npx easy-sqlite-mcp).
affects: >=1.0.0
gotchaThe sqlite_query tool is read-only; it will reject INSERT/UPDATE/DELETE statements. Use sqlite_execute for writes.
fix
Use sqlite_query for SELECT only. For modifications, call sqlite_execute.
affects: >=1.0.0
breakingNode.js version must be >=18. Older versions are unsupported.
fix
Upgrade Node.js to version 18 or higher.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'easy-sqlite-mcp'
Running without npx -y or without installing the package globally.
fix
Use npx easy-sqlite-mcp (with -y flag to auto-install) or install globally with npm i -g easy-sqlite-mcp.
Error: SQLITE_PATH is not set, but mode is Fixed
Assuming Fixed mode without setting the environment variable.
fix
Set SQLITE_PATH environment variable or understand that server starts in Manual mode. To force Fixed mode: SQLITE_PATH=/path/to/db.sqlite npx easy-sqlite-mcp
TypeError: sqlite_open is not a function
Calling sqlite_open in Fixed mode (tool not available).
fix
Remove sqlite_open calls; use Fixed mode tools starting with sqlite_status. Or switch to Manual mode by omitting SQLITE_PATH.
Error: Connection already closed
Trying to query after calling sqlite_close, or server restarted in manual mode.
fix
Ensure sqlite_open is called before sqlite_query/sqlite_execute. Monitor connection status via sqlite_status.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
easy-sqlite-mcp — npm install easy-sqlite-mcp · libregistry