{
  "markdown": "# mcp-server-sqlite\n\n[![npm version](https://img.shields.io/npm/v/mcp-sqlite-server.svg)](https://www.npmjs.com/package/mcp-sqlite-server)\n[![npm downloads](https://img.shields.io/npm/dm/mcp-sqlite-server.svg)](https://www.npmjs.com/package/mcp-sqlite-server)\n[![CI](https://github.com/ofershap/mcp-server-sqlite/actions/workflows/ci.yml/badge.svg)](https://github.com/ofershap/mcp-server-sqlite/actions/workflows/ci.yml)\n[![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nQuery SQLite databases, inspect schemas, and explain queries from your AI assistant. Read-only by default for safety.\n\n```bash\nnpx mcp-sqlite-server\n```\n\n> Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP client. Reads local `.db` files, no auth needed.\n\n![MCP server for querying SQLite databases and inspecting schemas](assets/demo.gif)\n\n<sub>Demo built with <a href=\"https://github.com/ofershap/remotion-readme-kit\">remotion-readme-kit</a></sub>\n\n## Why\n\nSQLite is everywhere. It's the default database for mobile apps, Electron apps, local-first tools, and increasingly for server-side projects too (Turso, Cloudflare D1, Bun's built-in SQLite). The official MCP reference includes a basic SQLite server, but it's Python-only. If you're working in a TypeScript/Node.js environment and want to ask your assistant \"what tables are in this database?\" or \"run this query and show me the results,\" this server handles that. It opens the database read-only by default so you can explore safely, and you can opt into write mode when you need it.\n\n## Tools\n\n| Tool             | What it does                                                             |\n| ---------------- | ------------------------------------------------------------------------ |\n| `query`          | Execute SQL (SELECT, PRAGMA, EXPLAIN, WITH). Returns results as a table. |\n| `schema`         | Get full schema: all tables with columns, types, and row counts.         |\n| `table_info`     | Detailed info for a single table: columns, constraints, row count.       |\n| `explain`        | Run EXPLAIN QUERY PLAN to optimize queries.                              |\n| `list_databases` | List .db, .sqlite, .sqlite3 files in a directory.                        |\n\n## Quick Start\n\n### Cursor\n\nAdd to `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"sqlite\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-sqlite-server\"]\n    }\n  }\n}\n```\n\n### Claude Desktop\n\nAdd to `claude_desktop_config.json` (macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"sqlite\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-sqlite-server\"]\n    }\n  }\n}\n```\n\n### VS Code\n\nConfigure the MCP server in your VS Code settings to run `npx mcp-sqlite-server`.\n\n## Example prompts\n\n- \"Show me the schema of my database at ./data.db\"\n- \"Query the users table: SELECT \\* FROM users LIMIT 10\"\n- \"Explain the query plan for this complex join\"\n- \"What tables are in this database?\"\n- \"Find all .db files in the current directory\"\n\n## Safety\n\nRead-only by default. The `query` tool accepts only SELECT, PRAGMA, EXPLAIN, and WITH in readonly mode. Set `readonly=false` in the tool args to enable INSERT, UPDATE, DELETE, etc.\n\n## Development\n\n```bash\nnpm install\nnpm run typecheck\nnpm run build\nnpm test\nnpm run format\nnpm run lint\n```\n\n## See also\n\nMore MCP servers and developer tools on my [portfolio](https://gitshow.dev/ofershap).\n\n## Author\n\n[![Made by ofershap](https://gitshow.dev/api/card/ofershap)](https://gitshow.dev/ofershap)\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-0A66C2?style=flat&logo=linkedin&logoColor=white)](https://linkedin.com/in/ofershap)\n[![GitHub](https://img.shields.io/badge/GitHub-Follow-181717?style=flat&logo=github&logoColor=white)](https://github.com/ofershap)\n\n---\n\n<sub>README built with [README Builder](https://ofershap.github.io/readme-builder/)</sub>\n\n## License\n\nMIT © 2026 Ofer Shapira\n",
  "bytes": 4083,
  "sha": "a075db1093d7da090216e95f25ca4442f8ffb5c17dbfc6138e63ec6d4a9ec287",
  "repo_slug": "ofershap/mcp-server-sqlite",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ofershap_sqlite_1fb63b47/readme"
}