docs: add HTTP/auth/SSH/API reference guides and fix tool reference inaccuracies - #395
Closed
laserduor wants to merge 4 commits into
Closed
docs: add HTTP/auth/SSH/API reference guides and fix tool reference inaccuracies#395laserduor wants to merge 4 commits into
laserduor wants to merge 4 commits into
Conversation
Add a dedicated HTTP MCP server configuration page covering: - When to use HTTP vs stdio transport - All endpoints (/mcp, /healthz, /api/*) - Security: DNS-rebinding protection, bearer token auth, CORS - Production deployment: reverse proxy, Docker, multi-instance - Client configuration for HTTP transport - Complete command-line reference
New dedicated page (config/auth-token.mdx) covering: - How bearer token auth works in DBHub - Setting the token via CLI flag, env var, .env file, Docker - Client configuration (curl, .mcp.json, Claude Code) - Multiple tokens for zero-downtime rotation and per-client tokens - Security considerations (constant-time comparison, defense in depth) - Verification steps to confirm auth is working - Complete reference table Simplified http-server.mdx to reference the new auth page instead of duplicating content.
- SSH: new docs/config/ssh-tunnel.mdx (password, key, ProxyJump, SSH config alias) - API: new docs/config/api-reference.mdx (sources, requests, health check endpoints) - Frontmatter: add description to 12/19 pages (all tools, config, getting started) - Parameters: add parameter table to execute-sql.mdx - See Also: add missing links to explain-sql, health-check, debug - Links: installation.mdx, quickstart.mdx now link to HTTP, auth, SSH pages - --id: expand multi-instance scenario docs - TOML hot reload: expand with behavior, STDIO limitation, troubleshooting - Nav: add ssh-tunnel, api-reference to docs.json - Remove duplicate hot-reload section from toml.mdx
…s flag reference
- execute_sql schema only has a single 'sql' parameter; remove the
fabricated source_id / transaction / max_rows entries
- readonly and max_rows are per-tool TOML config, not query parameters;
multi-source routing is via tool name suffix (execute_sql_{source_id})
- replace deprecated --max-rows CLI flag mention with the TOML [[tools]]
max_rows configuration
Member
|
thanks for creating the PR. But we are not accepting large doc PR. Keeping the doc minimum and not spreading across different places is deliberate. e.g. --auth-token is already mentioned https://dbhub.ai/config/command-line#%E2%80%94auth-token |
Contributor
Author
|
Thanks for the feedback — understood, and agreed that docs should stay minimal. I have split the changes into three small, focused PRs (each one single-purpose, no new standalone pages):
I dropped the standalone pages (HTTP server, auth-token, SSH tunnel, API reference) per your note that keeping docs minimal is deliberate. Happy to adjust any of the three further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four documentation improvements for the DBHub docs site, covering previously undocumented configuration surfaces and fixing factual inaccuracies in the tool reference. All changes are docs-only — no source code touched.
Changes
1. New: HTTP Server deployment guide (
docs/config/http-server.mdx)Why:
--transport=httphas been a first-class feature since the HTTP transport landed, but there was no dedicated page explaining it. The only mention lived inside the CLI reference. Operators deploying DBHub behind a reverse proxy (or running it in Docker) had to piece together the endpoint list, auth model, and security properties from code.What it covers:
/mcp,/healthz,/api/*).mcp.json, Claude Code)2. New: Authentication guide (
docs/config/auth-token.mdx)Why:
--auth-token/DBHUB_AUTH_TOKENsupport was added in #390, but the docs only mentioned it in passing. Auth is a security-sensitive topic — users deserve a complete, verified reference rather than inference from code.What it covers:
.envfile, Docker.mcp.json, Claude CodeAlso simplified
http-server.mdxto link to the new page instead of duplicating auth content.3. New: SSH tunnel guide (
docs/config/ssh-tunnel.mdx)Why: SSH tunneling is a core deployment pattern for reaching databases on private networks, and DBHub has rich support for it (password, key, ProxyJump,
~/.ssh/configaliases). None of this was documented anywhere.What it covers:
--ssh-host/--ssh-user/--ssh-key[[sources]]equivalents4. New: REST API reference (
docs/config/api-reference.mdx)Why: The HTTP server exposes
/api/sourcesand/api/requests(used by the Workbench frontend and useful for external tooling), but they were undocumented outside the code. External integrations had no reference for response shapes.What it covers:
GET /api/sources— configured sources (passwords/keys excluded from responses)GET /api/requests— tool execution traces (filterable bysource_id)GET /healthz— unauthenticated health probe for uptime monitors5. Systematic fixes across existing pages (15 files)
descriptionto 12/19 pages that had onlytitle(all tools, config, getting-started pages). Mintlify surfaces descriptions in search results and link previews; pages without them looked incomplete in search.execute-sql.mdx: added a Features table and a Parameters table; fixed factual errors:source_id/transaction/max_rowsparameters — the actual tool schema has a singlesqlparameter (multi-source routing is by tool name suffixexecute_sql_{source_id}, not by parameter)--max-rowsCLI flag reference with the current TOML[[tools]]max_rowsconfiguration (the flag now exits with an error pointing to TOML)explain-sql,health-check,debugpagescommand-line.mdx: expanded the--idflag with a multi-instance scenario (e.g. running separate DBHub processes for different databases in Cursor/Claude Code)toml.mdx: expanded hot-reload behavior (what triggers it, stdio limitation, troubleshooting); removed a duplicated hot-reload sectiondocs.json): registered all four new pages under ConfigurationVerification
src/config/env.ts(verified each--ssh-*,--auth-token,--id,--transport,--demo, etc.)src/server.tssrc/tools/*.ts(execute_sql, search_objects, explain_sql, health_check)src/config/env.tsgit diff origin/mainis docs-only: 17 files, 811 insertions, 27 deletionsNotes