Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Connected while the plugin is enabled; Claude calls their tools.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
データベース操作とSQLクエリを実行するためのMCPサーバープラグインです。
このプラグインは、MySQL、PostgreSQL、SQLiteなどの各種データベースへのアクセスを提供します。
版ごとの変更と移行の手順は CHANGELOG.md の [mcp-dbhub <版>] の節にあります。
/plugin install mcp-dbhub@ai-plugins
codex plugin add mcp-dbhub@ai-plugins
# Claude Code
/plugin marketplace update ai-plugins
/plugin update mcp-dbhub@ai-plugins
# Codex
codex plugin marketplace upgrade ai-plugins
codex plugin add mcp-dbhub@ai-plugins
2つの設定方法があり、dbhub.tomlが優先されます。
プロジェクトルート(=MCP サーバの実行ディレクトリ)に dbhub.toml を配置します。
.mcp.jsonが--config=dbhub.tomlを渡すことで読み込まれます。dbhub 本体はdbhub.tomlを自動検出しません(--configを外すと、設定なしと判定されて起動直後に終了します)。
# 単一データベース
[[sources]]
id = "mydb"
description = "本番 MySQL"
dsn = "[REDACTED:DB Connection String]
# 複数データベース
[[sources]]
id = "production"
description = "本番 MySQL"
dsn = "[REDACTED:DB Connection String]
[[sources]]
id = "staging"
description = "ステージング MySQL"
dsn = "[REDACTED:DB Connection String]
複数ソース定義時、ツール名に自動でサフィックスが付与されます(例: execute_sql_production, execute_sql_staging)。
ソースごとにSSH踏み台を定義できます。
[[sources]]
id = "production"
description = "本番 MySQL(踏み台経由)"
dsn = "[REDACTED:DB Connection String]
ssh_host = "bastion.example.com"
ssh_port = 22
ssh_user = "ubuntu"
ssh_key = "~/.ssh/id_rsa"
# ssh_passphrase = "鍵のパスフレーズ(暗号化されている場合)"
マルチホップSSH(多段踏み台)にも対応しています。
[[sources]]
id = "prod_multihop"
dsn = "[REDACTED:DB Connection String]
ssh_host = "internal-server.company.com"
ssh_user = "deploy"
ssh_key = "~/.ssh/id_ed25519"
ssh_proxy_jump = "bastion.company.com,[email protected]:2222"
| フィールド | 必須 | 説明 |
|---|---|---|
ssh_host | Yes | 踏み台ホスト名 |
ssh_port | No | ポート(デフォルト: 22) |
ssh_user | Yes | SSHユーザー名 |
ssh_key | ※ | 秘密鍵パス(~展開可) |
ssh_password | ※ | パスワード認証用 |
ssh_passphrase | No | 秘密鍵のパスフレーズ |
ssh_proxy_jump | No | マルチホップ(カンマ区切り) |
※ ssh_key または ssh_password のいずれかが必須
dbhub.tomlが存在しない場合、.envの環境変数にフォールバックします。
# データベース接続文字列
DBHUB_DSN=[REDACTED:DB Connection String]
# SSH踏み台(必要な場合)
DBHUB_SSH_HOST=bastion.example.com
DBHUB_SSH_PORT=22
DBHUB_SSH_USER=ubuntu
DBHUB_SSH_KEY=~/.ssh/id_rsa
DSNのホスト名は踏み台から見た内部ホスト名を指定してください。
dbhub.toml(.mcp.json の --config=dbhub.toml で読み込まれる).envのDBHUB_DSN環境変数(tomlが無い場合のフォールバック)# SQLクエリを実行
mcp__plugin_mcp-dbhub_dbhub__execute_sql "SELECT * FROM users LIMIT 10"
# テーブル一覧を取得
mcp__plugin_mcp-dbhub_dbhub__search_objects --object_type table
DBHub MCPは、NDFプラグインのndf:data-analystエージェントと連携して使用することを推奨します。
Task(
subagent_type="ndf:data-analyst",
prompt="Analyze user activity in the local database",
description="Analyze user activity"
)
dbhub.tomlと.envは.gitignoreに追加し、認証情報をコミットしないでくださいBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
npx claudepluginhub devbasex/ai-plugins --plugin mcp-dbhub