QuestDB Web Console MCP Server

io.github.questdb由 GitHub 账号 questdb 发布v0.5.0更新于 Oct 24, 2026

Connects coding agents to a running QuestDB Web Console: notebook cells, SQL queries, and charts.

已验证STDIO仅桌面数据库数据与分析

概览

AI 生成的概览

将编码代理连接到正在运行的 QuestDB Web Console,使其能在用户已打开的浏览器标签页中创建笔记本单元格、执行 SQL 查询并生成图表。

可以做什么
在 QuestDB Web Console 中创建和更新笔记本单元格,包括编辑单元格内容并从中执行查询(update_cell、run_query)。根据查询结果在控制台中生成图表。通过获取配对凭据并完成同意提示,将浏览器会话与桥接器配对。将工具调用和结果写入 stderr 和日志文件以便排查问题。
适用场景
当你已经在 QuestDB Web Console 中工作,并希望编码代理针对当前会话起草 SQL、填写笔记本单元格或生成图表,而不是直接连接 QuestDB 时适用。
运行要求
本地 Node.js 运行时(独立包需 Node 22 或更高)和 npx,或来自 GitHub Release 的独立 .mjs 包。需要可通过 CONSOLE_ORIGIN 访问的 QuestDB Web Console(默认 MCP_BRIDGE_PORT、LOG_PATH 和 LOG_LEVEL。任何工具可用前都需要在浏览器中配对并确认同意提示。
安装前请注意
所有操作都在浏览器中针对你已建立的 QuestDB 会话执行,因此代理可以在该控制台中执行查询并修改笔记本单元格。配对使用代理显示的 WebSocket URL 和令牌;仅在你信任该客户端时才接受同意提示。每次桥接运行都会生成新的端口和仅存于内存的令牌,重启后旧凭据失效。DEBUG 日志会将完整工具负载(包括查询文本)写入日志文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 QuestDB Web Console MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

QuestDB MCP Server

An MCP server that connects coding agents (Claude Code, Codex, Cursor, OpenCode, Gemini CLI) to a running QuestDB Web Console. The agent gets tools to create notebook cells, run queries, and build charts. Every action executes in the browser against your already-established QuestDB session.

Setup

Quick setup (recommended)

The interactive wizard detects your installed coding agents and writes the bridge into each one's MCP config:

bash
npx @questdb/mcp-server-questdb setup

It walks you through two steps:

  1. Pick agents: multi-select from the ones it detects (Claude Code, Codex, Cursor, OpenCode, Gemini CLI).
  2. Review settings: optionally override CONSOLE_ORIGIN and MCP_BRIDGE_PORT; press Enter to keep the defaults.

The wizard pins each agent's config to the bridge version that ran it. Your QuestDB Web Console expects a specific bridge version. If you're on an older console, run the matching version: npx @questdb/mcp-server-questdb@<version> setup. The config it writes will launch that same version. (When unsure, pair first; on a version mismatch the agent is told which version to switch to.) For versions earlier than 0.3.0, use the former package name instead: npx @questdb/mcp-bridge@<version> setup.

Manual setup

Or add it to your MCP client's config by hand (e.g. ~/.claude/.mcp.json):

json
{  "mcpServers": {    "questdb": {      "command": "npx",      "args": ["-y", "@questdb/mcp-server-questdb"]    }  }}

Offline / restricted install (no npx)

Environments that can't run npx (no npm registry access, vet-then-vendor policies) can use the standalone bundle attached to each supported version's GitHub Release: a single self-contained .mjs file needing only Node ≥ 22, making no network connections except the local WebSocket to your Web Console.

Standalone bundles are available starting with bridge version 0.4.0. All supported QuestDB Web Console versions request bridge version 0.4.0 or later.

Download the bundle (mcp-server-questdb-<version>.mjs) and THIRD_PARTY_NOTICES.txt from the release, then move the bundle to a permanent location before setup—do not configure it from a downloads or temporary directory—and invoke that exact path:

bash
node /permanent/absolute/path/mcp-server-questdb-<version>.mjs setup

Setup writes agent configs that launch the bundle file directly (no npx involved), so moving or deleting that exact path will prevent the MCP server from starting. To switch versions, put the matching bundle beside the current one and run node /permanent/absolute/path/mcp-server-questdb-<new-version>.mjs upgrade; it re-points your agent configs at the new file while keeping env settings. If a configured file was already moved, run upgrade from its new absolute path. setup and upgrade always write the install style of the binary you run: a bundle writes file-path configs; npx writes npx configs.

Environment variables

LabelValueDefault ValueDescription
CONSOLE_ORIGINorigin URLhttp://127.0.0.1:9000QuestDB Web Console origin. 127.0.0.1 and localhost are interchangeable.
MCP_BRIDGE_PORT1–65535auto-allocatedWhen specified, the bridge uses a fixed port. The port is bound on the first pairing attempt, pairing fails with a bridge_bind_failed error if the port is taken.
LOG_PATHfile path/tmp/questdb-mcp-bridge/<ISO-ts>-<pid>.logOverride the log file location.
LOG_LEVELERROR / WARN / INFO / DEBUGINFODEBUG adds heartbeats and full tool payloads.

Commands

Your MCP client runs the bridge for you via the config above, so you rarely invoke it by hand. When you do:

CommandDescription
npx @questdb/mcp-server-questdb (no args)Start the bridge — same as start.
npx @questdb/mcp-server-questdb startStart the bridge.
npx @questdb/mcp-server-questdb setupInteractively configure the bridge for your coding agents.
npx @questdb/mcp-server-questdb --versionPrint the version and exit. Alias: -v.
npx @questdb/mcp-server-questdb --helpPrint this help and exit. Alias: -h.

An unknown command exits non-zero with a short error. Pin a version with npx @questdb/[email protected] start. (Installed on your PATH, the executable is named mcp-server-questdb.)

Pairing

Before any notebook / chart / SQL tool works, your browser has to pair with the bridge. The agent drives the flow.

When the agent needs to pair, it calls get_pairing_credentials and shows you both:

  • A one-click deep link — open it in the tab showing your Web Console.
  • A WebSocket URL + token — paste into the MCP pill at the bottom of the Web Console if the deep link doesn't land in the right tab.

Either path lands you on a consent prompt. Accept it and the agent's next tool call goes through.

Each bridge run generates a fresh port and pairing token, held only in memory. On restart the old credentials stop working — the agent will surface new ones the next time it needs to pair.

Logs

The bridge writes to stderr and to a log file. Tail the newest:

bash
tail -F "$(ls -t /tmp/questdb-mcp-bridge/*.log | head -1)"

At default INFO:

2026-05-15T12:29:27.142Z [INFO] tool_call: run_query2026-05-15T12:29:27.318Z [INFO] tool_result: run_query ok2026-05-15T12:29:28.011Z [ERROR] tool_result: update_cell internal_error timeout after 15000ms

At DEBUG (full payloads as continuation lines):

2026-05-15T12:29:27.142Z [INFO] tool_call: run_query2026-05-15T12:29:27.142Z [DEBUG]   args: {"query":"SELECT count() FROM trades"}2026-05-15T12:29:27.318Z [INFO] tool_result: run_query ok2026-05-15T12:29:27.318Z [DEBUG]   content: [{"type":"text","text":"..."}]

License

Apache-2.0.

来源:README.md,提交 b80e855

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.5.0最新Sep 30, 2026
  2. v0.4.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分