sqlite
general-purpose MCP server for SQLite databases
claude mcp add --transport stdio enesmanan-sqlite-mcp-server python sqlite_mcp.py \ --env DATABASE_DIR="path to your database folder (default: ./database)" \ --env PYTHONUNBUFFERED="1"
How to use
This MCP server provides a generalized interface to one or more SQLite databases stored in the database folder. It exposes a set of tools that let you discover available databases, inspect schemas, and perform read and write operations with safety checks such as parameterized queries and required WHERE clauses for destructive actions. You can connect to the server from Claude Desktop or other MCP clients and execute commands like listing databases, querying data, and performing inserts, updates, and deletes in a controlled manner. The server supports multiple databases, so you can switch between them as needed without restarting the service.
How to install
Prerequisites:
- Python 3.10 or higher
- pip (Python package manager)
Setup steps:
-
Clone or download this repository
-
Install dependencies:
pip install -r requirements.txt
- Add your databases:
- Place your SQLite .db files in the database/ folder
- The server will work with any .db file you add to this folder
- You can add multiple databases and switch between them
- Run the server locally to test:
python sqlite_mcp.py
- (Optional) Integrate with Claude Desktop or other MCP clients by configuring the mcpServers entry as shown in the mcp_config section.
Additional notes
Tips and notes:
- The server uses parameterized queries to prevent SQL injection.
- Write operations require explicit WHERE clauses to prevent accidental mass updates/deletes.
- Query results are limited to 1000 rows by default for safety.
- You can manage multiple databases by placing multiple .db files in the database/ folder and selecting the target database in your queries.
- If you modify configuration or add new databases, restart Claude Desktop or the MCP client to pick up changes.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP