# db-mcp (SQLite MCP Server) [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/neverinfamous/db-mcp.git  
**GitHub Stars:** 13  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/db-mcp-sqlite-mcp-server

## Description
SQLite MCP server with OAuth 2.1, HTTP/SSE, 122 tools, and smart tool filtering

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/neverinfamous/db-mcp.git), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
docker pull writenotenow/db-mcp:latest
```

2. Start the server:

```sh
docker run -i --rm \
  -v $(pwd):/workspace \
  writenotenow/db-mcp:latest \
  --sqlite-native /workspace/database.db
```

3. Install:

```sh
git clone https://github.com/neverinfamous/db-mcp.git
```

4. Run:

```sh
cd db-mcp
```

5. Install:

```sh
pnpm install
```

6. Install:

```sh
pnpm run build
```

## Documentation

## What db-mcp (SQLite MCP Server) does

db-mcp (SQLite MCP Server) exposes SQLite database operations through the Model Context Protocol. Its toolset covers routine data access as well as specialized workloads, including CRUD operations, JSON and JSONB handling, FTS5 full-text search, statistical analysis, vector search, geospatial operations, schema introspection, migration, and administration.

The server also publishes 22 MCP resources: 11 data resources and 11 help resources. Data resources cover areas such as schemas, tables, table schemas, indexes, views, health, metadata, audit information, metrics, compile options, and pragmas. Ten prompts support guided workflows for schema exploration, query construction, analysis, optimization, migration, debugging, and combined FTS5 and vector search.

## How it works

Clients communicate with the server over HTTP/SSE. OAuth 2.1 authentication is available, with access scopes covering broad modes such as full, read, write, and admin, along with database- and table-level patterns. Keycloak integration is supported. Tool filtering can reduce the capabilities or resources exposed to a client.

SQLite execution is available in two variants. The WASM implementation uses sql.js and is intended for portability without compilation. The native implementation uses better-sqlite3 and supports high-performance concurrent execution, transactions, window functions, and SpatiaLite GIS features.

For complex workflows, Code Mode runs operations inside a V8 isolate sandbox with process-level isolation and hard timeouts. Tool responses include token estimates and may support compact or result-limiting options, helping clients control response size.

## Setup and configuration

Configuration can be supplied through YAML or JSON using the server's `--config` option. The server applies configuration precedence rules, and the `sqlite_server_config` tool can update selected runtime settings, such as log levels, without a restart.

HTTP metrics are available at `/metrics`. Metrics can also be accessed through the `sqlite://metrics` resource, with historical data stored in a SystemDb sidecar. The server supports audit logging with DDL backup snapshots. OAuth 2.1 and access-control settings should be selected according to the database operations the client must perform.

## Tools and capabilities

The db-mcp (SQLite MCP Server) tool collection includes more than 170 specialized operations. Notable capabilities include cursor-based keyset pagination, faceted search aggregation, and `sqlite_hybrid_search`, which combines FTS5 and vector similarity using reciprocal rank fusion. `sqlite_index_audit` examines `EXPLAIN QUERY PLAN` results and workload patterns to recommend composite or partial indexes.

Clients can subscribe to event-driven updates for schema DDL changes through `sqlite://schema` and periodic health updates through `sqlite://health`. Audit investigation is supported through the `sqlite_audit_search` tool. Resources and help references can be filtered with the server's tool-filter configuration.

## Limitations and notes

The WASM and native variants have different execution characteristics. WASM prioritizes portability, while the better-sqlite3 variant provides the native feature set described for transactions, window functions, concurrency, and SpatiaLite. The available operations and exposed resources can also vary with tool filtering and access-control settings, so clients may not see the full catalog in every deployment.

_Full upstream README: https://allmcps.com/mcp/db-mcp-sqlite-mcp-server/readme_

