An MCP (Model Context Protocol) server providing SQLite database interaction for AI agents. Version 1.0.9 (April 2026) includes critical SQL injection vulnerability fixes (CWE-89). The server exposes CRUD operations (create_record, read_records, update_records, delete_records), database introspection (list_tables, get_table_schema, db_info), and custom SQL execution. It is designed to be run as a stdio-based MCP tool in IDEs like Cursor, VS Code, and Windsurf. Compared to raw better-sqlite3 usage, it abstracts SQL via MCP tool calls and validates identifiers against sqlite_master. Requires Node >= 14.
npm install mcp-sqliteVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up mcp-sqlite with Cursor, creating a table, inserting a record, and reading it back via MCP tools.
Update to v1.0.9 or later.
Ensure your MCP client supports the new schema structure. No action needed for v1.0.8+.
Use correct VS Code configuration: { 'servers': { 'name': { 'type':'stdio', 'command':'npx', 'args':['-y','mcp-sqlite','path'] } } }Always pass the path to your SQLite database file as the last argument to npx.
Use npx to run the server. Do not attempt to require('mcp-sqlite').Check your IDE's documentation for the correct configuration key.
Ensure the database file exists and the path is correct. Restart Cursor/VS Code after configuration changes.
Run 'npx mcp-sqlite' with the correct package name. If using npx, ensure you have internet access.
Verify the table exists using 'list_tables' first. Update to v1.0.9 for security fixes.
Ensure method is 'tools/call' and arguments follow the documented structure (e.g., 'data' must be an object).