SQLite Server
FreeNot checkedQuery, explore, and manage SQLite databases through the Model Context Protocol. Connect any MCP-compatible AI client to your databases.
About
Query, explore, and manage SQLite databases through the Model Context Protocol. Connect any MCP-compatible AI client to your databases.
README
Query, explore, and manage SQLite databases through the Model Context Protocol. Connect any MCP-compatible AI client to your databases — Claude Desktop, Cursor, VS Code, and more.
✨ Features
- 🔍 3 Tools:
query,execute,list_tables— full database interaction - 📄 2+ Resources:
sqlite://tables(full schema),sqlite://{table}/schema(per-table) - 💬 1 Prompt:
database_analyst(question)— guided analysis workflow - 🔒 Security-First: Read-only by default, explicit
--allow-writeflag for mutations - 📊 WAL Mode: Write-Ahead Logging for better concurrent access
- 🖥️ Dual Transport: stdio (local) and Streamable HTTP (remote)
- 🎲 Sample Data: Seed script included for instant testing
🚀 Quick Start
# 1. Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 2. Create sample database
python seed_data.py --db-path /tmp/sample.db
# 3. Start server (read-only mode)
python sqlite_server.py --db-path /tmp/sample.db
🛠️ Tools
query(sql: str) -> str
Execute a SELECT query. Only SELECT and PRAGMA statements are allowed.
Example: query("SELECT name, price FROM products WHERE category = 'Electronics'")
execute(sql: str) -> str
Run INSERT, UPDATE, or DELETE. Requires --allow-write flag.
Example (with --allow-write):
execute("INSERT INTO products (name, price, category, stock) VALUES ('Webcam 4K', 129.99, 'Electronics', 50)")
list_tables() -> str
List all tables with row counts.
🔒 Security Model
| Feature | Default | With --allow-write |
|---|---|---|
| SELECT/PRAGMA queries | ✅ Allowed | ✅ Allowed |
| INSERT/UPDATE/DELETE | ❌ Blocked | ✅ Allowed |
| DROP/ALTER/CREATE | ❌ Blocked | ❌ Blocked |
| Row factory protection | ✅ Enabled | ✅ Enabled |
⚠️ Production tip: Always use read-only mode for public-facing or shared databases. Only enable
--allow-writein trusted environments.
📄 Resources
sqlite://tables
Returns complete database schema with column types, nullability, defaults, and primary keys.
sqlite://{table}/schema
Returns schema for a specific table.
💬 Prompts
database_analyst(query_question: str)
Creates a structured prompt for analyzing database data.
🔌 Connecting to Clients
Claude Desktop
{
"mcpServers": {
"sqlite": {
"command": "python",
"args": ["/ABSOLUTE/PATH/mcp-sqlite-server/sqlite_server.py", "--db-path", "/tmp/sample.db"]
}
}
}
Cursor
Settings → Features → MCP → Add Server:
- Name:
sqlite - Type:
command - Command:
python /ABSOLUTE/PATH/mcp-sqlite-server/sqlite_server.py --db-path /tmp/sample.db
📁 Project Structure
mcp-sqlite-server/
├── sqlite_server.py # Main server (FastMCP)
├── seed_data.py # Sample database creator
├── requirements.txt
├── setup.sh
├── README.md
└── .gitignore
📜 License
MIT
Installing SQLite Server
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/moaaz01/mcp-sqlite-serverFAQ
Is SQLite Server MCP free?
Yes, SQLite Server MCP is free — one-click install via Unyly at no cost.
Does SQLite Server need an API key?
No, SQLite Server runs without API keys or environment variables.
Is SQLite Server hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install SQLite Server in Claude Desktop, Claude Code or Cursor?
Open SQLite Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Postgres
Query your database in natural language
by Anthropicwenb1n-dev/SmartDB_MCP
Connect to multiple databases at once (MySQL, PostgreSQL, SQL Server, MariaDB, Dameng, Oracle) for operations, health analysis and SQL optimization.
by wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashPostgreSQL
Read-only database access with schema inspection.
by modelcontextprotocolRedis
Interact with Redis key-value stores.
by modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
by modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
by raw-labsjulien040/anyquery
Query apps with SQL from a single local-first binary; also connects to PostgreSQL, MySQL and SQLite-compatible databases.
by julien040drakonkat/wizzy-mcp-tmdb
Search and retrieve movie, TV show and person information from The Movie Database (TMDB) API.
by drakonkatlongevity-genie/opengenes-mcp
Query the OpenGenes database for aging and longevity research.
by longevity-genieCompare SQLite Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs
