🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@database-mcp/sqlite

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@database-mcp/sqlite - npm Package Compare versions

Comparing version
0.2.0
to
0.3.0
+2
-2
package.json
{
"name": "@database-mcp/sqlite",
"version": "0.2.0",
"version": "0.3.0",
"description": "MCP server for SQLite with read-only guardrails, row caps, and statement timeouts",

@@ -32,3 +32,3 @@ "license": "MIT",

"dependencies": {
"@database-mcp/core": "^0.2.0",
"@database-mcp/core": "^0.3.0",
"better-sqlite3": "^12.2.0"

@@ -35,0 +35,0 @@ },

+40
-10

@@ -19,15 +19,45 @@ # @database-mcp/sqlite

Or with environment variables instead of flags: set `SQLITE_PATH`. Or keep
everything in a YAML file and pass only `--config /abs/path/db-mcp.yaml`
(values support `${VAR}` env expansion; secrets support `*_file` indirection).
`--print-config` shows the resolved config with secrets redacted.
## Configuration
SQLite needs one thing: the path to the database file. Three ways to give it:
### Flag
`--dsn /absolute/path/to/database.db`, as in the quick start.
### Environment variable
```json
"env": { "SQLITE_PATH": "/absolute/path/to/database.db" }
```
### YAML config file
Useful if you want the guardrail settings in one file. Pass an absolute
path, since the working directory at launch is unpredictable:
```json
"args": ["-y", "@database-mcp/sqlite", "--config", "/absolute/path/database-mcp.yaml"]
```
```yaml
# /absolute/path/database-mcp.yaml
connection:
dsn: /absolute/path/to/database.db
guardrails:
readOnly: true
maxRows: 1000
queryTimeoutMs: 30000
```
Run the server with `--print-config` to see exactly what it resolved.
## Tools
- **`execute_sql`** `{ sql }` — run a single SQL statement. Returns a summary
- **`execute_sql`** `{ sql }` runs a single SQL statement. Returns a summary
line (`N rows` / `truncated to N rows` / `OK (N affected)`) followed by
compact JSON `{columns, rows}`.
- **`search_objects`** `{ table? }` — without arguments, lists tables with
estimated row counts; with a table name, returns its columns, indexes, and
foreign keys.
- **`search_objects`** `{ table? }` lists tables with estimated row counts,
or describes one table (columns, indexes, foreign keys).

@@ -43,4 +73,4 @@ ## Guardrails (defaults)

Read-only is enforced in two layers: a conservative SQL guard, plus the
database file opened read-only with `PRAGMA query_only=ON` — so writes
smuggled through CTEs are blocked too.
database file opened read-only with `PRAGMA query_only=ON`. Writes smuggled
through CTEs are blocked too.

@@ -47,0 +77,0 @@ ## Part of database-mcp