Registry / database / mcp-sqlite-server

mcp-sqlite-server

JSON →
library1.0.1jsnpmunverified

MCP server for SQLite databases. Connects to local SQLite files (read-only by default) and provides query, schema inspection, EXPLAIN, and list-databases tools via the Model Context Protocol. v1.0.1, actively maintained. Differentiators: TypeScript-native + zero-config npx execution (no Python required unlike the official reference server). Works in Claude Desktop, Cursor, VS Code Copilot, and any MCP client. Supports safety mode (readonly=true) and opt-in write mode.

npm install mcp-sqlite-server
INSTALL
IMPORT
SIG · MCP-SQLITE-SERVER
M
mcp-sqlite-server
databasejavascriptv1.0.1
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 (via npx)
npx mcp-sqlite-server
The package is a CLI tool; there is no programmatic JavaScript import. Use npx to run the server.
Configuration (Cursor)
Add to .cursor/mcp.json: {"mcpServers":{"sqlite":{"command":"npx","args":["mcp-sqlite-server"]}}}
Configuration is JSON-based; no JS import.
Configuration (Claude Desktop)
Add to claude_desktop_config.json: {"mcpServers":{"sqlite":{"command":"npx","args":["mcp-sqlite-server"]}}}
Config file path: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS.

Shows how to start the MCP server via npx and interact with its tools (list_databases, query) from any MCP client.

# Run the server (read-only by default). Specify --path to a .db file or directory. npx mcp-sqlite-server --path ./mydatabase.db # Example: list databases in current directory (tool from MCP client) # Client sends: list_databases # Server responds with: ["mydatabase.db", "other_data.sqlite"] # Example: query a table (from client) # query: "SELECT * FROM users LIMIT 5" # Server responds with table rows. # To enable write operations, pass readonly=false in tool arguments. # Security: server restricts SQL to SELECT, PRAGMA, EXPLAIN, WITH in readonly mode.
Debug
Known issues
gotchaRead-only mode is default; attempting INSERT/UPDATE/DELETE/DDL will fail with error unless readonly=false is explicitly set in tool args.
fix
Set "readonly": false in the tool call arguments or configure the server with --readonly=false startup flag.
affects: >=1.0.0
gotchaThe server does not auto-detect .db files; you must specify a path (file or directory) via --path or the tool will fail.
fix
Use --path <path-to-db-or-directory> when starting the server.
affects: >=1.0.0
breakingThe package name changed from mcp-server-sqlite to mcp-sqlite-server between versions. Existing configurations using the old name may break.
fix
Update your MCP client configuration to use the command: npx mcp-sqlite-server (the new package name).
affects: >0.x
Errors
Common errors & fixes
Error: No path provided. Use --path to specify a database file or directory
Server requires a path argument to know which database to serve.
fix
Start the server with: npx mcp-sqlite-server --path ./my.db
Error: Read-only mode: Only SELECT, PRAGMA, EXPLAIN, and WITH statements are allowed.
Server is in readonly mode and rejected an INSERT/UPDATE/DELETE operation.
fix
Set readonly=false in the tool's arguments to allow write operations.
Error: Database not found: path/to/db
The specified file does not exist or is not a valid SQLite database.
fix
Verify the path and ensure the file exists. Use list_databases tool to discover files.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
mcp-sqlite-server — npm install mcp-sqlite-server · libregistry