MCP SQLite Server
Provides tools to query, execute SQL statements, and list tables in an SQLite database.
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., "@MCP SQLite Servershow all products with price > 100"
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.
๐๏ธ MCP SQLite Server
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
Related MCP server: SQLite MCP Server
๐ 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 |
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:
sqliteType:
commandCommand:
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
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
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 Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view detโฆ
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.7MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to connect to and query an SQLite database through the Model Context Protocol, allowing natural language interaction with database tables and data.-
- FlicenseNot gradedqualityDmaintenanceMCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.-
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/moaaz01/mcp-sqlite-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server