{"id":50836993,"url":"https://github.com/achmadya-dev/mcp-sqlite-query","last_synced_at":"2026-06-14T04:05:14.885Z","repository":{"id":364675599,"uuid":"1247566091","full_name":"achmadya-dev/mcp-sqlite-query","owner":"achmadya-dev","description":"Model Context Protocol (MCP) server for SQLite to run SQL queries via stdio","archived":false,"fork":false,"pushed_at":"2026-06-14T02:46:04.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T03:05:43.981Z","etag":null,"topics":["cursor","database","mcp","model-context-protocol","sqlite","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/achmadya-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T13:41:19.000Z","updated_at":"2026-06-14T02:46:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/achmadya-dev/mcp-sqlite-query","commit_stats":null,"previous_names":["achmadya-dev/mcp-sqlite-query"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/achmadya-dev/mcp-sqlite-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achmadya-dev%2Fmcp-sqlite-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achmadya-dev%2Fmcp-sqlite-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achmadya-dev%2Fmcp-sqlite-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achmadya-dev%2Fmcp-sqlite-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/achmadya-dev","download_url":"https://codeload.github.com/achmadya-dev/mcp-sqlite-query/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/achmadya-dev%2Fmcp-sqlite-query/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34308667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cursor","database","mcp","model-context-protocol","sqlite","typescript"],"created_at":"2026-06-14T04:05:09.521Z","updated_at":"2026-06-14T04:05:14.879Z","avatar_url":"https://github.com/achmadya-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @achmadya-dev/mcp-sqlite-query\n\nMCP server for SQLite. Runs a single SQL statement per tool call over **stdio** using Node.js built-in `node:sqlite` (no native add-ons). **Read-only by default** — writes and DDL require explicit env flags.\n\n## Requirements\n\n- Node.js **≥ 22.5.0** (`node:sqlite` built-in)\n- A SQLite database file path, or `:memory:` for ephemeral storage\n\n## Install from npm\n\n```json\n{\n  \"mcpServers\": {\n    \"sqlite\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@achmadya-dev/mcp-sqlite-query\"],\n      \"env\": {\n        \"SQLITE_DB_PATH\": \"/absolute/path/to/database.db\"\n      }\n    }\n  }\n}\n```\n\nUse `:memory:` for an in-memory database (data is lost when the server stops).\n\nOr use `envFile` instead of inline `env`.\n\n## Develop from source\n\n```bash\ngit clone https://github.com/achmadya-dev/mcp-sqlite-query.git\ncd mcp-sqlite-query\npnpm install\npnpm run build\npnpm test\n```\n\nOpen the repo root in Cursor and point at a database file (or `:memory:`):\n\n```json\n{\n  \"mcpServers\": {\n    \"sqlite\": {\n      \"command\": \"node\",\n      \"args\": [\"${workspaceFolder}/dist/index.js\"],\n      \"env\": {\n        \"SQLITE_DB_PATH\": \"/absolute/path/to/database.db\"\n      }\n    }\n  }\n}\n```\n\nOr use `envFile` pointing at a `.env` in the repo root. Paths are resolved relative to the workspace folder when Cursor starts the server.\n\n## Environment variables\n\n### Database\n\n| Variable          | Default    | Description                      |\n| ----------------- | ---------- | -------------------------------- |\n| `SQLITE_DB_PATH`  | `:memory:` | Database file path or `:memory:` |\n| `SQLITE_MAX_ROWS` | `500`      | Max rows for `SELECT` results    |\n\n### Write access\n\n| Variable                 | Allows                                    |\n| ------------------------ | ----------------------------------------- |\n| `ALLOW_INSERT_OPERATION` | `INSERT`, `REPLACE`                       |\n| `ALLOW_UPDATE_OPERATION` | `UPDATE`                                  |\n| `ALLOW_DELETE_OPERATION` | `DELETE`                                  |\n| `ALLOW_DDL_OPERATION`    | DDL (`CREATE`, `ALTER`, `DROP`, `VACUUM`) |\n\nEnabled values: `true`, `1`, `yes`, `on`.\n\n## Tools\n\n| Tool            | Statements                    | Env flag                 |\n| --------------- | ----------------------------- | ------------------------ |\n| `sqlite_select` | `SELECT`, `PRAGMA`, `EXPLAIN` | always on                |\n| `sqlite_insert` | `INSERT`, `REPLACE`           | `ALLOW_INSERT_OPERATION` |\n| `sqlite_update` | `UPDATE`                      | `ALLOW_UPDATE_OPERATION` |\n| `sqlite_delete` | `DELETE`                      | `ALLOW_DELETE_OPERATION` |\n| `sqlite_ddl`    | DDL                           | `ALLOW_DDL_OPERATION`    |\n\nEach tool accepts one `sql` string.\n\n## Behavior and security\n\n- One SQL statement per request.\n- SQL is validated with a parser that handles string literals, quoted identifiers, and comments before extracting the statement keyword.\n- Always blocked: `XP_CMDSHELL`, `EXEC`, `EXECUTE`, `PREPARE`, `DEALLOCATE`, `ATTACH DATABASE`, `LOAD_FILE`, `INTO OUTFILE`, `COPY ... PROGRAM`.\n- `SELECT` results are capped by `SQLITE_MAX_ROWS`.\n\n## Package scripts\n\n```bash\npnpm run build\npnpm test\npnpm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachmadya-dev%2Fmcp-sqlite-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fachmadya-dev%2Fmcp-sqlite-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fachmadya-dev%2Fmcp-sqlite-query/lists"}