Get the FREE Ultimate OpenClaw Setup Guide →

sqlite

general-purpose MCP server for SQLite databases

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone or download this repository

  2. Install dependencies:

pip install -r requirements.txt
  1. 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
  1. Run the server locally to test:
python sqlite_mcp.py
  1. (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

Sponsor this space

Reach thousands of developers