Halfnine

io.github.notinferred由 GitHub 账号 notinferred 发布v0.3.0更新于 Nov 1, 2026

PostgreSQL through Halfnine: describe, read-only queries, and changes you approve in the app.

已验证STDIO仅桌面数据库开发者工具

概览

AI 生成的概览

Halfnine 是一款 macOS 与 Windows 桌面 PostgreSQL 客户端,同时可作为本地 MCP 服务器,让助手查看并查询你保存的连接。

可以做什么
  • 查看数据库结构,并在已保存的 PostgreSQL 连接上执行只读查询
  • 按每个连接的代理权限级别,把变更以行或 SQL 形式暂存,等待你确认
  • 为代理创建、复制、启动、停止和删除 Docker 中的 PostgreSQL 数据库
  • 在 Agents 页面查看代理的全部操作,并用一个开关全部暂停
适用场景
适合已在 Halfnine 中保存 PostgreSQL 连接,并希望 Claude Code、Codex、Cursor、VS Code 或 Claude Desktop 查看结构、执行查询,且写入需经你批准的场景。
运行要求
需先在本机安装 Halfnine 桌面应用(Apple 芯片的 macOS 13 及以上,或 Windows x64),MCP 服务器通过应用二进制以 stdio 启动。需要已保存的 PostgreSQL 连接;Docker 数据库功能需受支持的 Docker 引擎。未声明任何 API 密钥或环境变量。
安装前请注意
代理读取的内容会发送给其 AI 提供商。连接可设为 Full,使代理无需批准即可修改数据;代理自建的 Docker 数据库默认为 Full,且代理可自行删除。安装包尚未签名,macOS 与 Windows 会显示安全警告。备份默认开启,但可以关闭。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Halfnine

A small, calm PostgreSQL client for macOS and Windows, light enough to leave open all day.

It is early: ROADMAP.md says where things stand.

Install

Download the installer from Releases. The builds aren't signed yet, so each system asks once before opening them:

  • macOS (Apple silicon, macOS 13 or later): open the .dmg and drag Halfnine to Applications. Open it once, then choose System Settings › Privacy & Security › Open Anyway. Or run xattr -dr com.apple.quarantine /Applications/Halfnine.app.
  • Windows (x64): run the -setup.exe. At the SmartScreen warning choose More info › Run anyway. It installs for the current user, without administrator rights.

When a connection saves its password, macOS asks once before Halfnine first reads it, and again after each update until the app is signed. Choose Always Allow.

Docker databases and backups

Turn on Docker databases in Settings, or at the first launch, and the Postgres containers on this computer show under Docker on the connections screen. Double-click one to connect; Halfnine reads its user and password from the container. The Docker page makes new ones (PostgreSQL 14 to 18, optionally from a dump or an SQL file), copies, starts, stops and deletes them. It works with Docker Desktop, OrbStack, Colima and Rancher Desktop.

With backups on, as they are unless you turn them off in Settings, dropping or emptying a table, dropping a column, or deleting a Docker database backs it up first and acts at once, with Undo at the foot of the window. Backups stay on the Docker page until you delete them. A table bigger than the limit in Settings, or one Halfnine can't back up, asks for its name instead.

Use with AI agents

Halfnine is also an MCP server, so Claude Code, Codex, Cursor, VS Code and Claude Desktop can use your connections through it. Open Agents, at the foot of the sidebar or the connections screen, choose Connect next to your tool, and Halfnine shows what it will change before it adds itself. Or add it by hand; on macOS:

sh
claude mcp add --scope user --transport stdio halfnine -- /Applications/Halfnine.app/Contents/MacOS/halfnine mcpcodex mcp add halfnine -- /Applications/Halfnine.app/Contents/MacOS/halfnine mcp

For Claude Desktop, install Halfnine first, then open the .mcpb file from the same release to add it as an extension. It is also listed in the official MCP Registry as io.github.notinferred/halfnine.

Each connection sets what agents may do there, under Agents in its settings: Off, Read, Read with approved writes, or Full. Red-labelled connections start at Off and every other at Read. At Read with approved writes, an agent's change opens in Halfnine as staged rows or SQL and waits for your answer. Everything agents do is listed on the Agents page, where one switch pauses them all. What an agent reads goes to its AI provider.

With Docker databases on, an agent can make its own databases, or copy one before risky work. Those start at Full and are marked with the agent's name, and it gets their URL for programs it runs. It deletes one made for it without asking; deleting any other asks you. While backups are on, what an agent drops or empties is backed up first, and run_sql won't drop tables, schemas or databases.

Develop

You need Node 24 or later, pnpm (the version in package.json is fetched automatically), Rust through rustup (rust-toolchain.toml picks the version), and on macOS the Xcode Command Line Tools. With Homebrew, brew install rustup, then put /opt/homebrew/opt/rustup/bin on your PATH; Homebrew leaves it off.

CommandWhat it does
pnpm installInstalls the UI's dependencies
pnpm devOpens the app, reloading the UI as you edit. The first run compiles the Rust side and takes a few minutes
pnpm check / pnpm formatLints and checks formatting with Biome / applies its fixes
pnpm typecheckChecks the UI's types
cargo fmt --allFormats the Rust crates
cargo clippy --workspace --all-targets -- -D warningsLints the Rust crates
pnpm iconsRenders every app icon size from assets/brand/app-icon.svg
pnpm tauri buildBuilds the installer for the machine it runs on
git tag v0.2.0 && git push origin v0.2.0Builds the macOS and Windows installers and the Claude Desktop extension in GitHub Actions into a draft release, to check and publish. Publishing it lists that version in the MCP Registry
cargo test --workspaceRuns the Rust tests. The Postgres tests skip themselves unless HN_TEST_DATABASE_URL names a database loaded with crates/pg/tests/fixture.sql, and the Docker tests unless HN_TEST_DOCKER=1 and a Docker engine with postgres:18 pulled is running. They label what they make, and CI removes anything they leave

To check the app or run the Postgres tests on a Mac without a database, start a throwaway one in Docker. It deletes itself when stopped:

sh
docker run -d --rm --name halfnine-check -e POSTGRES_PASSWORD=check -p 127.0.0.1:55432:5432 postgres:18docker exec -i halfnine-check psql -U postgres -q < crates/pg/tests/fixture.sql# connect the app to postgres://postgres:check@localhost:55432/postgres# or: HN_TEST_DATABASE_URL=postgres://postgres:check@localhost:55432/postgres cargo test --workspacedocker stop halfnine-check

Layout

  • apps/desktop: the UI, in React and Vite. Design tokens are in src/ui/tokens.css.
  • crates/desktop: the Tauri app that hosts the UI, with its window, permissions and icons.
  • crates/core, crates/pg and crates/docker: the types every crate shares, the Postgres adapter, and the Docker engine adapter.
  • docs/: architecture, decisions and brand.

License

Halfnine is source-available under the PolyForm Shield License 1.0.0. You may use it for any purpose, at work included, and change it, but not to sell it or to provide a product that competes with it. Copyright 2026 notInferred.

来源:README.md,提交 c9f3f3d

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:该软件包类型无法在沙箱中运行。

版本历史

2
  1. v0.3.0最新Nov 1, 2026
  2. v0.2.0Oct 30, 2026

评分

已满足适用检查项的 40%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

    请在仓库或注册中心条目中声明许可证。