AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Codex Dbhub Plugin

mcp-mr-mihu-codex-dbhub-plugin · by mr-mihu

Native Codex plugin bridging a local DBHub MCP server: execute_sql / search_objects with per-directory environment passthrough.

No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add mcp-mr-mihu-codex-dbhub-plugin

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-mr-mihu-codex-dbhub-plugin)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Codex Dbhub Plugin? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Codex DBHub Plugin

[](LICENSE)

[English](README.en.md) | 中文

Codex DBHub Plugin 是一个 Codex 原生插件,把本机 DBHub MCP 服务桥接给 Codex,提供 execute_sql / search_objects 能力。适用于 Codex 无法暴露 mcp__* 工具的场景 (如 DeepSeek 等自定义模型,见 openai/codex#36382)。

> DBHub 本身是 MCP 工具;本项目是基于 DBHub 开发的 Codex 插件(插件形式,不是另一个 MCP 服务)。

特点

  • 兼容不暴露 mcp__* 工具的模型(如 DeepSeek)。
  • 零第三方依赖:纯 Node.js MCP 客户端,默认 stdio 直连,不占端口、不卡顿。
  • 本地优先:自动找 mise / nvm / volta / npm 全局 / 项目 node_modules 里的 dbhub;

找不到再用 npx --yes @bytebase/dbhub@latest 兜底,保持 dbhub 最新版,升级无需改插件。

  • 环境透传:把当前工作目录的环境变量(DSN / DB_* / dbhub.toml)原样传给 DBHub,

每个工作目录自动切换数据源。

  • 确定性退出:调用结束自动清理子进程,绝不挂起。
  • 安全优先:不扫描项目找配置/凭据;没配置时只询问用户。
  • 跨平台:Windows / macOS / Linux 均可运行(自带 .cmd 与 POSIX 两种启动器)。

环境要求

  • Node.js >= 18(DBHub 内置 SQLite 需要 >= 22.5)。
  • 本机装有 dbhub,或允许 npx 联网兜底。

仓库结构

.
├── .agents/plugins/marketplace.json            # marketplace 清单(仓库/团队源)
├── plugins/codex-dbhub-plugin/                 # 插件本体
│   ├── .codex-plugin/plugin.json               # 插件清单
│   ├── skills/dbhub/SKILL.md                   # 给 AI 的使用说明(含安全红线)
│   └── scripts/                                # MCP 客户端 + 启动器
├── CHANGELOG.md
└── LICENSE

安装(Codex)

  1. 克隆仓库:

``bash git clone https://github.com/mr-mihu/codex-dbhub-plugin.git codex-dbhub-plugin ``

  1. 添加 marketplace:

``bash codex plugin marketplace add ./codex-dbhub-plugin ``

或在 ChatGPT/Codex 桌面版:Plugins → Add Marketplace,选择克隆下来的 codex-dbhub-plugin 目录。

  1. 在 Plugins 目录切到 Codex DBHub Plugin 源,安装 codex-dbhub-plugin
  1. 开一个新会话再使用。

每用户数据库配置

插件把当前工作目录的环境透传给 DBHub,所以每个用户/工作目录连哪个库由自己配置:

  • 在工作目录设置 DSNDB_*DB_TYPE / DB_HOST / DB_PORT / DB_USER / DB_PASSWORD /

DB_NAME);

  • 或在项目根目录放 dbhub.toml / .env
  • 或临时用 --dsn / --demo 指定。

没配置时,插件只询问用户(或加 --demo 自测),不会自动去项目里搜索配置文件或凭据。

用法示例(AI 调用)

已安装(个人 marketplace)时,在项目根目录直接调用:

& "$env:USERPROFILE\plugins\codex-dbhub-plugin\scripts\codex-dbhub-plugin.cmd" query 'SELECT id, name FROM users LIMIT 10'
& "$env:USERPROFILE\plugins\codex-dbhub-plugin\scripts\codex-dbhub-plugin.cmd" tables

Linux / macOS 使用同目录的 POSIX 启动器(参数完全一样;个人插件默认装在 ~/plugins,Windows 为 %USERPROFILE%\plugins):

"$HOME/plugins/codex-dbhub-plugin/scripts/codex-dbhub-plugin" query 'SELECT id, name FROM users LIMIT 10'
"$HOME/plugins/codex-dbhub-plugin/scripts/codex-dbhub-plugin" tables

或从仓库根直接跑:

node plugins/codex-dbhub-plugin/scripts/codex-dbhub-plugin-client.mjs query 'SELECT id, name FROM users LIMIT 10'

codex-dbhub-plugin-client.mjs 是纯 Node 脚本,三种平台通用。)

完整环境变量说明见 [插件 README](plugins/codex-dbhub-plugin/README.md)。

安全说明

  • 凭据只存在于环境变量 / 本地配置;info 输出已打码。
  • 技能内置安全红线:禁止扫描项目寻找数据库配置或凭据(.env、nacos、SSH 等),

无配置时只询问用户。

  • 不要把 .env / dbhub.toml 提交到仓库(见 .gitignore)。

许可证

[MIT](LICENSE) © 2026 米胡先生 (mr-mihu)

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.