A
Aderali06/sqlite-mcp-server
A lightweight Model Context Protocol (MCP) server for inspecting and querying local SQLite databases safely.
no SECURITY.md
View on GitHub ↗Link checked 2026-11-12 · automated check blocked (HTTP 429), status unconfirmed
We have neither an install command nor a public remote endpoint from this repository, so we do not print a config. A made-up one is worse than none. How each client wires MCP up →
- Star count
- 0 ★ · Aderali06/sqlite-mcp-server · read from the GitHub search API · (checked 2026-11-13 20:00:50)
- Source
- collected from the punkpeye/awesome-mcp-servers list · type: MCP server
- Harvest history
- first seen 2026-10-23 · last seen 2026-11-14 · seen 26× · listed by 23 sources
- Score
- score 2,300 · 23 sources · mcp
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository
Aderali06/sqlite-mcp-server;first catalogued 2026-10-23;last seen 2026-11-14。There is no official certification or quality rating here — we record sources and dates only.# sqlite-mcp-server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
An open-source Model Context Protocol (MCP) server connecting LLM assistants (such as Claude Desktop and Cursor) to local SQLite databases with strict read-only security, context overflow protection, and structured AI error handling.
## 🌟 Key Features
Automated Schema Discovery: Automatically inspect table lists, object types (tables/views), row count estimates, columns, primary keys, foreign keys, and complete DDL definitions.
Strict Read-Only Query Security:
Parser-Level Validation: Rejects all mutation statements (INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, ATTACH, VACUUM, REINDEX, etc.).
Statement Chaining Prevention: Blocks execution of multiple chained statements separated by ;.
Restricted PRAGMAs: Prohibits dangerous PRAGMAs (writableschema, permissions, and configuration mutation).
Engine-Level Enforcement: SQLite connections are opened using read-only URI mode (file:path?mode=ro) with PRAGMA queryonly = ON;.
Context Overflow Protection (maxrows): Safely truncates large query results with an informative warning advising AI models to use LIMIT and OFFSET clauses.
Structured Error Handling for AI: Returns standardized JSON error envelopes (errortype, message, query, and suggestion) to allow AI models to self-correct queries without hallucinations.
Full MCP Capabilities: Exposes Tools, direct Resources (sqlite://schema, sqlite://tables), and guided Prompts (schemaanalysis, safequeryassistant).
Flexible Configuration: Set the database path via CLI argument (--db-path), environment variable (SQLITEDBPATH), or dynamically per tool invocation (dbpath).
## 🛠️ MCP Tools
| Tool Name | Description | Key Arguments |
| listtables | Lists all tables and views in the database with estimated row counts. | dbpath (optional) |
| describetable | Retrieves column definitions, data types, nullability, default values, primary keys, foreign keys, and indexes for a specific table. | tablename (required), dbpath (optional) |
| getdatabaseschema | Returns the complete DDL schema definition for all tables, views, and indexes. | dbpath (optional) |
| readquery | Safely executes a read-only SELECT or EXPLAIN query and returns structured row records. | query (required), params (optional), maxrows (optional, default: 1000), dbpath (optional) |
## 📦 MCP Resources & Prompts
### MCP Resources (Direct Context Access)
Clients that support MCP Resources can inspect the database context directly without invoking a tool:
sqlite://schema: Returns the full formatted SQL DDL schema of the database.
sqlite://tables: Returns a concise list of all tables, views, and their respective row counts.
### MCP Prompts (Interactive Assistant Guides)
schemaanalysis: Prompts the AI model to inspect database structure, relationships, normalization, and optimization opportunities.
safequeryassistant(usergoal): Guides the AI model in formulating an optimized, safe SELECT query tailored to the user's objective.
## 📋 Structured Error Format
When a syntax or validation error occurs, the server responds with a structured JSON object designed for LLM consumption:
## 🌟 Key Features
Automated Schema Discovery: Automatically inspect table lists, object types (tables/views), row count estimates, columns, primary keys, foreign keys, and complete DDL definitions.
Strict Read-Only Query Security:
Parser-Level Validation: Rejects all mutation statements (INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, ATTACH, VACUUM, REINDEX, etc.).
Statement Chaining Prevention: Blocks execution of multiple chained statements separated by ;.
Restricted PRAGMAs: Prohibits dangerous PRAGMAs (writableschema, permissions, and configuration mutation).
Engine-Level Enforcement: SQLite connections are opened using read-only URI mode (file:path?mode=ro) with PRAGMA queryonly = ON;.
Context Overflow Protection (maxrows): Safely truncates large query results with an informative warning advising AI models to use LIMIT and OFFSET clauses.
Structured Error Handling for AI: Returns standardized JSON error envelopes (errortype, message, query, and suggestion) to allow AI models to self-correct queries without hallucinations.
Full MCP Capabilities: Exposes Tools, direct Resources (sqlite://schema, sqlite://tables), and guided Prompts (schemaanalysis, safequeryassistant).
Flexible Configuration: Set the database path via CLI argument (--db-path), environment variable (SQLITEDBPATH), or dynamically per tool invocation (dbpath).
## 🛠️ MCP Tools
| Tool Name | Description | Key Arguments |
| listtables | Lists all tables and views in the database with estimated row counts. | dbpath (optional) |
| describetable | Retrieves column definitions, data types, nullability, default values, primary keys, foreign keys, and indexes for a specific table. | tablename (required), dbpath (optional) |
| getdatabaseschema | Returns the complete DDL schema definition for all tables, views, and indexes. | dbpath (optional) |
| readquery | Safely executes a read-only SELECT or EXPLAIN query and returns structured row records. | query (required), params (optional), maxrows (optional, default: 1000), dbpath (optional) |
## 📦 MCP Resources & Prompts
### MCP Resources (Direct Context Access)
Clients that support MCP Resources can inspect the database context directly without invoking a tool:
sqlite://schema: Returns the full formatted SQL DDL schema of the database.
sqlite://tables: Returns a concise list of all tables, views, and their respective row counts.
### MCP Prompts (Interactive Assistant Guides)
schemaanalysis: Prompts the AI model to inspect database structure, relationships, normalization, and optimization opportunities.
safequeryassistant(usergoal): Guides the AI model in formulating an optimized, safe SELECT query tailored to the user's objective.
## 📋 Structured Error Format
When a syntax or validation error occurs, the server responds with a structured JSON object designed for LLM consumption:
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/aderali06-sqlite-mcp-server/)
- Source
- awesome · https://github.com/Aderali06/sqlite-mcp-server
- Browse by field
- MCP servers
- Listed by
- 23 independent sources
- added
- today
- Security policy
- no
SECURITY.mdat the repository root (which does not mean it is unsafe)
More like this
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.