sqlite-mcp
Exposes SQLite databases to AI agents, enabling the execution of SQL statements, schema inspection, and retrieval of table metadata including columns, indexes, and foreign keys.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sqlite-mcpShow me the schema and row count for the users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
sqlite-mcp
An MCP (Model Context Protocol) server that exposes SQLite databases as tools for AI agents. Connect any SQLite database and let LLMs query schemas, run SQL, and inspect tables through a standardized interface.
Features
execute_sql— Run arbitrary SQL statements with support for dry-run mode (EXPLAIN QUERY PLAN), automatic result truncation, and configurable row limits.get_table_info— Retrieve complete table metadata in a single call: columns, types, DDL, indexes, foreign keys, and row count.Read-only mode — Optionally block all write operations for safe, production-friendly access.
Query timeout — Configurable per-query timeout to prevent runaway queries.
Related MCP server: SQLite MCP Server
Requirements
Python 3.11+
uv (recommended) or pip
Installation
# Clone the repository
git clone https://github.com/<owner>/sqlite-mcp.git
cd sqlite-mcp
# Install with uv
uv syncOr with pip:
pip install .Usage
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Path to the SQLite database file |
| No |
| Set to |
| No |
| Query timeout in seconds |
Running the Server
SQLITE_DB_PATH=./my_database.db sqlite-mcpThe server communicates over stdio and is designed to be launched by an MCP-compatible client (e.g., Cursor, Claude Desktop).
MCP Client Configuration
Add the server to your MCP client config (e.g., .cursor/mcp.json):
{
"mcpServers": {
"sqlite": {
"command": "uv",
"args": ["run", "--directory", "/path/to/sqlite-mcp", "sqlite-mcp"],
"env": {
"SQLITE_DB_PATH": "/path/to/database.db",
"SQLITE_READ_ONLY": "true"
}
}
}
}Tools
execute_sql
Execute a SQL statement against the connected database.
Parameter | Type | Default | Description |
|
| — | The SQL statement to execute |
|
|
| Return the query plan instead of executing |
|
|
| Maximum rows to return |
Example response (SELECT):
{
"results": [{"id": 1, "name": "Alice"}],
"row_count": 1,
"truncated": false
}Example response (dry run):
{
"query_plan": [{"id": 0, "parent": 0, "detail": "SCAN users"}]
}get_table_info
Get complete schema and metadata for a table.
Parameter | Type | Description |
|
| The table name to inspect |
Example response:
{
"table": "users",
"columns": [
{"name": "id", "type": "INTEGER", "nullable": false, "default": null, "primary_key": true},
{"name": "name", "type": "TEXT", "nullable": true, "default": null, "primary_key": false}
],
"ddl": "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)",
"indexes": [],
"foreign_keys": [],
"row_count": 42
}License
This project is licensed under the MIT License. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityFmaintenanceAn MCP server that provides safe, read-only access to SQLite databases through MCP. This server is built with the FastMCP framework, which enables LLMs to explore and query SQLite databases with built-in safety features and query validation.Last updated107
- AlicenseAqualityDmaintenanceA zero-config MCP server that enables AI to access, analyze, and manage local SQLite databases with secure read-only querying and automatic schema discovery.Last updated8MIT
- Flicense-qualityDmaintenanceMCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.Last updated
- Alicense-qualityCmaintenanceA read-only MCP server that enables LLMs to safely explore and query any SQLite database via natural language. It exposes tools for listing tables, describing schemas, and executing SELECT/WITH queries with built-in safety guards like write prevention and row limits.Last updatedMIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/eduresser/sqlite-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server