DB Mcp (SQLite MCP Server) logo

DB Mcp (SQLite MCP Server)

SQLite MCP server with extensive database tools, HTTP/SSE, OAuth 2.1, auditing, resources, prompts, and configurable tool filtering.

Install DB Mcp (SQLite MCP Server)

Run the project’s own setup commands, in order.

Setup steps from the project

db-mcp (SQLite MCP Server) installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    docker pull writenotenow/db-mcp:latest
    
  2. 2. Start the server
    docker run -i --rm \
      -v $(pwd):/workspace \
      writenotenow/db-mcp:latest \
      --sqlite-native /workspace/database.db
    
  3. 3. Install
    git clone https://github.com/neverinfamous/db-mcp.git
    
  4. 4. Run
    cd db-mcp
    
  5. 5. Install
    pnpm install
    
  6. 6. Install
    pnpm run build
    

Overview

db-mcp (SQLite MCP Server) MCP server connects AI clients to SQLite through more than 170 specialized tools for queries, CRUD, search, analysis, schema inspection, migrations, and administration. It supports HTTP/SSE transport, OAuth 2.1 authentication, granular access scopes, audit logging, resources, prompts, and configurable tool filtering. Choose it when an agent needs broad SQLite access with observability, access control, or either WASM or native better-sqlite3 execution.

Use cases

  • Query and update SQLite databases from an AI client
  • Search SQLite data with FTS5, vector, or hybrid retrieval
  • Inspect schemas and recommend database indexes
  • Audit database activity and monitor health metrics
  • Expose controlled database access with OAuth scopes

Key features

  • More than 170 SQLite tools
  • HTTP/SSE transport with OAuth 2.1
  • WASM and better-sqlite3 variants
  • Audit logging with DDL snapshots
  • MCP resources, prompts, and subscriptions
  • Configurable tool filtering and access scopes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

13/13 checks healthy over the last 83d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars13Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How DB Mcp (SQLite MCP Server) works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about DB Mcp (SQLite MCP Server)

db-mcp (SQLite MCP Server) is an MCP server that connects AI clients to SQLite databases through tools for CRUD, JSON, FTS5 search, vector search, analysis, schema inspection, migration, and administration. It also supports HTTP/SSE, OAuth 2.1, auditing, resources, prompts, and configurable access controls.

It identifies npm and Docker distribution links and offers WASM and better-sqlite3 variants, so consult the repository or package documentation for the installation method and runtime-specific configuration.

Yes, db-mcp (SQLite MCP Server) supports OAuth 2.1 authentication with granular scopes. The documented scope patterns include full, read, write, admin, database-level, and table-level access, and Keycloak integration is supported.

Yes, db-mcp (SQLite MCP Server) supports vector search and a hybrid search tool that combines FTS5 full-text results with vector similarity using reciprocal rank fusion. The server also includes prompts for guided hybrid search workflows.

Yes, database auditing is built in. The server records audit information, creates DDL backup snapshots, exposes audit data through MCP resources, and provides a sqlite_audit_search tool for investigation and compliance workflows.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDB Mcp (SQLite MCP Server) AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/db-mcp-sqlite-mcp-server?style=directory)](https://allmcps.com/mcp/db-mcp-sqlite-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/db-mcp-sqlite-mcp-server"><img src="https://allmcps.com/api/badge/db-mcp-sqlite-mcp-server?style=directory" alt="DB Mcp (SQLite MCP Server) on AllMCPs" /></a>