This server has been deprecated in favor of db-mcp, a TypeScript rewrite that expands the tool count from 73 to 125+ and supports modern MCP protocols. The original Python version provided SQLite operations for JSONB manipulation, full-text search, geospatial queries, and analytics over stdio transport. If you're looking for SQLite connectivity, grab the new version via npx @anthropic-ai/db-mcp instead. It adds SSE and HTTP transports alongside stdio, ships with updated MCP SDK support, and is actively maintained. The archived version here stops at v2.6.5 with no further updates planned.
Public 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 paramsExecute 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.
sqlstringparamsarraysqlite_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 paramsExecute 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.
sqlstringparamsarraysqlite_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 paramsExecute 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 paramsList 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 paramsGet 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 paramsList 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 paramsList 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 paramsCreate 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.
tablestringcolumnsarrayifNotExistsbooleansqlite_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 paramsAlter an existing table — add a new column, rename a column, or rename the table. SQLite does not support dropping columns via ALTER TABLE.
typestringtablestringactionstringadd_column · rename_column · rename_tablecolumnstringdefaultvaluenewNamestringnotNullbooleanoldNamestringnewTableNamestringsqlite_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 paramsDrop (delete) a table and all its data permanently. This action is irreversible. Use ifExists to avoid errors if the table does not exist.
tablestringifExistsbooleansqlite_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 paramsCreate 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.
tablestringuniquebooleancolumnsarrayindexNamestringifNotExistsbooleansqlite_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 paramsDrop (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 paramsGet 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 paramsOptimize 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 paramsRun 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.
_fieldsstring[!CAUTION] This repository has been deprecated and is no longer maintained.
Please use the new TypeScript version: db-mcp
The db-mcp server is a complete rewrite in TypeScript with significant improvements:
| Feature | sqlite-mcp-server (deprecated) | db-mcp (new) |
|---|---|---|
| Language | Python | TypeScript |
| Tools | 73 | 125+ |
| MCP SDK | 1.14.x | 1.25+ (Modern) |
| Protocol | MCP 2024-11-05 | MCP 2025-11-25 |
| Transport | stdio | stdio, SSE, HTTP |
| Docker | Available | Available |
| NPM | N/A | @anthropic-ai/db-mcp |
NPM (Recommended):
npx @anthropic-ai/db-mcp
Docker:
docker pull writenotenow/db-mcp:latest
GitHub:
git clone https://github.com/neverinfamous/db-mcp.git
This repository is archived for historical reference. No further updates, bug fixes, or security patches will be provided.
Last version: v2.6.5
Thank you to all contributors who helped build this project. Your work lives on in db-mcp!
hovecapital/read-only-local-postgres-mcp-server
cocaxcode/database-mcp
io.github.infoinlet-marketplace/mcp-mysql
io.github.cybeleri/database-admin
io.github.yash-0620/postgres-mcp-secured