db-mcp 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-blue.svg)](https://github.com/neverinfamous/db-mcp)
16
16
  [![E2E](https://github.com/neverinfamous/db-mcp/actions/workflows/e2e.yml/badge.svg)](https://github.com/neverinfamous/db-mcp/actions/workflows/e2e.yml)
17
17
  [![Tests](https://img.shields.io/badge/Tests-1911%20passed-brightgreen.svg)](https://github.com/neverinfamous/db-mcp)
18
- [![Coverage](https://img.shields.io/badge/Coverage-87.53%25-green.svg)](https://github.com/neverinfamous/db-mcp)
18
+ [![Coverage](https://img.shields.io/badge/Coverage-87.54%25-green.svg)](https://github.com/neverinfamous/db-mcp)
19
19
 
20
20
  **[Wiki](https://github.com/neverinfamous/db-mcp/wiki)** • **[Changelog](CHANGELOG.md)**
21
21
 
@@ -34,7 +34,7 @@
34
34
  | **OAuth 2.1 + Access Control** | Enterprise-ready security with RFC 9728/8414 compliance, granular scopes (`full`, `read`, `write`, `admin`, `db:*`, `table:*:*`), and Keycloak integration |
35
35
  | **Smart Tool Filtering** | 10 tool groups + 7 shortcuts let you stay within IDE limits while exposing exactly what you need |
36
36
  | **HTTP Streaming Transport** | Streamable HTTP (`/mcp`) for modern clients + legacy SSE (`/sse`) for backward compatibility — both protocols supported simultaneously with security headers, rate limiting, health check, and stateless mode for serverless |
37
- | **Production-Ready Security** | SQL injection protection (parameterized queries + Unicode-normalized WHERE clause validation), sandboxed code execution (V8 `codeGeneration` restrictions, frozen prototypes, 18 blocked patterns, Proxy nullified, RPC allowlist), CORS deny-all default, fail-closed scope enforcement, JWT claims sanitization, 7 security headers, body size limits, rate limiting with Retry-After, slowloris timeouts, `trustProxy`, opt-in HSTS, non-root Docker, and build provenance |
37
+ | **Production-Ready Security** | SQL injection protection (parameterized queries + Unicode-normalized WHERE clause validation), sandboxed code execution (V8 `codeGeneration` restrictions, frozen prototypes, 29 blocked patterns, Proxy nullified, RPC allowlist), CORS deny-all default, fail-closed scope enforcement, JWT claims sanitization, 7 security headers, body size limits, rate limiting with Retry-After, slowloris timeouts, `trustProxy`, opt-in HSTS, non-root Docker, and build provenance |
38
38
  | **Strict TypeScript** | 100% type-safe codebase with strict mode, no `any` types, 1911 unit tests + 1136 E2E tests and 90% coverage |
39
39
  | **Deterministic Error Handling** | Every tool returns structured `{success, error, code, category, suggestion, recoverable}` responses — no raw exceptions, no silent failures. Agents get enriched error context with actionable suggestions instead of cryptic SQLite codes |
40
40
  | **MCP 2025-03-26 Compliant** | Full protocol support with tool safety hints (`sensitiveHint`, `readOnlyHint`), resource priorities, and progress notifications |
@@ -411,7 +411,6 @@ MCP prompts provide AI-assisted database workflows:
411
411
  | `MCP_HOST` | `0.0.0.0` | Host/IP to bind to (CLI: `--server-host`) |
412
412
  | `SQLITE_DATABASE` | — | SQLite database path (CLI: `--sqlite` / `--sqlite-native`) |
413
413
  | `DB_MCP_TOOL_FILTER` | — | Tool filter string (CLI: `--tool-filter`) |
414
- | `MCP_AUTH_TOKEN` | — | Simple bearer token for HTTP auth (CLI: `--auth-token`) |
415
414
  | `OAUTH_ENABLED` | `false` | Enable OAuth 2.1 (CLI: `--oauth-enabled`) |
416
415
  | `OAUTH_ISSUER` | — | Authorization server URL (CLI: `--oauth-issuer`) |
417
416
  | `OAUTH_AUDIENCE` | — | Expected token audience (CLI: `--oauth-audience`) |
@@ -438,7 +437,7 @@ MCP prompts provide AI-assisted database workflows:
438
437
  db-mcp [options]
439
438
 
440
439
  Transport: --transport <stdio|http|sse> --port <N> --server-host <host> --stateless
441
- Auth: --auth-token <token> | --oauth-enabled --oauth-issuer <url> --oauth-audience <aud>
440
+ Auth: --oauth-enabled --oauth-issuer <url> --oauth-audience <aud>
442
441
  Database: --sqlite <path> | --sqlite-native <path>
443
442
  Extensions: --csv --spatialite (native only)
444
443
  Audit: --audit-log <path> --audit-no-redact --audit-reads --audit-backup --audit-backup-data
@@ -549,21 +548,7 @@ Legacy protocol (MCP 2024-11-05) — for clients like Python `mcp.client.sse`:
549
548
 
550
549
  ## 🔐 Authentication
551
550
 
552
- db-mcp supports two authentication mechanisms for HTTP transport:
553
-
554
- ### Simple Bearer Token (`--auth-token`)
555
-
556
- Lightweight authentication for development or single-tenant deployments:
557
-
558
- ```bash
559
- node dist/cli.js --transport http --port 3000 --auth-token my-secret --sqlite-native ./database.db
560
-
561
- # Or via environment variable
562
- export MCP_AUTH_TOKEN=my-secret
563
- node dist/cli.js --transport http --port 3000 --sqlite-native ./database.db
564
- ```
565
-
566
- Clients must include `Authorization: Bearer my-secret` on all requests. `/health` and `/` are exempt. Unauthenticated requests receive `401` with `WWW-Authenticate: Bearer` headers per RFC 6750.
551
+ db-mcp secures the HTTP transport using strict OAuth 2.1 authentication:
567
552
 
568
553
  ### OAuth 2.1 (Enterprise)
569
554
 
@@ -611,7 +596,7 @@ The server exposes metadata at `/.well-known/oauth-protected-resource`.
611
596
  > **Audit identity integration:** When OAuth is enabled alongside audit logging (`--audit-log`), audit entries for write/admin tools automatically capture the authenticated user (`claims.sub`) and granted scopes. This provides a complete forensic trail linking every mutation to a specific identity. Without OAuth, these fields are `null`/`[]`.
612
597
 
613
598
  > [!WARNING]
614
- > **HTTP without authentication:** When using `--transport http` without enabling OAuth or `--auth-token`, all clients have full unrestricted access. Always enable authentication for production HTTP deployments. See [SECURITY.md](SECURITY.md) for details.
599
+ > **HTTP without authentication:** When using `--transport http` without enabling OAuth, all clients have full unrestricted access. Always enable authentication for production HTTP deployments. See [SECURITY.md](SECURITY.md) for details.
615
600
 
616
601
  ## 📊 Benchmarks
617
602