node-sqlite-mcp
Lets AI agents query local SQLite database files read-only using Node's built-in sqlite module, providing tools for listing tables, describing schemas, and running SQL queries.
README
node-sqlite-mcp
An MCP server that lets an AI agent query SQLite database files on the local machine.
It uses Node's built-in node:sqlite
module, so there is no native module to compile and no system SQLite to
install — the only thing you need on the host is a recent Node.
Requirements
- Node.js 22.16 or newer (which ships
node:sqliteunflagged). Node 24+ is recommended.
Check with node --version.
Install
The server is published to npm and is installed into your agent with
add-mcp:
npx add-mcp node-sqlite-mcp
add-mcp detects your installed agents (Claude Code, Claude Desktop, Cursor,
VS Code, …) and registers the server as a local stdio command. Nothing is
cloned or installed globally — the command is fetched and run on demand.
You can also run it directly to sanity-check it:
npx -y node-sqlite-mcp
It speaks MCP over stdio and waits for a client; there is nothing interactive to see.
Tools
Every tool takes the database as an argument — path should be an absolute
path to a .db / .sqlite file. The database is always opened read-only.
| Tool | Arguments | Returns |
|---|---|---|
list_tables |
path |
The tables and views in the database. |
describe_table |
path, table |
Columns, types, a boolean not-null flag, defaults and a boolean primary-key flag for one table or view. |
query |
path, sql |
The rows returned by a single read-only SQL statement. |
Output format
Results come back as TSV: a tab-separated header row of column names, one line per row, then a blank line and a row count. This is used instead of JSON because it does not repeat column names on every row, keeping the payload small.
NULLis rendered as an empty field.- Tabs, carriage returns, newlines and backslashes inside values are escaped
(
\t,\r,\n,\\). Other control characters are escaped as\xNN(e.g. NUL as\x00). - BLOBs are rendered as a SQLite hex literal, e.g.
x'deadbeef'. - The
describe_tablenot_nullandprimary_keycolumns are booleans (true/false).
Read-only
The SQLite connection is opened read-only, so INSERT / UPDATE / DELETE
and schema changes fail at the engine level — not merely by convention. The
query tool runs a single statement per call and does not truncate
results, so a broad SELECT * on a large table can return a very large payload;
the tool description tells the agent to add a LIMIT and select only needed
columns.
Security note
This is a local, trust-the-user tool. It will open any SQLite file the operating-system user running the server can already read — there is no allowlist or directory confinement.
Development
npm install # installs deps and builds via the "prepare" script
npm run build # compile TypeScript to dist/
Source is TypeScript in src/; the published package ships compiled JavaScript
in dist/ (the bin entry point). Consumers never run a build step.
Releases & publishing
Releases are automated with Release Please, driven by Conventional Commits:
- Every push to
mainopens or updates a standing release PR that bumps the version inpackage.json/package-lock.jsonand updatesCHANGELOG.md, derived from the commits since the last release (fix:→ patch,feat:→ minor, a!orBREAKING CHANGE:→ major). - Merging that release PR tags the version, creates a GitHub Release, and
triggers
npm publish(on-push-main.yml→workflow-call.release.yml).
So the normal flow is: land Conventional-Commit PRs on main, then merge the
release PR when you want to cut a version — no manual tag or npm publish.
Publishing requires an NPM_TOKEN repository secret: an npm automation token
with publish rights to the node-sqlite-mcp package.
To publish by hand instead (unscoped packages publish publicly by default):
npm publish
Commit messages
This repo uses Conventional Commits.
Because PRs are merged (not squashed), every commit lands on main verbatim and
is what Release Please parses — so each commit in a PR is linted against the
convention (on-pr.yml → workflow-call.lint-pr.yml, config in
.commitlintrc.json). Common types: feat:, fix:, docs:, chore:,
refactor:, test:, ci:. A feat!: prefix or a BREAKING CHANGE: footer
marks a breaking change.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.