SQLite Tools

v0.0.11Databasesstable

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

mcpsqlite
Share:
15
Stars
0
Downloads
0
Weekly
0/5

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

Interact with SQLite databases safely
Support complex transactions and queries
spences10

Maintainer

LicenseMIT
Languagetypescript
Versionv0.0.11
UpdatedMay 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-sqlite-tools

Manual Installation

npx -y mcp-sqlite-tools

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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-tools
2

Optional: install globally

For repeated use, install the package globally via npm.

npm install -g mcp-sqlite-tools
3

Configure 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/backups
4

Configure 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"
      }
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-sqlite-tools": { "command": "npx", "args": ["-y", "mcp-sqlite-tools"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides