SQLite Tools
A Model Context Protocol (MCP) server that provides comprehensive SQLite database operations for LLMs. This server enables AI assistants to interact with local SQLite databases safely and efficiently, with built-in security features, advanced transac
What is SQLite Tools?
SQLite Tools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that provides comprehensive sqlite database operations for llms. this server enables ai assistants to interact with local sqlite databases safely and efficiently, w...
A Model Context Protocol (MCP) server that provides comprehensive SQLite database operations for LLMs. This server enables AI assistants to interact with local SQLite databases safely and efficiently, with built-in security features, advanced transac
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol (MCP) server that provides comprehe
Use Cases
Maintainer
Works with
Installation
NPM
npx -y mcp-sqlite-toolsManual Installation
npx -y mcp-sqlite-toolsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use SQLite Tools
mcp-sqlite-tools is a TypeScript/Node.js MCP server providing comprehensive SQLite database operations for AI assistants, with built-in security safeguards that separate read-only queries, write operations, schema changes, and transaction control into distinct tool categories. It supports 20+ tools including parameterized queries, bulk inserts, CSV import/export, database backups, connection pooling, and automatic stale-transaction cleanup—all with path validation to prevent directory traversal attacks. Developers who need AI assistants to safely inspect, query, and modify local SQLite databases without risking unintended destructive operations will find this server's approval-tier design especially useful.
Prerequisites
- Node.js 18 or higher installed
- An MCP-capable client such as Claude Desktop, Claude Code, or VS Code with MCP support
- One or more SQLite database files on your local filesystem
- npx available (included with Node.js)
Install via npx (no global install needed)
Run mcp-sqlite-tools directly with npx. This is the recommended approach for MCP client configuration.
npx -y mcp-sqlite-toolsOptional: install globally
For repeated use, install the package globally via npm.
npm install -g mcp-sqlite-toolsConfigure environment variables
Set environment variables to control the default database directory, path restrictions, and connection timeout. These can be set in the MCP client config or your shell profile.
export SQLITE_DEFAULT_PATH=/path/to/your/databases
export SQLITE_ALLOW_ABSOLUTE_PATHS=true
export SQLITE_BUSY_TIMEOUT=30000
export SQLITE_BACKUP_PATH=/path/to/backupsConfigure Claude Desktop
Add the server to your Claude Desktop configuration file. The server launches automatically when Claude needs to access SQLite.
{
"mcpServers": {
"sqlite-tools": {
"command": "npx",
"args": ["-y", "mcp-sqlite-tools"],
"env": {
"SQLITE_DEFAULT_PATH": "/path/to/your/databases",
"SQLITE_ALLOW_ABSOLUTE_PATHS": "true"
}
}
}
}Configure VS Code workspace (optional)
For project-scoped database access in VS Code, create a .vscode/mcp.json file that scopes the default path to the workspace.
{
"servers": {
"sqlite-tools": {
"command": "npx",
"args": ["-y", "mcp-sqlite-tools"],
"env": {
"SQLITE_DEFAULT_PATH": "${workspaceFolder}/databases"
}
}
}
}SQLite Tools Examples
Client configuration
Configure Claude Desktop to use mcp-sqlite-tools with a specific database directory and backup path.
{
"mcpServers": {
"sqlite-tools": {
"command": "npx",
"args": ["-y", "mcp-sqlite-tools"],
"env": {
"SQLITE_DEFAULT_PATH": "/Users/yourname/databases",
"SQLITE_ALLOW_ABSOLUTE_PATHS": "true",
"SQLITE_BUSY_TIMEOUT": "30000",
"SQLITE_BACKUP_PATH": "/Users/yourname/db-backups"
}
}
}
}Prompts to try
Use these prompts in Claude to interact with your SQLite databases safely.
- "List all tables in my database at /Users/me/app.db"
- "Show me the schema for the 'users' table"
- "Run a SELECT query to find all orders placed in the last 30 days"
- "Import the CSV file /tmp/products.csv into a new 'products' table"
- "Back up my database before making schema changes"
- "Begin a transaction, insert 500 records in bulk, then commit"Troubleshooting SQLite Tools
Database is locked or SQLITE_BUSY error
Increase SQLITE_BUSY_TIMEOUT (default 30000ms) to give more time for lock release. Ensure no other process has an exclusive write lock on the database. Use the rollback_transaction tool if a previous transaction was left open.
Path validation error: absolute path not allowed
Set SQLITE_ALLOW_ABSOLUTE_PATHS=true in the server environment configuration. By default the server restricts paths to relative references within SQLITE_DEFAULT_PATH for security.
Destructive operations (DROP, DELETE) execute without confirmation
Configure your MCP client's tool approval policy to require explicit user confirmation for write and schema tools. The server separates tools into read, write, schema, and transaction categories specifically to support per-category approval rules.
Frequently Asked Questions about SQLite Tools
What is SQLite Tools?
SQLite Tools is a Model Context Protocol (MCP) server that model context protocol (mcp) server that provides comprehensive sqlite database operations for llms. this server enables ai assistants to interact with local sqlite databases safely and efficiently, with built-in security features, advanced transac It connects AI assistants to external tools and data sources through a standardized interface.
How do I install SQLite Tools?
Install via npm with the command: npx -y mcp-sqlite-tools. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with SQLite Tools?
SQLite Tools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is SQLite Tools free to use?
Yes, SQLite Tools is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
SQLite Tools Alternatives — Similar Databases Servers
Looking for alternatives to SQLite Tools? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up SQLite Tools in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use SQLite Tools?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.