nlqdb — analytical memory for AI agents

com.nlqdb由 nlqdb.com 發布官方發布者v0.1.1更新於 Oct 24, 2026

Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

已驗證Streamable HTTP可網頁執行資料庫資料與分析AI 與機器學習

概覽

AI 產生的概覽

託管式 MCP 伺服器,讓 AI 助理用自然語言查詢真實的 Postgres 或 D1 資料庫,並回傳實際執行的 SQL。

可以做什麼
  • 用自然語言向已連線的 Postgres 或 Cloudflare D1 資料庫提問,由服務推斷結構並產生 SQL
  • 透過同一服務提供的託管 HTTP 介面執行查詢與插入
  • 依名稱或目標建立資料庫,再用自然語言與它對話
  • 每次回答附上實際執行的 SQL 與信心訊號
  • 接上現有資料庫,由服務提出變更建議、套用並量測成效
適用情境
適合需要讓助理對真實業務資料做彙總、合併與分組,而不只是回想筆記的情境,也適合不想自建後端卻想用自然語言寫 SQL 的團隊。較適合能接受答案尚未完美、並會核對回傳 SQL 的早期使用者。
執行需求
透過 streamable HTTP 連線 mcp.nlqdb.com 遠端端點,並在瀏覽器完成 OAuth 授權。無瀏覽器的主機改用本機 npm 套件並搭配 sk_mcp_* MCP 金鑰。需要一個 Postgres 或 Cloudflare D1 資料庫與 nlqdb 帳號;免費方案使用內建開源模型,付費方案或自備 LLM 金鑰為選項。
安裝前請注意
此服務會連線你的資料庫並具備寫入能力:它會提出變更、套用經核准的變更並可回復,API 也包含插入與執行介面。自然語言轉 SQL 的準確率仍低於專案公開標準,答案可能出錯,應核對 SQL 與信心值。查詢與資料會送到第三方託管服務,用戶端程式片段中會內嵌 API 金鑰。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 nlqdb — analytical memory for AI agents,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.nlqdb%2Fnlqdb/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "nlqdb-analytical-memory-for-ai-agents": {
      "type": "http",
      "url": "https://mcp.nlqdb.com/mcp"
    }
  }
}

README

nlqdb — your autonomous DBA.

nlqdb attaches to the Postgres or Cloudflare D1 database you already run, proposes the changes it needs, applies the ones you approve, measures them, and reverts any that regress.

Why it exists: the mission — encapsulate the trial-and-error journey every company walks to a good database infrastructure.

Where it is going (docs/END_GOAL.md): paste a connection string — on nlqdb.com, with the CLI, through the SDK, or from your coding agent over MCP — and the first proposals arrive within minutes, each with its expected effect, cost and inverse. Apply is one click; nlqdb then measures p95 on the same queries and keeps the change or reverts it, never on your app's request path. That loop is being built (Roadmap); what is live today is the hosted product below.

No backend to build. You write HTML; each component asks for what it wants in plain English; nlqdb infers the schema, writes the SQL, runs it, and renders the result. There is no backend for you to build.

Two actions. That's the whole product:

  1. Create a database — one word: a name (or a goal).
  2. Talk to it in plain English.
html
<script src="https://elements.nlqdb.com/v1.js" type="module"></script>
<nlq-data  goal="the 5 newest orders, with customer and item"  api-key="pk_live_xxx"  template="table"  refresh="10s"></nlq-data>

That's the entire backend for a live order list — no API to write, no schema to define, no JSON to parse. Engine choice (Postgres / Mongo / Redis / DuckDB / pgvector / …), schema inference, indexing, backups, and auto-migration between engines based on your real workload are background concerns you never have to see.

Status — early, open

nlqdb is early and built in the open, but fully public — no gate, no invite code. The marketing site, the /v1/ask pipeline, the <nlq-data> / <nlq-action> elements, the chat app, the TypeScript SDK, the hosted MCP server, and the nlq CLI are all live in some form (see the surface table below). Natural-language → SQL accuracy is still climbing toward our public bar (BIRD ≥ 0.65, Spider 2.0 ≥ 0.75 on the free model chain), so answers can be wrong — every response carries a confidence signal and the SQL it ran.

Use it

Connecting an agent over MCP? On Claude Code, one marketplace add wires the hosted server and both memory skills in a single step:

/plugin marketplace add nlqdb/nlqdb/plugin install nlqdb-memory@nlqdb

On any other MCP host, connect your agent with one browser-OAuth approval; headless hosts skip the browser with npx -y @nlqdb/mcp and an sk_mcp_* MCP key (MCP setup). @nlqdb/sdk and @nlqdb/mcp are both published and importable from npm.

The 60-second walkthrough — plain HTML, CLI, and ten framework wrappers — lives at docs.nlqdb.com. Start with the HTML tutorial or the CLI tutorial.

You don't generate an API key separately: describe your database at nlqdb.com, and the chat hands you a <nlq-data> snippet with the key already inlined.

Examples

examples/ — minimal scaffolds in plain HTML, Next.js, Nuxt, SvelteKit, Astro, plus a CLI-only walkthrough. Each is the smallest valid integration around one <nlq-data> element or one CLI session.

What makes it different

Four things every release has to move, none allowed to regress (GLOBAL-025):

  • Engine quality — natural-language → SQL accuracy (measured continuously on BIRD + Spider 2.0 + an internal eval), plus the multi-engine layer that moves your data to the right engine for your workload.
  • Onboarding — landing to first answer in under a minute, no card, no config.
  • UX — see the diff before any write, see the SQL behind every answer, and on low confidence get a one-click clarify — a guided turn, never a dead-end, and never a silent guess.
  • Performance — sub-400 ms cached, sub-1.5 s cold.

The bet: get this right on free, open models and it only gets better on frontier ones — the scaffolding compounds with whatever model is underneath.

Models & plans

  • Free forever on the built-in open-model chain — queries, embeds, and the elements, no card required.
  • Bring your own LLM key (Anthropic / OpenAI / Gemini / Grok / OpenRouter) on any tier, at no markup.
  • Hosted premium models on paid plans, when you'd rather not manage a key of your own.
  • Self-host the source — the engine, CLI, MCP server, and SDKs are source-available under FSL-1.1-ALv2: free to self-host for any non-competing use, bring your own LLM key, no per-call fees. The license auto-converts to Apache 2.0 two years after each release.

The hosted-premium model lane went live 2026-08-14. The full model strategy is in GLOBAL-026.

Surfaces at a glance

SurfaceStatusWhere
HTTP API (POST /v1/ask, POST /v1/run, POST /v1/insert)✓ shippedapps/api/src/ask/**
<nlq-data> + <nlq-action> elements✓ shipped (v0.1)packages/elements/**
@nlqdb/sdk (TypeScript)✓ shipped (incl. runSql + cross-tenant grant + pack-import runner verbs) — installable from npm; insert() and runSql params publish in 0.5.0packages/sdk/**
Framework wrappers (React / Next / Vue / Nuxt / Svelte / SvelteKit / Astro / Solid + Swift)~ built + CI-tested; npm / SPM publish pendingpackages/{react,next,…}/**
Chat app nlqdb.com/app✓ shippedapps/web/**
Hosted MCP server mcp.nlqdb.com/mcp✓ shipped (host auto-detect pending)apps/mcp/**, packages/mcp/**
Local stdio MCP server @nlqdb/mcp✓ shipped — npx -y @nlqdb/mcp with an sk_mcp_* keypackages/mcp/**
Droppable agent artifacts (AGENTS.md · Claude Code skill + plugin · Cursor rules · Codex config)✓ shipped — /plugin marketplace add nlqdb/nlqdb installs the server + skills in one stepapps/web/public/agent-artifacts/**
nlq CLI (Go)✓ shipped (core verbs; device-login pending)cli/**

Full integration matrix in docs/progress.md.

Packages on npm

Published to the public npm registry with build provenance (SK-CIPERM-003). Version badges are live from npm; the table itself is generated from the workspace by scripts/sync-readme-packages.mjs, so it lists exactly the packages that are un-gated ("private" removed) and nothing that isn't.

PackageVersionWhat it isSource
@nlqdb/cli[@nlqdb/cli]Shim that installs the nlq CLI binary for the host platform.packages/cli-shim
@nlqdb/mcp[@nlqdb/mcp]Analytical-memory MCP server for nlqdb — a real database your AI agent can GROUP BY / JOIN / aggregate over in natural language, not just recall.packages/mcp
@nlqdb/sdk[@nlqdb/sdk]Typed HTTP client for the nlqdb /v1 API — works in browsers, Node, Bun, Workers.packages/sdk

Roadmap

The section below is the live focus; the numbered phases after it are the hosted product's roadmap, kept until the GLOBAL-043 deletion series. Canonical plan + exit gates: docs/phase-plan.md. Legend: ✓ shipped · ~ in progress · ◯ planned.

This roadmap is yours to shape. Want something added, reprioritised, or dropped? Open a PR editing this section (and docs/phase-plan.md if it's engine-facing), or open an issue to float it first. Say why now — which of the four north-star pillars (engine quality, onboarding, UX, performance) it moves. New to the codebase? Point your coding agent at this repo and paste:

Read README.md and docs/phase-plan.md, then propose a roadmap change:add/change "<your idea>" under the right section in one line, with a"why now" naming which north-star pillar it moves. Open a PR with justthat edit — no code.

Setup, branch naming, and the CLA are in CONTRIBUTING.md.

Now — attach to the database you already run (GLOBAL-043)

One loop — observe → propose → apply → verify → revert — on your Postgres (Supabase, Neon, RDS) or Cloudflare D1. Plan, KPIs and exit gate: GLOBAL-043.

  • ~ /app/dba change ledger — every change with its inverse, newest first; Apply / Reject on each proposal
  • ~ Attach product on synthetic databases — observer, create_index proposal, apply → verify → auto-revert, the four doors (the web door, paste a Postgres string at /app/connect then Apply / Reject in /app/dba, the API door, POST /v1/attach / client.attach() with client.applyProposal() / rejectProposal(), the CLI door, nlq attach / nlq proposals / nlq apply / nlq reject, and the MCP door, nlqdb_connect_database / nlqdb_list_proposals / nlqdb_apply_proposal / nlqdb_reject_proposal; the web, API, CLI and stdio MCP (@nlqdb/mcp 0.4.0) doors are live; hosted mcp.nlqdb.com serves the MCP tools once its held deploy runs; verify runs on its own once an applied proposal's 72 h window has passed), tested in CI
  • ◯ Postgres spike — one index proposed, applied and measured (before/after p95) on a real-traffic database
  • ◯ D1 attach on the real rateme12 — the dogfood
  • ◯ The playbook — unused-index drops, bloat, retypes, partitioning, retention, placement

Phase 0 — Foundations ✓

Worker skeleton · KV + D1 + R2 bindings · Neon adapter + OTel · LLM router (free chain) · Better Auth (GitHub + Google + magic link) · /v1/ask end-to-end · events queue + drain · Stripe webhook · CI/CD + PR preview environments.

Phase 1 — On-ramp

A stranger lands on nlqdb.com, creates a DB in plain English, embeds it, and shares the link — in under 60 seconds, no card, no config.

  • ✓ Marketing site (Astro, live at nlqdb.com)
  • ✓ <nlq-data> + <nlq-action> elements (v0.1)
  • ✓ Sign-in — magic link + GitHub + Google
  • ✓ Chat surface — streaming three-part response (answer / data / trace), anonymous mode
  • ✓ Anonymous mode — 72h token, adopted onto your account on sign-in
  • ✓ Hosted db.create pipeline (table-card embeddings stubbed pending the pgvector slice)
  • ✓ API keys dashboard (/app/keys)
  • ◯ Hello-world tutorial polish

Phase 1.5 — Trust + telemetry

  • ✓ Diff preview on writes + visible SQL trace on every response
  • ✓ Demand-signal telemetry on every "not yet" path
  • ◯ Confidence floor (clarify-on-low-confidence — a guided turn, not a dead-end) — lands with quality-eval

Phase 2 — Distribution (agent + developer surfaces)

  • ✓ Hosted MCP server (mcp.nlqdb.com/mcp) — host auto-detect pending; local stdio @nlqdb/mcp is on npm, so npx -y @nlqdb/mcp with an sk_mcp_* key is a headless route in with no browser consent step (/agents now carries it; the per-host install panel is still OAuth-only). On Claude Code, /plugin marketplace add nlqdb/nlqdb installs the server + both memory skills in one step
  • ✓ CLI nlq (Go) — core verbs + raw-SQL escape hatch; device-login + chat REPL pending
  • ✓ @nlqdb/sdk — basic methods + runSql + cross-tenant grant + pack-import runner verbs; published and importable from the registry; insert() and runSql params publish in 0.5.0
  • ~ Framework wrappers + native Swift package — built + CI-tested; npm / SPM publish pending
  • ✓ Quality-eval harness (BIRD + Spider 2.0) — a CI regression alarm for the NL→SQL interface, not a KPI
  • ~ Bring-your-own-LLM dispatch — HTTP lane live; remaining surfaces in progress
  • ◯ CSV upload in chat
  • ~ Docs-site reference completeness — SDK + framework-wrapper guides, an enumerable error-code reference, and a build-time /llms.txt for agents now live; tutorial polish remains
  • ◯ Custom domains for embeds

Phase 3 — Multi-engine engine (the moat)

  • ◯ Workload analyzer → migration orchestrator
  • ◯ ClickHouse / DuckDB / Redis as additional engines
  • ◯ Dual-read verification
  • ✓ Hosted-premium model lane (demand-gated) — live 2026-08-14 (PREMIUM_METER_LIVE flipped)

Phase 4 — Beyond v1

  • ~ Bring-your-own Postgres / ClickHouse — connect path live end-to-end (POST /v1/db/connect + web UI, CLI, SDK, query dispatch); prod-gated on the BYO_SECRET_KEK secret. Supabase adds one-click OAuth connect over the read-only Management-API (no DSN to paste); prod-gated on the SUPABASE_OAUTH_CLIENT_ID / _SECRET secrets, with a graceful fall-back to paste when unset
  • ◯ SSO (SAML / OIDC), audit-log export, per-org quotas
  • ◯ EU data residency, VPC peering, SOC 2

Develop locally

bash
git clone [email protected]:nlqdb/nlqdb.git && cd nlqdbscripts/bootstrap-dev.sh   # installs everything, pulls Ollama models, seeds .envrcscripts/login-cloud.sh     # signs you into cloud providers that have a CLI flow

bootstrap-dev.sh stands up the whole toolchain in one shot — Bun, Node 20+, Go 1.25+, uv; Biome / gofumpt / golangci-lint / ruff; lefthook git hooks; the cloud CLIs (wrangler, flyctl, stripe, gh); a local Ollama so the LLM router works offline; and a .envrc with self-generated dev secrets. Details in docs/history/infrastructure-setup.md §8.

Day-to-day:

bash
bun run fix          # biome format + lint --write (most issues)bun run check:all    # biome + golangci-lint + ruff (what CI runs)bun run hooks:run    # run pre-commit hooks against staged files

End-to-end tests (manual trigger)

E2E coverage is persona-driven and manually triggered so cost stays inside the free-tier envelope — one workflow_dispatch workflow per surface:

bash
gh workflow run e2e-opencheck.yml             # web — live LLM, Neon branch, Workers previewgh workflow run e2e-cli.yml                   # Go testscript, hermeticgh workflow run e2e-sdk.yml                   # vitest + cassettes, hermeticgh workflow run e2e-mcp.yml                   # InMemoryTransport protocol tests, hermeticgh workflow run e2e-examples.yml              # Playwright across HTML/Next/Astro/Nuxt/SvelteKitgh workflow run e2e-examples.yml -f live=true # + staging for the curl + CLI shell smokes

Run the hermetic surfaces locally without GitHub:

bash
( cd tests/e2e/cli && go test ./... )( cd tests/e2e/sdk && bun install && bun run test )( cd tests/e2e/mcp && bun install && bun run test )( cd tests/e2e/examples && bun install && bun run install:browsers && bun run test )

Only execution is manual: tests/e2e/{sdk,mcp,examples} live outside the root workspace, so CI's typecheck-e2e job tscs them on every PR — the free backstop against a suite that compiles today and rots before the next dispatch.

Conventions, persona mapping, and cassette governance are in docs/features/e2e-coverage/FEATURE.md.

Docs & reference

Community & legal

License

FSL-1.1-ALv2 — Functional Source License, Apache 2.0 future license. Source-available for any non-competing use; auto-converts to Apache 2.0 two years after each release. (Pattern used by Sentry, Convex, and others.)

nlqdb™ is an unregistered trademark of the project's licensor. See TRADEMARKS.md for usage guidelines.

來源:README.md,提交 4139a21

工具

0
該伺服器需要登入,因此 SourceWeft 無法在沒有帳號的情況下讀取其工具,也未收錄。已連接帳號所能看到的內容可能因帳號及其權限而異。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 75%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。