
Sqlite
A TypeScript reimplementation of SQLite database access for MCP clients, since the official reference server is Python only. Exposes five tools: query (SELECT, PRAGMA, EXPLAIN, WITH), schema (all tables with columns and types), table_info (single table details), explain (query plan analysis), and list_databases (find .db files in a directory). Opens databases read-only by default so you can explore safely, but supports an opt-in write mode for mutations. Built for Node.js environments where you want Claude to inspect local SQLite files, run analytical queries, or help optimize slow statements. Works with Claude Desktop, Cursor, and VS Code through npx, no authentication needed since it's all local filesystem access.
- GitHub stars
- 2
- tools
- 15
- transport
- STDIO
- last updated
- Mar 10, 2026
Tools
15 toolsPublic tool metadata for what this MCP can expose to an agent.
sqlite_queryExecute a SELECT query on the SQLite database and return rows as a JSON array. Use this for reading data — supports any valid SELECT statement with optional parameter binding for safe queries.2 params
Execute a SELECT query on the SQLite database and return rows as a JSON array. Use this for reading data — supports any valid SELECT statement with optional parameter binding for safe queries.
paramsarraysqlstringsqlite_executeExecute a write statement (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP) on the SQLite database. Returns the number of rows changed and the last inserted row ID. Use parameter binding for safe writes.2 params
Execute a write statement (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP) on the SQLite database. Returns the number of rows changed and the last inserted row ID. Use parameter binding for safe writes.
paramsarraysqlstringsqlite_run_scriptExecute multiple SQL statements in a single transaction. All statements succeed or all fail (atomic). Separate statements with semicolons. Use for migrations, seed data, or batch operations.1 params
Execute multiple SQL statements in a single transaction. All statements succeed or all fail (atomic). Separate statements with semicolons. Use for migrations, seed data, or batch operations.
sqlstringsqlite_list_tablesList all tables and views in the database with their row counts. Use this as the first step to explore an unfamiliar database. Returns table name, type (table or view), and row count.1 params
List all tables and views in the database with their row counts. Use this as the first step to explore an unfamiliar database. Returns table name, type (table or view), and row count.
_fieldsstringsqlite_describe_tableGet the column schema of a table — column names, data types, NOT NULL constraints, default values, and primary key flags. Also returns the CREATE TABLE SQL statement.1 params
Get the column schema of a table — column names, data types, NOT NULL constraints, default values, and primary key flags. Also returns the CREATE TABLE SQL statement.
tablestringsqlite_list_indexesList all indexes on a table — index name, uniqueness, origin (manual or auto-created), and whether it is a partial index.1 params
List all indexes on a table — index name, uniqueness, origin (manual or auto-created), and whether it is a partial index.
tablestringsqlite_list_foreign_keysList foreign key constraints on a table — referenced table, local and remote columns, ON UPDATE and ON DELETE actions.1 params
List foreign key constraints on a table — referenced table, local and remote columns, ON UPDATE and ON DELETE actions.
tablestringsqlite_create_tableCreate a new table with column definitions. Each column has a name, type, and optional constraints (PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT). Use ifNotExists to skip if the table already exists.3 params
Create a new table with column definitions. Each column has a name, type, and optional constraints (PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT). Use ifNotExists to skip if the table already exists.
columnsarrayifNotExistsbooleantablestringsqlite_alter_tableAlter an existing table — add a new column, rename a column, or rename the table. SQLite does not support dropping columns via ALTER TABLE.9 params
Alter an existing table — add a new column, rename a column, or rename the table. SQLite does not support dropping columns via ALTER TABLE.
actionstringadd_column · rename_column · rename_tablecolumnstringdefaultvaluenewNamestringnewTableNamestringnotNullbooleanoldNamestringtablestringtypestringsqlite_drop_tableDrop (delete) a table and all its data permanently. This action is irreversible. Use ifExists to avoid errors if the table does not exist.2 params
Drop (delete) a table and all its data permanently. This action is irreversible. Use ifExists to avoid errors if the table does not exist.
ifExistsbooleantablestringsqlite_create_indexCreate an index on one or more columns to speed up queries. Optionally create a UNIQUE index to enforce uniqueness. Index name is auto-generated if not provided.5 params
Create an index on one or more columns to speed up queries. Optionally create a UNIQUE index to enforce uniqueness. Index name is auto-generated if not provided.
columnsarrayifNotExistsbooleanindexNamestringtablestringuniquebooleansqlite_drop_indexDrop (delete) an index by name. Does not affect the table data, only removes the index. Use ifExists to avoid errors if the index does not exist.2 params
Drop (delete) an index by name. Does not affect the table data, only removes the index. Use ifExists to avoid errors if the index does not exist.
ifExistsbooleanindexNamestringsqlite_get_infoGet database metadata — file path, file size, table count, page count, page size, journal mode, WAL status, encoding, and SQLite version. Use this to understand the database state.1 params
Get database metadata — file path, file size, table count, page count, page size, journal mode, WAL status, encoding, and SQLite version. Use this to understand the database state.
_fieldsstringsqlite_vacuumOptimize and compact the database file by rebuilding it. Reclaims space from deleted rows and defragments the file. Returns file size before and after. May take time on large databases.1 params
Optimize and compact the database file by rebuilding it. Reclaims space from deleted rows and defragments the file. Returns file size before and after. May take time on large databases.
_fieldsstringsqlite_integrity_checkRun PRAGMA integrity_check to verify the database is not corrupted. Returns "ok" if the database is healthy, or a list of issues found. Use after crashes or suspicious behavior.1 params
Run PRAGMA integrity_check to verify the database is not corrupted. Returns "ok" if the database is healthy, or a list of issues found. Use after crashes or suspicious behavior.
_fieldsstringSponsors
Readme
mcp-server-sqlite
Query SQLite databases, inspect schemas, and explain queries from your AI assistant. Read-only by default for safety.
npx mcp-sqlite-server
Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP client. Reads local
.dbfiles, no auth needed.
MCP server for querying SQLite databases and inspecting schemas
Demo built with remotion-readme-kit
Why
Details
- Repository
- github.com/ofershap/mcp-server-sqlite
- Categories
- Databases, Data & Analytics
- Package
mcp-sqlite-server- Transport
- STDIO
- Registry
- MCP registry, active