
LiteScope
io.github.croc100由 GitHub 账号 croc100 发布v0.9.0更新于 Oct 24, 2026
Operations toolchain for SQLite, Cloudflare D1 & Turso: inspect, diff, migrate, monitor & repair.
发布方自己的服务:Scope (AEC) - Preview
概览
LiteScope 为 AI 助手提供检查、对比、迁移、监控与安全修复 SQLite 文件、Cloudflare D1 和 Turso 数据库的工具。
- 可以做什么
- 列出 D1 数据库,并对 D1 或本地 SQLite 文件执行带行数预算的 SELECT 查询
- 检查表结构、健康状态、锁、快照,并对比两个数据源的表结构或行数差异
- 生成迁移 SQL 并分析影响范围,给出索引与性能建议
- 开启写入后:变更 SQL 与迁移默认先试运行,再应用并自动生成回滚令牌
- 撤销写入、将 D1 回滚到某个时间点、拉取、创建或删除 D1 数据库,以及本地快照与恢复
- 提供提示词和可订阅资源,涵盖表结构、数据字典、健康与锁诊断
- 适用场景
- 适合助手需要处理生产或开发环境中的 SQLite 数据时使用:上线前审查迁移、诊断锁或 WAL 问题、比较本地与线上表结构,或执行必须可回退的变更。
- 运行要求
- 以 stdio 在本地运行,通常通过 npm 包的 npx 启动。Cloudflare D1 数据源需要 CLOUDFLARE_API_TOKEN 和 CLOUDFLARE_ACCOUNT_ID;Turso 数据源在 DSN 中携带令牌。写入工具默认关闭,需以 --allow-writes 启动。访问 D1 和 Turso 需要网络。
安装
在 SourceWeft 中
- 打开 控制台中的 LiteScope,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Litescope
Let AI agents touch production SQLite — safely. Diagnose before the write, rewind after it. For Cloudflare D1, Turso, and local files.
[License: AGPL v3] [Go] [Cloudflare D1] [Turso] [Contributors] [Litescope MCP server]
Ask Claude to change your D1 database — and undo it if it's wrong. Every write is dry-run by default with the exact blast radius, and one call away from revert.
Free and open source (AGPL-3.0) — every command, every fleet operation, self-hostable, no license key. The only paid thing is the hosted dashboard we run for you.
Why a tool for SQLite?
"It's just a file — what's there to operate?"
That was true when SQLite was a local dev toy. It isn't anymore. D1, Turso, LiteFS, and Litestream put SQLite in production at fleet scale — thousands of databases, one per tenant. But the tooling never caught up:
sqlite3assumes one database. Production assumes thousands. There's nopg_stat, no APM, no standard way to see from the outside why a database is locked, why WAL is bloating, or which tenant went silent.- Embedded means unobservable. The very thing that makes SQLite great — no server — is what leaves you blind in production.
- Agents now write to your data. No SQLite tool was built assuming an AI would run the migration. Litescope was.
Postgres has a mature tool for every problem. SQLite has none — so Litescope is one binary for the whole job: fleet observability, file-level superpowers (bisect / rewind / salvage), lock & WAL diagnostics, and a safe interface for agents. Things a generic DB client structurally can't do.
MCP — Give Claude direct access to your D1
Claude Code — install the plugin, which brings the MCP server plus five skills (lock doctor, safe writes, migration review, fleet sweep, corruption recovery) that teach the agent how to use it when something is wrong:
Or just the MCP server, one line (read-only):
With writes + D1 (Litescope still dry-runs every write and captures a rewind point before applying):
Cursor — one-click:
➕ Add litescope to Cursor
(installs read-only; add --allow-writes and the Cloudflare env vars in
mcp.json to enable writes).
Claude Desktop / Windsurf / any MCP client — add to the config file directly:
Also listed in the MCP Registry
as io.github.croc100/litescope.
Then ask Claude things like:
Read-only tools (always available)
litescope_query enforces token budgeting — max_rows cap + columns
projection + truncation reporting — so a large table never blows the agent's
context window.
Write tools (--allow-writes)
Write tools are off unless you start the server with --allow-writes, every
write is dry-run by default, and no write commits without an auto-captured undo
point. See the security model for the full boundary — what each
layer protects against, and what it doesn't.
Prompts & Resources
Beyond tools, the MCP server exposes prompts — canned workflows like
diagnose_locked_database, review_migration, safe_optimize, and
health_checkup that chain the tools above into a safe plan — and
resources: a database's schema, data dictionary, live health, and live lock
diagnosis — readable by the agent without spending a tool call, and
subscribable for push updates whenever the underlying file changes. Bind one
with litescope mcp ./app.db, or address any source via
litescope://schema/{source}, litescope://dictionary/{source},
litescope://health/{source}, and litescope://locks/{source}.
The server implements MCP 2026-07-28, the stateless revision: server/discover,
per-request protocol metadata, resultType, caching hints (ttlMs /
cacheScope), and subscriptions/listen streams — alongside tool annotations
(read-only / destructive hints), structured output (structuredContent +
outputSchema) and argument completion. It is dual-era: a client that still
opens with the initialize handshake is served MCP 2025-06-18 unchanged, so
older MCP clients keep working.
Interactive views (MCP Apps)
Four tools answer with an interactive panel rendered inside the conversation,
via the MCP Apps
extension (io.modelcontextprotocol/ui):
The views are single self-contained documents compiled into the binary. They load nothing from the network, so the host's strictest CSP applies and a database's contents cannot leave the iframe. They never write, either: a button that would apply or undo a write hands the request back to the conversation, because a click inside an embedded panel is not the user approving a production write. A host without the extension gets the same results as text.
Remote / hosted (Streamable HTTP)
By default litescope mcp speaks stdio. For a hosted, remote, or multi-client
setup, serve over the Streamable HTTP transport instead:
POST a JSON-RPC message to the endpoint (/mcp by default). Modern clients are
served statelessly — no session — with each request carrying its own protocol
metadata and the standard MCP-Protocol-Version / Mcp-Method / Mcp-Name
headers, and change notifications arriving on a subscriptions/listen response
stream. Handshake-era clients still get a session via the Mcp-Session-Id
header and a GET SSE stream.
Before exposing it publicly, lock it down: --http-token (or the
LITESCOPE_MCP_TOKEN env var) requires Authorization: Bearer <token> on every
request, and --http-origin allowlists browser Origins (localhost is always
allowed) for DNS-rebinding protection. Without a token the endpoint is open and
the server prints a warning.
D1 — CLI operations
Rewind — D1 Time Travel
Pull / Push — sync between D1 and local SQLite
Migrate — schema changes on D1
Bisect — find which commit broke a D1 database
Binary-search D1 Time Travel to pinpoint the exact snapshot where a query started returning wrong results:
Checks gt:0 (greater-than), lt:N, eq:N, or a literal value. Narrows
to the snapshot window where the condition first failed, then lets you
inspect or rewind.
Local SQLite
doctor — one-shot checkup
Combines integrity check, WAL/fragmentation health, index advisor, and schema lint in one command. Exits 1 when attention is needed — use it as a CI quality gate.
snapshot / restore — point-in-time backups
Snapshots live in a sibling .litescope-snapshots/ directory. Restore is
integrity-checked and takes a pre-restore safety snapshot first — the same
"did you back up?" safety net that D1 gets from Time Travel, for local and Turso.
autopilot — self-driving optimization
Runs ANALYZE + PRAGMA optimize, adds missing foreign-key indexes, and
(with --aggressive) VACUUMs and drops redundant indexes — each explained in
plain language. Dry-run by default; every real change is preceded by an
automatic snapshot.
locks — diagnose "database is locked"
Inspects journal mode, busy_timeout, locking mode, and WAL bloat, and
prescribes the exact PRAGMA/DSN fix. --live identifies the process holding
the lock right now. --watch records every observation to a local history
store; --timeline then aggregates it into a per-database contention view —
when the database was jammed, for how long, which processes held it, wait-time
percentiles, and whether the WAL checkpoint kept up.
diff — schema and data diff
migrate — generate and apply migrations
migrate apply safety sequence: pre-flight integrity check → VACUUM INTO backup → single transaction → FK verification → auto-rollback on failure.
lint — schema anti-patterns
Rules: no-primary-key, untyped-column, not-strict, autoincrement-overhead, non-integer-pk.
schema — inspect schema + ERD
dump — portable SQL export
import / export — spreadsheets and SQLite
Formats: CSV, TSV, JSON, Excel (.xlsx). No external dependencies.
monitor — schema drift detection
serve — local web dashboard
Fleet topology map, health triage, schema fingerprinting, interactive ERD, a paginated data browser with a visual query builder, drag-drop import, and a visual diff panel — pick any two databases to review schema and row-count changes before applying. Entirely local, no account required.
Fleet
Manage hundreds of databases at once. Built for multi-tenant apps on Turso and D1.
CI — GitHub Action
Run Litescope on every pull request — lint the schema, diff against the base branch, and comment the blast radius so a risky migration can't merge unreviewed.
args is any Litescope command; the job exits non-zero when Litescope flags
something, failing the check. See
examples/github-actions/migration-ci.yml
for a full lint + diff workflow.
Install
Homebrew
npm / npx — for JS and wrangler users, no separate install:
Go install
Binary download
macOS, Linux, Windows — Releases.
Remote sources
Pricing — what's free
The tool is free. We only charge to run the dashboard for you.
The line is simple: the software and every feature is free and self-hostable forever. You pay only if you want us to host and operate the dashboard so you don't have to. No feature is locked behind a license key.
See litescope-site.pages.dev/pricing for the hosted plans.
License
Litescope is AGPL-3.0. Free to use, modify, and self-host. If you offer it as a network service the AGPL requires you to share your modifications. A commercial license (AGPL exception + support SLA) is available for organizations — see COMMERCIAL.md or email [email protected].
来源:README.md,提交 db812d2
工具
0版本历史
2- v0.9.0最新Sep 26, 2026
- v0.8.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Scope 集成

Scope (AEC) - Preview
bid.scope官方发布者
Scope(AEC)预览版服务器:查询分包采购层的状态与路线图、列出计划中的服务类别、加入候补名单,并改期已授标项目。

Scope (Legal)
bid.scope官方发布者
Scope(法律版)让 AI 助手浏览法律服务专业人员、派发案件,并管理由此产生的委托事务。

Scope (Claims) - Preview
bid.scope官方发布者
Scope 理赔侧专业采购的预览版服务器:查询 V2 状态与服务类别、加入等候名单,并改期已授标的理赔项目。

MintScope — NFT collection analysis
由 GitHub 账号 ert1981 发布
NFT系列风险与质量分析,以及新系列发现(OpenSea + 链上)。AI 翻译

FedScope MCP
由 GitHub 账号 CYAN-ECLIPSE-TECHNOLOGIES-LLC 发布
FedScope MCP 让助手搜索联邦与州政府招标机会,并提供匹配度、新进入者评分和通俗语言摘要。