UI Components
Sidebar Navigation
The left sidebar provides access to all data sources and their tools:- Data Source List: Shows all configured databases (from TOML or single DSN)
- Tool List: Displays available MCP tools for the selected source
- Lock Icon: Indicates read-only tools (restricted to SELECT, SHOW, etc.)
- Source Badge: Shows database type icons (PostgreSQL, MySQL, etc.)
Top Navigation
The workbench includes these main sections:- Home - Redirects to the first available data source
- Source Detail - Connection information and tool listing
- Tool Detail - Interactive query editor and execution interface
- Recent Requests - Request history and traces
SQL Editor
The SQL editor appears when usingexecute_sql tools or custom tools:
Features:
- Syntax highlighting for SQL statements
- Multi-line editing with auto-indentation
- Line numbers and bracket matching
- Keyboard shortcut:
Cmd+Enter(Mac) orCtrl+Enter(Windows/Linux) to execute - Execute selection: Select SQL text and press
Cmd+Enterto run only the selected portion
Parameter Forms
Custom tools display interactive parameter forms above the SQL editor: Input Types:- String: Text input field
- Number/Integer: Numeric input with validation
- Boolean: Checkbox or toggle
- Required: Red badge and form validation
- Optional: Gray badge, can be left empty
- Type labels: Shows expected data type (string, number, boolean)
Results Tabs
Query results appear in a tabbed interface below the editor: Tab Information:- Timestamp of execution (e.g., “Today 2:34:15 PM”)
- Execution duration (e.g., “145ms”)
- Success/failure indicator (green checkmark or red X)
- Row count for SELECT queries
- Affected rows for INSERT/UPDATE/DELETE
- Multiple tabs for query history within the current session
- Close individual tabs with the X button
- Switch between tabs to compare results
- Automatic selection of most recent result
Common Workflows
Executing SQL Queries
- Navigate to a data source in the sidebar
- Click the
execute_sqltool (usually namedexecute_sql_<source_id>) - Type or paste your SQL query in the editor
- Press
Cmd+Enteror click Run - View results in the tabbed interface below
- Use semicolons to separate multiple statements
- Select specific SQL text and press
Cmd+Enterto run only that portion - Queries are saved in your browser’s URL history for easy recall
- Check the “Read-Only” badge to confirm execution restrictions
Testing Custom Tools
- Navigate to your custom tool from the sidebar
- Fill in required parameters in the form
- Review the SQL preview to verify parameter substitution
- Click Run to execute
- Examine results or error messages
- Parameter values are saved in the URL for bookmarking
- Required parameters must be filled before the Run button activates
- Number fields validate input automatically
- Boolean parameters use checkboxes
Viewing Request Traces
Click Recent Requests in the navigation to see execution history: Information Displayed:- Time: When the request was made (relative time and timestamp)
- Tool: Which tool executed (links to tool detail page)
- SQL: The full query (hover for complete text)
- Result: Success/failure with execution time
- Client: Browser name or MCP client (Chrome, Firefox, Claude Desktop, etc.)
- Hover over truncated SQL to see the full statement
- Hover over error icons to see complete error messages
- Click tool names to navigate to the tool detail page
- Up to 100 requests are stored per data source
Exploring Database Schema
You can explore database schemas using SQL queries in theexecute_sql tool:
PostgreSQL:
Selecting Data Sources
When using multi-database configuration:- Click a data source name in the sidebar
- View connection details:
- Database type (PostgreSQL, MySQL, etc.)
- Host and port
- Database name
- Username
- SSH tunnel status (if configured)
- Default source indicator
- Review available tools for that source
- Click a tool to execute queries
Troubleshooting
Workbench Not Loading
Symptoms:- Browser shows “Cannot connect” or blank page
- URL
http://localhost:8080doesn’t respond
-
Verify DBHub is running with HTTP transport:
-
Check the port isn’t already in use:
-
Look for startup messages in the terminal:
- Verify firewall settings allow connections to the specified port
Connection Errors
Symptoms:- “Failed to load data sources” error
- Empty sidebar with no data sources
- Tools return database connection errors
-
Verify your DSN or TOML configuration is correct:
-
Check database credentials and network access:
-
For SSH tunnels, verify bastion host accessibility:
- Review server logs in the terminal for specific error messages
Query Execution Failures
Symptoms:- Red X indicator in results tab
- Error messages like “syntax error” or “permission denied”
- Timeout errors for long-running queries
- Check SQL syntax in the editor (hover over errors for details)
-
Verify you have necessary permissions:
-
For read-only tools, ensure you’re only using SELECT/SHOW statements:
-
For timeout errors, add LIMIT clauses or optimize queries:
-
Check the
max_rowssetting in your TOML configuration:
Browser Compatibility
Supported Browsers:- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Older browsers may not support modern JavaScript features
- CodeMirror SQL editor requires ES2015+ support
- Local storage required for some features
URL State Not Persisting
Symptoms:- SQL queries don’t save in browser history
- Parameter values reset on page refresh
- Ensure JavaScript is enabled in your browser
- Check that cookies and local storage aren’t blocked
- URL updates are debounced (300ms delay) - wait briefly before refreshing
JSON-RPC Request Format
For advanced users or custom integrations, here’s the JSON-RPC format the workbench uses: Request:Related
- Workbench Overview - Architecture and key features
- Custom Tools - Define reusable SQL operations
- Multi-Database Configuration - Connect multiple data sources
- HTTP Transport - Command-line options