{"_id":"@berthojoris/mcp-sqlite-server","_rev":"4-1b712b680fb5c83493d7df218558abd4","name":"@berthojoris/mcp-sqlite-server","dist-tags":{"latest":"1.4.1"},"versions":{"1.1.1":{"name":"@berthojoris/mcp-sqlite-server","version":"1.1.1","keywords":["mcp","model-context-protocol","sqlite","ai","agent","database","security","typescript"],"author":{"name":"Bertho Joris"},"license":"MIT","_id":"@berthojoris/mcp-sqlite-server@1.1.1","maintainers":[{"name":"berthojoris","email":"berthojoris@gmail.com"}],"homepage":"https://github.com/berthojoris/mcp-sqlite-server#readme","bugs":{"url":"https://github.com/berthojoris/mcp-sqlite-server/issues"},"bin":{"mcp-sqlite-server":"bin/mcp-sqlite-server.js"},"dist":{"shasum":"2bdfd6e89174ec56ee2a2bc56af635ed5c164da1","tarball":"https://registry.npmjs.org/@berthojoris/mcp-sqlite-server/-/mcp-sqlite-server-1.1.1.tgz","fileCount":35,"integrity":"sha512-wuGO55n0E/ls+OQgQn0adDyhUJUWjJNrQZtAuowROFThjlhoSTGJw/77gMlyY3gKFE2c6/pj7U4n7YWO+ApSXw==","signatures":[{"sig":"MEUCIQCyITOsfxk5sqr9LzFDcZTAetbdpS4Fllpm0iaCO5bg1wIgZJNttUf5B0AFsJR63E+o1MqCNjFshP6hQUWTJfbf42Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":242099},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"de76016b5779c8191ed650c0905a5305ca29f512","scripts":{"dev":"tsx src/cli.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","check":"tsc --noEmit","start":"node dist/cli.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"berthojoris","email":"berthojoris@gmail.com"},"repository":{"url":"git+https://github.com/berthojoris/mcp-sqlite-server.git","type":"git"},"_npmVersion":"11.6.2","description":"A secure SQLite MCP (Model Context Protocol) server for AI agents with granular permissions and comprehensive security features","directories":{},"_nodeVersion":"22.20.0","dependencies":{"joi":"^17.11.0","winston":"^3.11.0","commander":"^11.1.0","better-sqlite3":"^12.4.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","jest":"^29.5.0","eslint":"^8.57.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/better-sqlite3":"^7.6.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sqlite-server_1.1.1_1761382619901_0.04162817862617629","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@berthojoris/mcp-sqlite-server","version":"1.3.0","keywords":["mcp","model-context-protocol","sqlite","ai","agent","database","security","typescript"],"author":{"name":"Bertho Joris"},"license":"MIT","_id":"@berthojoris/mcp-sqlite-server@1.3.0","maintainers":[{"name":"berthojoris","email":"berthojoris@gmail.com"}],"homepage":"https://github.com/berthojoris/mcp-sqlite-server#readme","bugs":{"url":"https://github.com/berthojoris/mcp-sqlite-server/issues"},"bin":{"mcp-sqlite-server":"bin/mcp-sqlite-server.js"},"dist":{"shasum":"5e822a1ff57ca56cbcd319d96b47b016f0a7e858","tarball":"https://registry.npmjs.org/@berthojoris/mcp-sqlite-server/-/mcp-sqlite-server-1.3.0.tgz","fileCount":35,"integrity":"sha512-2cnEC/EOxa7ndgFM/iVAgiMYz4opncnW2P0bmelulfP1/Iyki28E8QBcBjWHLIXY4sTr7ycgkHSUU3rR/IAzBQ==","signatures":[{"sig":"MEQCIHI/MKG5rqh6M/BxyRylaBlBsOJiKhSnthCjans3UeEvAiAN7B2PQp8XLugoC1u0bZqIKXq8SbnUTaWcSkRw691ohg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":402152},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e2e8e1ce1b8cbef73292928db4083d795de7f2c5","scripts":{"dev":"tsx src/cli/index.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","check":"tsc --noEmit","start":"node dist/cli/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"berthojoris","email":"berthojoris@gmail.com"},"repository":{"url":"git+https://github.com/berthojoris/mcp-sqlite-server.git","type":"git"},"_npmVersion":"11.7.0","description":"A secure SQLite MCP (Model Context Protocol) server for AI agents with granular permissions and comprehensive security features","directories":{},"_nodeVersion":"24.11.1","dependencies":{"joi":"^17.11.0","winston":"^3.11.0","commander":"^11.1.0","better-sqlite3":"^12.4.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","jest":"^29.5.0","eslint":"^8.57.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/better-sqlite3":"^7.6.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sqlite-server_1.3.0_1766218319561_0.15284407266961497","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@berthojoris/mcp-sqlite-server","version":"1.4.0","keywords":["mcp","model-context-protocol","sqlite","ai","agent","database","security","typescript"],"author":{"name":"Bertho Joris"},"license":"MIT","_id":"@berthojoris/mcp-sqlite-server@1.4.0","maintainers":[{"name":"berthojoris","email":"berthojoris@gmail.com"}],"homepage":"https://github.com/berthojoris/mcp-sqlite-server#readme","bugs":{"url":"https://github.com/berthojoris/mcp-sqlite-server/issues"},"bin":{"mcp-sqlite-server":"bin/mcp-sqlite-server.js"},"dist":{"shasum":"d89d6784a180f1998078786a01de2833fa2ad252","tarball":"https://registry.npmjs.org/@berthojoris/mcp-sqlite-server/-/mcp-sqlite-server-1.4.0.tgz","fileCount":39,"integrity":"sha512-QVKYLyYO+uOZmf7rVxpiy7Y6BQ8tbJD3GkZvNu7UY0vXwiu8vLjiFY+v1nJ78zrtNbIJulB7KJQxogP8eClgnA==","signatures":[{"sig":"MEUCIBDDYfBj1jDDrSAWeBmkIafd8+6VVetDIgvv2iOzanQtAiEA8O8PEXSqvOXLmwFSOTljPPnXhzovv969uupVu3FJ//0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":467394},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"528e437ef94f12e3adff449221a8ca6f30bb74d7","scripts":{"dev":"tsx src/cli/index.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","check":"tsc --noEmit","start":"node dist/cli/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"berthojoris","email":"berthojoris@gmail.com"},"repository":{"url":"git+https://github.com/berthojoris/mcp-sqlite-server.git","type":"git"},"_npmVersion":"11.15.0","description":"A secure SQLite MCP (Model Context Protocol) server for AI agents with granular permissions and comprehensive security features","directories":{},"_nodeVersion":"24.11.1","dependencies":{"joi":"^17.11.0","winston":"^3.11.0","commander":"^11.1.0","better-sqlite3":"^12.4.1","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","jest":"^29.5.0","eslint":"^8.57.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/better-sqlite3":"^7.6.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-sqlite-server_1.4.0_1779427550316_0.3856961058878965","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"@berthojoris/mcp-sqlite-server","version":"1.4.1","description":"A secure SQLite MCP (Model Context Protocol) server for AI agents with granular permissions and comprehensive security features","main":"dist/index.js","types":"dist/index.d.ts","bin":{"mcp-sqlite-server":"bin/mcp-sqlite-server.js"},"scripts":{"build":"tsc","start":"node dist/cli/index.js","dev":"tsx src/cli/index.ts","test":"jest","lint":"eslint src/**/*.ts","prepublishOnly":"npm run build","check":"tsc --noEmit"},"keywords":["mcp","model-context-protocol","sqlite","ai","agent","database","security","typescript"],"author":{"name":"Bertho Joris"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/berthojoris/sqlite-mcp.git"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","better-sqlite3":"^12.4.1","commander":"^11.1.0","joi":"^17.11.0","winston":"^3.11.0"},"devDependencies":{"@types/better-sqlite3":"^7.6.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","eslint":"^8.57.0","jest":"^29.5.0","ts-jest":"^29.1.0","tsx":"^4.0.0","typescript":"^5.0.0"},"engines":{"node":">=18.0.0"},"gitHead":"689fcf3c9ec61964a755c4106d6d5fd8eda197fb","_id":"@berthojoris/mcp-sqlite-server@1.4.1","bugs":{"url":"https://github.com/berthojoris/sqlite-mcp/issues"},"homepage":"https://github.com/berthojoris/sqlite-mcp#readme","_nodeVersion":"24.11.1","_npmVersion":"11.15.0","dist":{"integrity":"sha512-lV6i7HfX8kK7qjwjgpFekL0+FYH6M2tREIagT/Jan9MG336H+YEa+GmKkL+AvRFJHv7Z8zWxE7Nc2mUwUg8zpg==","shasum":"a45f0e0ccddac83a304abd60215874018d2bdad4","tarball":"https://registry.npmjs.org/@berthojoris/mcp-sqlite-server/-/mcp-sqlite-server-1.4.1.tgz","fileCount":39,"unpackedSize":467373,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDdFxluXtRohhhmED4y4wljDwG7AqQeNMYbN3Aj9ExjRgIgdG4DzI/g093uAk5FFbqPdHqgAnuuFpjmbXUSOZPTDnk="}]},"_npmUser":{"name":"berthojoris","email":"berthojoris@gmail.com"},"directories":{},"maintainers":[{"name":"berthojoris","email":"berthojoris@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-sqlite-server_1.4.1_1779435657235_0.4342526567801994"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-25T08:56:59.803Z","modified":"2026-05-22T07:40:57.735Z","1.1.1":"2025-10-25T08:57:00.093Z","1.3.0":"2025-12-20T08:11:59.722Z","1.4.0":"2026-05-22T05:25:50.467Z","1.4.1":"2026-05-22T07:40:57.429Z"},"bugs":{"url":"https://github.com/berthojoris/sqlite-mcp/issues"},"author":{"name":"Bertho Joris"},"license":"MIT","homepage":"https://github.com/berthojoris/sqlite-mcp#readme","keywords":["mcp","model-context-protocol","sqlite","ai","agent","database","security","typescript"],"repository":{"type":"git","url":"git+https://github.com/berthojoris/sqlite-mcp.git"},"description":"A secure SQLite MCP (Model Context Protocol) server for AI agents with granular permissions and comprehensive security features","maintainers":[{"name":"berthojoris","email":"berthojoris@gmail.com"}],"readme":"# SQLite MCP Server\r\n\r\nA comprehensive Model Context Protocol (MCP) server implementation for SQLite databases, providing secure and controlled access to SQLite operations through a standardized interface.\r\n\r\n[![npm version](https://badge.fury.io/js/%40berthojoris%2Fmcp-sqlite-server.svg)](https://www.npmjs.com/package/@berthojoris/mcp-sqlite-server)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n## 📋 Table of Contents\r\n\r\n- [Features](#-features)\r\n- [Quick Start](#-quick-start)\r\n- [Installation](#-installation)\r\n- [Integration Guide](#-integration-guide)\r\n  - [Claude Desktop](#claude-desktop)\r\n  - [Cursor IDE](#cursor-ide)\r\n  - [Continue.dev](#continuedev)\r\n  - [Other MCP Clients](#other-mcp-clients)\r\n- [Available Tools (37 Tools)](#-available-tools)\r\n- [Tool Documentation](DOCUMENTATIONS.md)\r\n- [Permission System](#permission-system)\r\n- [Configuration](#-configuration)\r\n- [Security Guidelines](#-security-guidelines)\r\n\r\n## ⚡ Quick Start\r\n\r\nGet up and running in 30 seconds:\r\n\r\n```bash\r\n# Run directly with npx (no installation required)\r\nnpx @berthojoris/mcp-sqlite-server sqlite:////path/to/database.sqlite list,read,create,update,delete\r\n```\r\n\r\nOr add to your MCP client configuration:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"sqlite\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@berthojoris/mcp-sqlite-server\", \"sqlite:////path/to/db.sqlite\", \"list,read,create,update,delete\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## 🚀 Features\r\n\r\n### Core Functionality\r\n- **MCP Protocol Compliance**: Full implementation of the Model Context Protocol for seamless integration with MCP clients\r\n- **SQLite Integration**: Native SQLite support using `better-sqlite3` for optimal performance\r\n- **Granular Permissions**: Fine-grained permission system with 10 distinct permission types\r\n- **Security First**: Comprehensive SQL injection protection and query validation\r\n- **Schema Introspection**: Complete database schema analysis and reporting\r\n- **Connection Pooling**: Efficient database connection management\r\n- **Audit Logging**: Detailed operation logging for security and compliance\r\n\r\n### Permission System\r\nThe server implements a granular permission system with the following types:\r\n\r\n- `list` - List tables and schemas\r\n- `read` - SELECT queries and data retrieval\r\n- `create` - INSERT operations\r\n- `update` - UPDATE operations  \r\n- `delete` - DELETE operations\r\n- `execute` - Execute stored procedures/functions\r\n- `ddl` - Data Definition Language (CREATE, ALTER, DROP)\r\n- `procedure` - Stored procedures (N/A for SQLite - reserved for compatibility)\r\n- `transaction` - Transaction control (BEGIN, COMMIT, ROLLBACK)\r\n- `utility` - Utility operations (VACUUM, ANALYZE, PRAGMA, etc.)\r\n\r\n### Security Features\r\n- **SQL Injection Prevention**: Parameterized queries and pattern detection\r\n- **Query Validation**: Comprehensive query analysis and sanitization\r\n- **Permission Enforcement**: Operation-level permission checking\r\n- **Rate Limiting**: Configurable request rate limiting\r\n- **Audit Trail**: Complete operation logging with client tracking\r\n- **Input Sanitization**: Parameter validation and sanitization\r\n\r\n### Auto-Creation Features\r\n- **Database Auto-Creation**: Automatically creates database files if they don't exist\r\n- **Directory Auto-Creation**: Creates parent directories recursively as needed\r\n- **Intelligent Initialization**: Detects new vs existing databases and logs appropriately\r\n- **Zero-Configuration Setup**: Works out-of-the-box with any valid SQLite path\r\n\r\n## 📦 Installation\r\n\r\n### NPX Usage (Recommended)\r\n```bash\r\nnpx @berthojoris/mcp-sqlite-server sqlite:////path/to/your/database.sqlite list,read,utility\r\n```\r\n\r\n### Global Installation\r\n```bash\r\nnpm install -g @berthojoris/mcp-sqlite-server\r\nmcp-sqlite-server sqlite:////path/to/your/database.sqlite list,read,create,update\r\n```\r\n\r\n### Local Installation\r\n```bash\r\nnpm install @berthojoris/mcp-sqlite-server\r\n```\r\n\r\n## 🔗 Integration Guide\r\n\r\n### Standard MCP Configuration\r\n\r\nAdd this configuration to your MCP client's config file:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"sqlite\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\r\n        \"-y\",\r\n        \"@berthojoris/mcp-sqlite-server\",\r\n        \"sqlite:////path/to/database.sqlite\",\r\n        \"list,read,create,update,delete,utility\"\r\n      ]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n**Arguments Explained:**\r\n| # | Argument | Description |\r\n|---|----------|-------------|\r\n| 1 | `-y` | Auto-confirm npx installation |\r\n| 2 | `@berthojoris/mcp-sqlite-server` | Package name |\r\n| 3 | `sqlite:////path/to/database.sqlite` | Database connection string |\r\n| 4 | `list,read,create,update,delete,utility` | Comma-separated permissions |\r\n\r\n### Config File Locations by Client\r\n\r\n| Client | Config File Location |\r\n|--------|---------------------|\r\n| **Claude Desktop (macOS)** | `~/Library/Application Support/Claude/claude_desktop_config.json` |\r\n| **Claude Desktop (Windows)** | `%APPDATA%\\Claude\\claude_desktop_config.json` |\r\n| **Claude Desktop (Linux)** | `~/.config/Claude/claude_desktop_config.json` |\r\n| **Cursor IDE (macOS/Linux)** | `~/.cursor/mcp.json` |\r\n| **Cursor IDE (Windows)** | `%USERPROFILE%\\.cursor\\mcp.json` |\r\n| **Droid CLI** | Add as a stdio MCP server in Droid MCP settings |\r\n| **Claude CLI / Claude Code** | Add as a stdio MCP server in Claude MCP settings |\r\n| **Windsurf IDE** | `~/.windsurf/mcp.json` |\r\n| **Cline (VS Code)** | VS Code `settings.json` under `cline.mcpServers` |\r\n\r\n### Compatibility Notes\r\n\r\n- Uses the standard MCP stdio transport, so it is compatible with Cursor IDE, Droid CLI, Claude Desktop/CLI, Claude Code, Windsurf, Cline, and other stdio MCP clients.\r\n- Runtime logs are written to stderr to keep stdout reserved for MCP JSON-RPC messages.\r\n- Only implemented `tools` capability is advertised for maximum client compatibility.\r\n\r\n### Platform-Specific Path Examples\r\n\r\n```bash\r\n# macOS/Linux\r\n\"sqlite:////Users/yourname/databases/app.sqlite\"\r\n\"sqlite:////home/user/projects/data.sqlite\"\r\n\r\n# Windows\r\n\"sqlite:///C:/Users/yourname/databases/app.sqlite\"\r\n\r\n# Relative path (from working directory)\r\n\"sqlite://./data/app.sqlite\"\r\n\r\n# In-memory database\r\n\"sqlite://:memory:\"\r\n```\r\n\r\n### Multiple Databases\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"main-db\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@berthojoris/mcp-sqlite-server\", \"sqlite:////path/to/main.sqlite\", \"list,read,create,update,delete\"]\r\n    },\r\n    \"analytics-db\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@berthojoris/mcp-sqlite-server\", \"sqlite:////path/to/analytics.sqlite\", \"list,read\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## 🔧 Configuration\r\n\r\n### Connection String Formats\r\nThe server supports multiple SQLite connection string formats:\r\n\r\n```bash\r\n# Absolute path\r\nsqlite:////absolute/path/to/database.sqlite\r\n\r\n# Relative path  \r\nsqlite://./relative/path/to/database.sqlite\r\n\r\n# In-memory database\r\nsqlite://:memory:\r\n\r\n# Direct file path\r\n/path/to/database.sqlite\r\n```\r\n\r\n### Permission Combinations\r\n\r\n#### Detailed Permission Descriptions\r\n\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>Permission</th>\r\n<th>Description</th>\r\n<th>Allowed Operations</th>\r\n<th>Example Use Cases</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr>\r\n<td><code>list</code></td>\r\n<td>View database structure and metadata</td>\r\n<td>\r\n• List all tables<br>\r\n• View table schemas<br>\r\n• Check column information<br>\r\n• View indexes and constraints<br>\r\n• Access database metadata\r\n</td>\r\n<td>\r\n• Database exploration<br>\r\n• Schema documentation<br>\r\n• Development planning<br>\r\n• Data modeling\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>read</code></td>\r\n<td>Execute SELECT queries and retrieve data</td>\r\n<td>\r\n• SELECT statements<br>\r\n• JOIN operations<br>\r\n• Aggregate functions (COUNT, SUM, etc.)<br>\r\n• Subqueries<br>\r\n• View data content\r\n</td>\r\n<td>\r\n• Data analysis<br>\r\n• Reporting<br>\r\n• Business intelligence<br>\r\n• Read-only applications\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>create</code></td>\r\n<td>Insert new records into tables</td>\r\n<td>\r\n• INSERT statements<br>\r\n• Bulk insert operations<br>\r\n• Add new rows<br>\r\n• Populate tables with data\r\n</td>\r\n<td>\r\n• Data entry applications<br>\r\n• ETL processes<br>\r\n• User registration<br>\r\n• Content creation\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>update</code></td>\r\n<td>Modify existing records</td>\r\n<td>\r\n• UPDATE statements<br>\r\n• Bulk update operations<br>\r\n• Modify existing data<br>\r\n• Change field values\r\n</td>\r\n<td>\r\n• Profile updates<br>\r\n• Status changes<br>\r\n• Data corrections<br>\r\n• Content editing\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>delete</code></td>\r\n<td>Remove records from tables</td>\r\n<td>\r\n• DELETE statements<br>\r\n• Bulk delete operations<br>\r\n• Remove rows<br>\r\n• Data cleanup\r\n</td>\r\n<td>\r\n• User account deletion<br>\r\n• Data archiving<br>\r\n• Content removal<br>\r\n• Cleanup operations\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>execute</code></td>\r\n<td>Run stored procedures and functions</td>\r\n<td>\r\n• Execute stored procedures<br>\r\n• Call database functions<br>\r\n• Run custom database logic<br>\r\n• Execute complex operations\r\n</td>\r\n<td>\r\n• Business logic execution<br>\r\n• Complex calculations<br>\r\n• Batch processing<br>\r\n• Custom workflows\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>ddl</code></td>\r\n<td>Modify database structure</td>\r\n<td>\r\n• CREATE TABLE/INDEX<br>\r\n• ALTER TABLE structure<br>\r\n• DROP tables/indexes<br>\r\n• Modify schema<br>\r\n• Create/drop views\r\n</td>\r\n<td>\r\n• Database migrations<br>\r\n• Schema updates<br>\r\n• Development setup<br>\r\n• Structure modifications\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>transaction</code></td>\r\n<td>Control transaction boundaries</td>\r\n<td>\r\n• BEGIN transactions<br>\r\n• COMMIT changes<br>\r\n• ROLLBACK operations<br>\r\n• Manage data consistency<br>\r\n• Atomic operations\r\n</td>\r\n<td>\r\n• Financial operations<br>\r\n• Data integrity<br>\r\n• Batch processing<br>\r\n• Critical updates\r\n</td>\r\n</tr>\r\n<tr>\r\n<td><code>utility</code></td>\r\n<td>Perform maintenance and optimization</td>\r\n<td>\r\n• VACUUM database<br>\r\n• ANALYZE statistics<br>\r\n• PRAGMA commands<br>\r\n• Database backup<br>\r\n• Performance optimization\r\n</td>\r\n<td>\r\n• Database maintenance<br>\r\n• Performance tuning<br>\r\n• Backup operations<br>\r\n• System administration\r\n</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n#### Common permission combinations for different use cases:\r\n\r\n```bash\r\n# Read-only access\r\nlist,read\r\n\r\n# Basic CRUD operations\r\nlist,read,create,update,delete\r\n\r\n# Full database access\r\nlist,read,create,update,delete,execute,ddl,procedure,transaction,utility\r\n\r\n# Analytics/reporting\r\nlist,read,utility\r\n\r\n# Development/testing\r\nlist,read,create,update,delete,ddl,transaction,utility\r\n```\r\n\r\n## 🔌 Available Tools\r\n\r\nThe MCP server provides **37 powerful tools** for comprehensive SQLite database management:\r\n\r\n### Tools Summary\r\n\r\n| # | Tool | Description | Permission |\r\n|---|------|-------------|------------|\r\n| 1 | [`sqlite_query`](#sqlite_query) | Execute SELECT queries with parameterized support | `read` |\r\n| 2 | [`sqlite_insert`](#sqlite_insert) | Insert single records into tables | `create` |\r\n| 3 | [`sqlite_update`](#sqlite_update) | Update existing records | `update` |\r\n| 4 | [`sqlite_delete`](#sqlite_delete) | Delete records from tables | `delete` |\r\n| 5 | [`sqlite_schema`](#sqlite_schema) | Get comprehensive schema information | `list` |\r\n| 6 | [`sqlite_tables`](#sqlite_tables) | List all tables in database | `list` |\r\n| 7 | [`sqlite_relations`](#sqlite_relations) | Analyze table relationships and foreign keys | `list` |\r\n| 8 | [`sqlite_transaction`](#sqlite_transaction) | Execute multiple queries atomically | `transaction` |\r\n| 9 | [`sqlite_backup`](#sqlite_backup) | Create database backup | `utility` |\r\n| 10 | [`sqlite_bulk_insert`](#sqlite_bulk_insert) | Bulk insert with relational support | `create` |\r\n| 11 | [`sqlite_bulk_update`](#sqlite_bulk_update) | Bulk update with progress tracking | `update` |\r\n| 12 | [`sqlite_bulk_delete`](#sqlite_bulk_delete) | Bulk delete with cascade support | `delete` |\r\n| 13 | [`sqlite_ddl`](#sqlite_ddl) | Schema management (CREATE/ALTER/DROP) | `ddl` |\r\n| 14 | [`sqlite_views`](#sqlite_views) | Create and manage database views | `ddl` |\r\n| 15 | [`sqlite_indexes`](#sqlite_indexes) | Index management and optimization | `list`, `ddl` |\r\n| 16 | [`sqlite_constraints`](#sqlite_constraints) | View constraints and foreign keys | `list` |\r\n| 17 | [`sqlite_migrate`](#sqlite_migrate) | Data migration between tables | `read`, `create`, `update` |\r\n| 18 | [`sqlite_backup_restore`](#sqlite_backup_restore) | Backup tables and restore from SQL | `utility`, `read`, `ddl` |\r\n| 19 | [`sqlite_column_statistics`](#sqlite_column_statistics) | Column statistics and data profiling | `read` |\r\n| 20 | [`sqlite_database_summary`](#sqlite_database_summary) | Database summary and metadata | `read` |\r\n| 21 | [`sqlite_schema_erd`](#sqlite_schema_erd) | Entity relationship diagram data | `read` |\r\n| 22 | [`sqlite_schema_rag_context`](#sqlite_schema_rag_context) | RAG context for AI models | `read` |\r\n| 23 | [`sqlite_analyze_query`](#sqlite_analyze_query) | Query analysis and execution plans | `read` |\r\n| 24 | [`sqlite_optimization_hints`](#sqlite_optimization_hints) | Query optimization suggestions | `read` |\r\n| 25 | [`sqlite_database_health_check`](#sqlite_database_health_check) | Database health and integrity checks | `read` |\r\n| 26 | [`sqlite_unused_indexes`](#sqlite_unused_indexes) | Find unused or redundant indexes | `read` |\r\n| 27 | [`sqlite_connection_pool_stats`](#sqlite_connection_pool_stats) | Connection pool statistics | `read` |\r\n| 28 | [`sqlite_upsert`](#sqlite_upsert) | Insert-or-update records using ON CONFLICT | `create`, `update` |\r\n| 29 | [`sqlite_pragma`](#sqlite_pragma) | Safe SQLite PRAGMA management | `utility` |\r\n| 30 | [`sqlite_integrity_check`](#sqlite_integrity_check) | Run quick_check or integrity_check | `utility` |\r\n| 31 | [`sqlite_foreign_key_check`](#sqlite_foreign_key_check) | Find foreign key violations | `utility` |\r\n| 32 | [`sqlite_vacuum`](#sqlite_vacuum) | Run VACUUM or incremental_vacuum | `utility` |\r\n| 33 | [`sqlite_analyze`](#sqlite_analyze) | Run ANALYZE, REINDEX, or optimize | `utility` |\r\n| 34 | [`sqlite_wal_checkpoint`](#sqlite_wal_checkpoint) | Run WAL checkpoint maintenance | `utility` |\r\n| 35 | [`sqlite_explain_query_plan`](#sqlite_explain_query_plan) | Explain query plans and optional bytecode | `read` |\r\n| 36 | [`sqlite_table_inspect`](#sqlite_table_inspect) | Deep table metadata inspection | `list`, `read` |\r\n| 37 | [`sqlite_audit_logs`](#sqlite_audit_logs) | View recent MCP audit entries | `utility` |\r\n\r\n### Tool Categories\r\n\r\n**Data Query & Retrieval:**\r\n- `sqlite_query` - Run SELECT statements\r\n- `sqlite_schema` - Inspect database structure\r\n- `sqlite_tables` - List available tables\r\n- `sqlite_relations` - Analyze table relationships and foreign keys\r\n\r\n**Data Manipulation (CRUD):**\r\n- `sqlite_insert` - Create new records\r\n- `sqlite_update` - Modify existing records\r\n- `sqlite_delete` - Remove records\r\n- `sqlite_upsert` - Insert or update records with ON CONFLICT\r\n\r\n**Bulk Operations:**\r\n- `sqlite_bulk_insert` - Insert many records efficiently\r\n- `sqlite_bulk_update` - Update many records at once\r\n- `sqlite_bulk_delete` - Delete many records with cascade support\r\n\r\n**Schema Management:**\r\n- `sqlite_ddl` - CREATE/ALTER/DROP tables and indexes\r\n- `sqlite_views` - Create, drop, and manage database views\r\n- `sqlite_indexes` - Index management and optimization\r\n\r\n**Constraints & Relationships:**\r\n- `sqlite_constraints` - View and analyze constraints and foreign keys\r\n\r\n**Data Migration:**\r\n- `sqlite_migrate` - Clone tables, compare structures, and copy data\r\n\r\n**Database Operations:**\r\n- `sqlite_transaction` - Atomic multi-query execution\r\n- `sqlite_backup` - Database backup utility\r\n- `sqlite_backup_restore` - Backup tables and restore from SQL files\r\n\r\n**SQLite Maintenance & Diagnostics:**\r\n- `sqlite_pragma` - Read or update safe SQLite PRAGMA settings\r\n- `sqlite_integrity_check` - Run database integrity checks\r\n- `sqlite_foreign_key_check` - Detect foreign key violations\r\n- `sqlite_vacuum` - Reclaim space and rebuild database pages\r\n- `sqlite_analyze` - Refresh statistics, reindex, or optimize\r\n- `sqlite_wal_checkpoint` - Flush WAL frames back to the database\r\n- `sqlite_explain_query_plan` - Inspect query planner output\r\n- `sqlite_table_inspect` - Inspect columns, indexes, triggers, row counts, and samples\r\n- `sqlite_audit_logs` - Review recent MCP tool-call audit logs\r\n\r\n> 📖 **Full Documentation:** See [DOCUMENTATIONS.md](DOCUMENTATIONS.md) for detailed parameters, examples, and response formats for each tool.\r\n\r\n## 🔒 Security Guidelines\r\n\r\n### Best Practices\r\n1. **Principle of Least Privilege**: Only grant necessary permissions\r\n2. **Use Parameterized Queries**: Always use parameters for dynamic values\r\n3. **Regular Backups**: Implement automated backup strategies\r\n4. **Monitor Audit Logs**: Review operation logs regularly\r\n5. **Connection Limits**: Set appropriate connection pool limits\r\n6. **Read-Only When Possible**: Use read-only mode for reporting/analytics\r\n\r\n### Security Features\r\n- **SQL Injection Protection**: Automatic detection of dangerous patterns\r\n- **Query Validation**: Comprehensive query analysis before execution\r\n- **Permission Enforcement**: Operation-level access control\r\n- **Rate Limiting**: Configurable request throttling\r\n- **Audit Logging**: Complete operation tracking\r\n- **Input Sanitization**: Parameter validation and cleaning\r\n\r\n### Dangerous Operations\r\nThe server automatically blocks or restricts:\r\n- Multiple statement execution\r\n- Dangerous SQL patterns (UNION-based injections, etc.)\r\n- Unauthorized schema modifications\r\n- Excessive query complexity\r\n- Operations without proper permissions\r\n\r\n## 📄 License\r\n\r\nMIT License - see LICENSE file for details.\r\n\r\n## 🆘 Support\r\n\r\nFor issues, questions, or contributions:\r\n- GitHub Issues: [Repository Issues](https://github.com/berthojoris/sqlite-mcp/issues)\r\n- Documentation: [Full Documentation](https://github.com/berthojoris/sqlite-mcp/wiki)\r\n\r\n**Note**: This server is designed for secure, controlled access to SQLite databases through the Model Context Protocol. Always follow security best practices and regularly review audit logs in production environments.\r\n\r\n---\r\n\r\n**Last Updated**: 2026-05-22 14:35:11\r\n","readmeFilename":"README.md"}