
Mcp Sqlite Tools
io.github.spences10Published by GitHub account spences10v0.0.11Updated Oct 24, 2026
MCP server for local SQLite database operations
Overview
Lets an assistant open, query, modify, back up, and maintain local SQLite database files through explicit read, write, schema, and transaction tools.
- What you can do
- A local stdio MCP server for SQLite database work. It exposes separate tools for opening and closing databases, listing tables, describing schemas, running paginated read queries, executing explicit write and schema statements, bulk inserting, importing and exporting headered CSV, exporting and importing schemas as SQL or JSON, managing transactions with nested savepoints, creating online backups, and vacuuming. Read queries are restricted by SQLite's authorizer, and destructive tools are separated so clients can require approval.
- When to use it
- Use it when an assistant needs to inspect or edit a local SQLite file: exploring a dataset, running ad-hoc queries, importing CSV, applying schema changes, or taking backups. It suits desktop workflows where the database lives on the same machine and the client supports stdio servers.
- Requirements
- Node.js 24.12 or later and an MCP client with stdio support; the client starts it via npx, so no global install is needed. Optional environment variables configure the default database path, absolute path allowance, backup path, busy timeout, journal mode, and debug logging. No accounts, API keys, or network access are required.
Installation
In SourceWeft
- Open Mcp Sqlite Tools in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mcp-sqlite-tools
A Model Context Protocol (MCP) server for safe, local SQLite database operations. It gives MCP clients explicit read, write, schema, transaction, CSV, backup, and maintenance tools.
Features
- Open, create, inspect, back up, vacuum, and close SQLite databases
- List, describe, create, and drop tables
- Run paginated read queries with named or positional parameters
- Run explicit write and schema queries
- Import and export headered CSV files
- Use transactions with nested savepoints
- Export and import schemas as SQL or JSON
- Restrict database and CSV paths through configuration
- Classify destructive tools for client approval policies
- Use Node's built-in SQLite driver with no native addon dependency
Requirements
- Node.js 24.12 or later
- An MCP client with stdio server support
Configure your MCP client
The MCP client starts this server through npx; a global installation
is not required.
Install with MCPick
MCPick can add the server to a supported client without manual JSON editing. This command targets Claude Code's local scope by default:
Select a client and scope explicitly when needed:
The add command supports Claude Code, Gemini CLI, VS Code, Cursor,
Windsurf, OpenCode, and Pi. Run npx mcpick clients to see current
client capabilities, scopes, and configuration locations.
The examples track the latest package release. For reproducible
configuration, replace mcp-sqlite-tools in --args with an exact
version such as [email protected].
Manual configuration
For unsupported clients or advanced configuration, add the server manually:
VS Code uses a servers object instead of mcpServers. See the
configuration guide
for more client-specific examples.
Environment variables
When SQLITE_ALLOW_ABSOLUTE_PATHS=false, relative and absolute paths
must resolve inside SQLITE_DEFAULT_PATH. Symbolic links cannot be
used to escape that directory.
Use SQLITE_JOURNAL_MODE=delete for databases in file-synchronized
directories. The unsafe SQLite modes memory and off are not
accepted.
SQLITE_MAX_QUERY_TIME remains available as a deprecated alias for
SQLITE_BUSY_TIMEOUT. It does not limit wall-clock query runtime.
Tools
Tools are separated by intent so MCP clients can apply clear approval rules.
Safe and read-only
Writes, schema, and maintenance
See the complete API reference for parameters, responses, examples, pagination, and CSV options.
Safety model
The server does not treat every SQL string as equivalent:
execute_read_queryuses SQLite's authorizer API to reject writes, schema changes, unsafe PRAGMAs, attachment, and multiple statements.- Write, schema, transaction, and destructive administration actions use separate tools so clients can request approval.
- Database and CSV paths are resolved and validated before access.
- Identifiers generated by tools are quoted.
- Values are bound as parameters rather than interpolated into SQL.
- Backups use SQLite's online backup API and include committed WAL data.
A client can allow read-only tools and require approval for destructive tools. Always review SQL and file paths before approving changes. Back up important databases before schema changes, imports, or large writes.
Why native SQLite?
Using node:sqlite removes the native addon, its install script, and
its platform-specific binaries. A clean production install fell from
31.3 MB with better-sqlite3 to 3.6 MB with native SQLite, an 88.5%
reduction. The npm tarball itself is similar in size: 63.1 KB native
versus 60.0 KB published. The large saving is in the installed
dependency tree.
The migration also removes better-sqlite3 and its type package. It
makes installation independent of prebuilt addon availability or a
working native compiler.
Driver benchmark
Lower times are better. These medians use 20,000 rows, two warmups, and seven measured runs per driver. Each sample uses a new database and the driver order alternates. Setup is outside the measured region except for the insert workload.
Measured on Linux x64 with Node.js 24.15.0 and an AMD Ryzen AI 9
HX 370. Node used SQLite 3.51.3; [email protected] used SQLite
3.53.3. These microbenchmarks show driver trade-offs, not complete MCP
performance. MCP transport and validation costs are not included.
Development
See development and architecture for module responsibilities and other development commands.
Documentation
Contributing
Issues and pull requests are welcome.
License
MIT License. See LICENSE.
Source: README.md at commit 104e092
Tools
0Version history
1- v0.0.11LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts