SQLite MCP Server

SQLite MCP Server

sqlite-mcp-server•byisaacgounton

A Model Context Protocol server that provides SQLite database operations over stdio or Streamable HTTP transports.

License: ISC•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Works with in-memory or file-based SQLite databases and exposes SQL read and write query tools.
  • •Supports table management operations: create, drop, list, and describe tables.
  • •Exposes the database schema as an MCP resource and tracks a business insights memo.
  • •Serves MCP messages over a Streamable HTTP endpoint with session management and an optional bearer token.

BEST FOR

  • •Querying or modifying a SQLite database from an MCP client such as Claude Desktop or Cursor.
  • •Connecting remote MCP-compatible clients to a SQLite database over HTTP.
  • •Inspecting table structure and accumulating analysis insights alongside database work.

ABOUT SQLITE-MCP-SERVER

SQLite MCP Server is cataloged as an MCP server attributed to isaacgounton. A Model Context Protocol server that provides SQLite database operations over stdio or Streamable HTTP transports. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: ISC. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for SQLite MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can it enforce authentication on HTTP connections?

Yes, setting MCP_AUTH_TOKEN requires a bearer token on every /mcp request, while /health stays open.

How does it protect against SQL injection?

Each tool only accepts its intended statement type, stacked statements are rejected, and table names are validated against a regex.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4146b0aa23d1 · 采集于 2026-11-13 11:48:20 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

SQLite MCP Server

CI License: ISC smithery badge

A Model Context Protocol (MCP) server that provides SQLite database operations. Supports both stdio (for Claude Desktop, Cursor, etc.) and Streamable HTTP (for remote clients) transports.

Features

  • In-memory or file-based SQLite database
  • Dual transport: stdio and Streamable HTTP
  • SQL operations with input validation and injection protection
  • Table management (CREATE, DROP, LIST, DESCRIBE)
  • Database schema exposed as an MCP resource
  • Business insights memo tracking
  • Docker support

Quick Start

Stdio (Claude Desktop, Cursor, etc.)

npm install && npm run build
node build/index.js

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "sqlite": {
      "command": "node",
      "args": ["/path/to/sqlite-mcp-server/build/index.js"]
    }
  }
}

With a file-based database:

{
  "mcpServers": {
    "sqlite": {
      "command": "node",
      "args": ["/path/to/sqlite-mcp-server/build/index.js", "/path/to/database.db"]
    }
  }
}

Streamable HTTP (remote clients)

node build/index.js --http

The server exposes a single endpoint at http://localhost:3000/mcp following the MCP Streamable HTTP specification. By default it binds to 127.0.0.1. To reach it from another host or a container, set HOST=0.0.0.0 — but read the Security section first: the HTTP transport has no authentication.

Docker

docker build -t sqlite-mcp-server .
docker run -d -p 3000:3000 -e HOST=0.0.0.0 --name sqlite-mcp sqlite-mcp-server

HOST=0.0.0.0 is required so the server is reachable through the published port. Connecting from the host via localhost:3000 works out of the box; to reach it under any other hostname, add that host to MCP_ALLOWED_HOSTS.

Configuration

OptionDescriptionDefault
--httpUse Streamable HTTP transport instead of stdiostdio
First non-flag argumentPath to SQLite database file:memory:
SQLITE_DB_PATHDatabase path (env var alternative):memory:
PORTHTTP server port (HTTP mode only)3000
HOSTInterface to bind in HTTP mode. Use 0.0.0.0 to expose beyond localhost127.0.0.1
MCP_ALLOWED_HOSTSComma-separated Host header allow-list for DNS-rebinding protectionlocalhost:$PORT,127.0.0.1:$PORT
MCP_AUTH_TOKENBearer token required on all /mcp requests (HTTP mode). Unset = auth disabled(none)

Examples:

# In-memory database on stdio
node build/index.js

# File-based database on stdio
node build/index.js ./data.db

# HTTP mode with custom port
PORT=8080 node build/index.js --http ./data.db

# Using environment variable
SQLITE_DB_PATH=./data.db node build/index.js --http

Available Tools

ToolDescription
read_queryExecute SELECT, WITH (CTE), or EXPLAIN queries
write_queryExecute INSERT, UPDATE, DELETE, or REPLACE queries
create_tableCreate a new table with a CREATE TABLE statement
drop_tableDrop a table (irreversible)
list_tablesList all user-created tables
describe_tableGet table schema: columns, indexes, and foreign keys
append_insightAdd a business insight to the memo resource

Resources

URIDescription
sqlite://{db}/schemaFull schema (CREATE statements) for all tables
memo://insightsAccumulated business insights from analysis

Prompts

NameDescription
mcp-demoGuided walkthrough: creates tables, inserts sample data, runs queries for a given topic

Remote Connection

Streamable HTTP

Connect any MCP-compatible client to http://your-host:3000/mcp. The server supports:

  • POST /mcp — send MCP messages (session created on initialize)
  • GET /mcp — SSE stream for session resumability
  • DELETE /mcp — terminate a session
  • GET /health — health check endpoint

Sessions are managed via the Mcp-Session-Id header.

Authentication

Set MCP_AUTH_TOKEN to require a bearer token on every /mcp request (/health stays open):

MCP_AUTH_TOKEN=$(openssl rand -hex 32) HOST=0.0.0.0 node build/index.js --http

Clients then send Authorization: Bearer <token>. When MCP_AUTH_TOKEN is unset, authentication is disabled — fine for a localhost-only bind, but do not expose the server publicly without it.

Security

  • Query validation: each tool only accepts its intended SQL statement type
  • Multi-statement injection blocked: stacked statements are rejected, with string literals and comments stripped before the check
  • Table names validated against ^[a-zA-Z_][a-zA-Z0-9_]*$
  • Foreign keys enabled by default
  • HTTP transport binds to 127.0.0.1 by default, with DNS-rebinding protection (MCP_ALLOWED_HOSTS)
  • Optional bearer-token auth on the HTTP transport via MCP_AUTH_TOKEN (timing-safe check)

Set MCP_AUTH_TOKEN before exposing the HTTP transport beyond localhost. For production, also front it with a reverse proxy that terminates TLS. See SECURITY.md for the full model and how to report a vulnerability.

Development

npm install
npm run build
npm test           # build + run the validator test suite
npm start          # stdio mode
npm run start:http # HTTP mode

License

ISC

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for SQLite MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/sqlite-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage