/setup
Connect DBHub to a database or fix a failing connection; also covers changing the DSN, write access, or multiple databases.
Claude Code
$ npx -y skills add bytebase/dbhub --skill setup --agent claude-code
Codex
$ npx skills add bytebase/dbhub --skill setup -a codex -y
Cursor
$ npx skills add bytebase/dbhub --skill setup -a cursor -y
Gemini CLI
$ npx skills add bytebase/dbhub --skill setup -a gemini-cli -y
GitHub Copilot
$ npx skills add bytebase/dbhub --skill setup -a github-copilot -y
OpenCode
$ npx skills add bytebase/dbhub --skill setup -a opencode -y
Windsurf
$ npx skills add bytebase/dbhub --skill setup -a windsurf -y
SKILL.md
setup.SKILL.mddescription: Connect DBHub to a database or fix a failing connection; also covers changing the DSN, write access, or multiple databases.
DBHub Setup
The database connection string (DSN) is entered in the plugin's configuration dialog and stored in Claude Code's secure storage. This plugin is read-only and caps results at 1000 rows.
Connecting or changing the database
1. **Help the user build their DSN** if they don't have one:
- PostgreSQL: `postgres://user:password@localhost:5432/dbname`
- MySQL: `mysql://user:password@localhost:3306/dbname`
- MariaDB: `mariadb://user:password@localhost:3306/dbname`
- SQL Server: `sqlserver://user:password@localhost:1433/dbname`
- Oracle: `oracle://user:password@localhost:1521/FREEPDB1` (path is the service name)
- SQLite: `sqlite:///absolute/path/to/database.db` (no credentials)
Append `?sslmode=require` for SSL (`sslmode=disable` for local databases). URL-encode special characters in the password. Recommend a least-privilege, read-only database account. Full DSN options (SQL Server named instances/NTLM, PostgreSQL cert verification): https://dbhub.ai/installation
2. **Point them at the config dialog:** run `/plugin`, open **dbhub** → configuration, and set the connection string there. The user should not paste the password into the chat.
3. **Reconnect:** run `/mcp` and reconnect the `dbhub` server (or restart Claude Code).
Troubleshooting a failing connection
- Test the DSN outside the plugin (redact the password in anything shown in chat):
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"setup-check","version":"0"}}}' | DBHUB_DSN='<dsn>' npx -y @bytebase/dbhub@latest --transport stdio --config <plugin-root>/dbhub.tomlA JSON `initialize` response means the config parsed and the server started; a connection error points at host/port/credentials/SSL.
- Common causes: database unreachable from this machine (host/port, VPN, firewall), wrong `sslmode`, un-encoded special characters in the password, a SQLite path that isn't absolute.
- If the server dies instantly with `sh: dbhub: command not found`, the npx cache entry is corrupted (concurrent npx runs can race during install). Find and remove the entry for `@bytebase/dbhub` under `~/.npm/_npx/*/package.json`, then reconnect — npx will reinstall it cleanly.
- Requires Node.js >= 22.5.0 (`node --version`).
When this plugin isn't enough
The plugin covers one database, read-only. For write access, multiple databases, SSH tunnels, or custom tools, register DBHub directly with your own TOML config:
claude mcp add dbhub -- npx -y @bytebase/dbhub@latest --transport stdio --config /path/to/dbhub.toml
Offer to write that TOML for the user — format reference: https://dbhub.ai/config/toml. Suggest disabling this plugin's server afterwards to avoid two overlapping DBHub instances.
Read more
description: Connect DBHub to a database or fix a failing connection; also covers changing the DSN, write access, or multiple databases.
DBHub Setup
The database connection string (DSN) is entered in the plugin's configuration dialog and stored in Claude Code's secure storage. This plugin is read-only and caps results at 1000 rows.
Connecting or changing the database
1. **Help the user build their DSN** if they don't have one:
- PostgreSQL: `postgres://user:password@localhost:5432/dbname`
- MySQL: `mysql://user:password@localhost:3306/dbname`
- MariaDB: `mariadb://user:password@localhost:3306/dbname`
- SQL Server: `sqlserver://user:password@localhost:1433/dbname`
- Oracle: `oracle://user:password@localhost:1521/FREEPDB1` (path is the service name)
- SQLite: `sqlite:///absolute/path/to/database.db` (no credentials)
Append `?sslmode=require` for SSL (`sslmode=disable` for local databases). URL-encode special characters in the password. Recommend a least-privilege, read-only database account. Full DSN options (SQL Server named instances/NTLM, PostgreSQL cert verification): https://dbhub.ai/installation
2. **Point them at the config dialog:** run `/plugin`, open **dbhub** → configuration, and set the connection string there. The user should not paste the password into the chat.
3. **Reconnect:** run `/mcp` and reconnect the `dbhub` server (or restart Claude Code).
Troubleshooting a failing connection
- Test the DSN outside the plugin (redact the password in anything shown in chat):
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"setup-check","version":"0"}}}' | DBHUB_DSN='<dsn>' npx -y @bytebase/dbhub@latest --transport stdio --config <plugin-root>/dbhub.tomlA JSON `initialize` response means the config parsed and the server started; a connection error points at host/port/credentials/SSL.
- Common causes: database unreachable from this machine (host/port, VPN, firewall), wrong `sslmode`, un-encoded special characters in the password, a SQLite path that isn't absolute.
- If the server dies instantly with `sh: dbhub: command not found`, the npx cache entry is corrupted (concurrent npx runs can race during install). Find and remove the entry for `@bytebase/dbhub` under `~/.npm/_npx/*/package.json`, then reconnect — npx will reinstall it cleanly.
- Requires Node.js >= 22.5.0 (`node --version`).
When this plugin isn't enough
The plugin covers one database, read-only. For write access, multiple databases, SSH tunnels, or custom tools, register DBHub directly with your own TOML config:
claude mcp add dbhub -- npx -y @bytebase/dbhub@latest --transport stdio --config /path/to/dbhub.toml
Offer to write that TOML for the user — format reference: https://dbhub.ai/config/toml. Suggest disabling this plugin's server afterwards to avoid two overlapping DBHub instances.
Token conscious database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite.
More skills from other plugins.
paddleocr-doc-parsing
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Questions about setup.
- Which coding agents can use setup?
- setup installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

