Transform your database into an intelligent conversational partner. Ask questions in plain English, get instant answers, and create beautiful visualizations - all through Claude Desktop or any other MCP Client.
DBChat is a bridge that connects any MCP client like Claude Desktop, Gemini-CLI, etc to your database, enabling natural language database interactions. Instead of writing SQL queries, simply ask the chatbot questions about your data and get instant, intelligent responses.
Before DBChat:
With DBChat:
- Ask questions in plain English: "How many customers signed up last month?"
- Get conversational responses: The LLM explains the data and provides insights
- No SQL knowledge required: Perfect for business users and analysts
- Automatic chart creation: Claude generates beautiful charts from your data
- Multiple chart types: Line charts, bar charts, pie charts, scatter plots, and more
- Interactive insights: Drill down into your data with follow-up questions
- Database discovery: "What tables do we have?" "Show me the customer table structure"
- Relationship understanding: The AI model explains how your tables connect
- Data quality insights: Find duplicates, missing data, and anomalies
- Executive dashboards: "Create a sales summary for our board meeting"
- Trend analysis: "Show me user growth over the past 6 months"
- Performance metrics: "Which products are underperforming?"
DBChat works with virtually any database (as long as it has a JDBC driver)
- MySQL / MariaDB - Web applications and e-commerce
- Oracle - Enterprise applications
- PostgreSQL - Advanced applications and analytics
- SQL Server - Microsoft environments
- H2 - Testing and development
- SQLite - Local applications and prototypes
- HSQLDB - Testing and development
- Redis - In-memory data store
- MongoDB - Document-oriented database
- Cassandra - Wide-column store
- Snowflake - Cloud data platform
- Databricks - Cloud data platform
- Amazon Redshift - AWS data warehouse
- Google BigQuery - Google analytics
- ClickHouse - Real-time analytics
- CSV Files - Spreadsheet data and exports
- Excel Files - Can be exported to CSV and queried
See INSTALL.md for the complete list and build options.
Download the latest release from GitHub Releases:
- dbchat-3.0.0-basic.jar - Basic version (PostgreSQL, SQLite, H2, HSQLDB, CSV) <-- Start here
- dbchat-3.0.0-standard.jar - Standard version (add MySQL, MariaDB, ClickHouse)
- dbchat-3.0.0-enterprise.jar - Enterprise version (add Oracle, SQL Server, DB2)
- dbchat-3.0.0-cloud-analytics.jar - Cloud Analytics version (add Redshift, Snowflake, BigQuery)
- dbchat-3.0.0-all.jar - All databases included (400MB+)
(Optional) For simplicity rename the downloaded file to dbchat-3.0.0.jar so you can follow the rest of the commands here without needing to adjust them to your version.
NOTE: Advanced users can also build a custom jar with only the drivers you need. See INSTALL.md for details.
IMPORTANT: Make sure that you are properly LICENSED to use any JDBC driver you install. The DBChat license does not cover any third party code or binaries.
- Download Claude Desktop (free)
- Sign in with your Claude account
- Important: The Claude website does not support MCP. For MCP only with Anthropic models you need to use Claude Desktop.
If you are not using Claude Desktop but want to use another MCP client like Cursor, Windsurf, VS Code, Continue, etc then please refer to the MCP Setup document for more details
Create a configuration file dbchat.conf:
Examples for Common/Popular Databases:
MySQL:
PostgreSQL:
SQLite:
H2 database (in memory - no database setup required):
Oracle:
Redis:
- Open Claude Desktop
- Go to Settings → Developer → Edit Config
- Add your database server:
Alternative without config file:
Windows Example:
NOTE: If java is not in your PATH then use the full path to java (JDK 17+) in the command.
You can use many databases concurrently!
Close and reopen Claude Desktop. You should see a database connection indicator in the chat input.
DBChat enables Claude to create stunning visualizations directly from your database:
- Monthly Revenue Trends: Line charts showing growth over time
- Top Products: Bar charts of bestsellers
- Regional Performance: Heat maps of sales by location
- Customer Segments: Pie charts of revenue distribution
- User Growth: Area charts showing acquisition trends
- Performance Metrics: Multi-axis charts combining different KPIs
- Comparative Analysis: Side-by-side visualizations of different periods
- Inventory Levels: Real-time stock visualization
- System Performance: Time-series charts of key metrics
- Quality Metrics: Statistical charts showing trends and outliers
Protect your data with read-only access:
Control resource usage:
- All data stays on your machine
- No external API calls
- Encrypted environment variables
- Secure local communication
Enable HTTP mode for web-based access:
Then access at http://localhost:8080/. For example try http://localhost:8080/health to check health status
For similar config via CLI args use:
For maximum flexibility, DBChat supports multiple configuration methods like CLI arguments, config file, Environment vars, System Properties and Built-in Defaults. Understanding the priority order is crucial for troubleshooting and advanced setups.
- Command Line Arguments (Highest Priority)
- Configuration File
- Environment Variables
- System Properties
- Built-in Defaults (Lowest Priority)
This means command line arguments will always override config files, which override environment variables, and so on.
Format: --parameter_name=value Use case: Quick overrides, testing, one-time configurations
Available parameters:
- --config_file=/path/to/config.conf
- --db_url="jdbc:..."
- --db_user="username"
- --db_password="password"
- --db_driver="com.mysql.cj.jdbc.Driver"
- --http_mode=true
- --http_port=8080
- --max_connections=20
- --connection_timeout_ms=30000
- --query_timeout_seconds=60
- --select_only=true
- --max_sql_length=50000
- --max_rows_limit=10000
Format: KEY=VALUE (one per line) Use case: Production environments, complex configurations, version control
Create a file (e.g., dbchat.conf):
Usage:
Config file features:
- Comments start with #
- Empty lines are ignored
- Values can be quoted: DB_PASSWORD="password with spaces"
- Keys are case-insensitive
- Supports all the same parameters as command line
Format: UPPERCASE_WITH_UNDERSCORES Use case: Docker, cloud deployment, CI/CD, secure credential management
All environment variables:
- CONFIG_FILE - Path to configuration file
- DB_URL - Database connection URL
- DB_USER - Database username
- DB_PASSWORD - Database password
- DB_DRIVER - JDBC driver class
- HTTP_MODE - Enable HTTP mode (true/false)
- HTTP_PORT - HTTP server port
- MAX_CONNECTIONS - Connection pool size
- CONNECTION_TIMEOUT_MS - Connection timeout
- QUERY_TIMEOUT_SECONDS - Query timeout
- SELECT_ONLY - Read-only mode (true/false)
- MAX_SQL_LENGTH - Maximum query length
- MAX_ROWS_LIMIT - Maximum result rows
- IDLE_TIMEOUT_MS - Connection idle timeout
- MAX_LIFETIME_MS - Connection max lifetime
- LEAK_DETECTION_THRESHOLD_MS - Leak detection threshold
Format: -Dparameter.name=value (underscores become dots) Use case: JVM-specific configuration, IDE run configurations
Property naming: Environment variable DB_URL becomes system property db.url
When: No configuration provided Values: Safe defaults for development
Note that most MCP clients use a similar configuration, but you'll need to refer to your MCP client docs for details on how it can be configured. It is safest not to assume any PATH settings and provide absolute paths for java, the dbchat jar and (optionally) the dbchat config file.
- DB_URL - JDBC connection string (required)
- DB_USER - Database username
- DB_PASSWORD - Database password
- DB_DRIVER - JDBC driver class (required)
- MAX_CONNECTIONS=10 - Maximum concurrent connections
- CONNECTION_TIMEOUT_MS=30000 - Connection acquisition timeout
- IDLE_TIMEOUT_MS=600000 - Connection idle timeout (10 minutes)
- MAX_LIFETIME_MS=1800000 - Connection max lifetime (30 minutes)
- LEAK_DETECTION_THRESHOLD_MS=60000 - Connection leak detection (1 minute)
- QUERY_TIMEOUT_SECONDS=30 - SQL query execution timeout
- SELECT_ONLY=true - Read-only mode (blocks INSERT/UPDATE/DELETE)
- MAX_SQL_LENGTH=10000 - Maximum characters in SQL query
- MAX_ROWS_LIMIT=10000 - Maximum rows returned per query
- HTTP_MODE=false - Enable HTTP web interface
- HTTP_PORT=8080 - HTTP server port
Enable debug logging to see which values are being used:
- Config file not found: Use absolute paths
- Permission denied: Check file permissions
- Wrong values used: Check priority order
- Environment variables not set: Use env | grep DB_ to verify
- Check paths: Use absolute paths in configuration
- Java version: Ensure Java 17+ is installed
- File permissions: Verify JAR file is readable
- Restart Claude: Close and reopen Claude Desktop
- Test connection: Verify database is running
- Check credentials: Ensure username/password are correct
- Network access: Confirm database allows connections
- Driver support: Use the correct JAR version for your database
- Limit results: Use MAX_ROWS_LIMIT=1000
- Query timeout: Set QUERY_TIMEOUT_SECONDS=30
- Connection pool: Adjust MAX_CONNECTIONS=10
"ClassNotFoundException"
- Download the correct JAR version for your database
- Check that the database driver is included
"Connection refused"
- Verify database server is running
- Check connection URL, username, and password
- Ensure database allows connections from your machine
"Server not responding"
- Check Claude Desktop configuration syntax
- Verify Java is accessible in PATH
- Review Claude Desktop logs
- Start with read-only: Use SELECT_ONLY=true initially
- Test with sample data: Try the H2 database first
- Begin with simple questions: Start with basic table exploration
- Build complexity gradually: Move to advanced analytics over time
- Use dedicated database users: Create read-only users for DBChat
- Limit access: Only grant necessary table permissions
- Monitor usage: Review query logs regularly
- Backup data: Always maintain database backups
- Set reasonable limits: Use MAX_ROWS_LIMIT and timeouts
- Index important columns: Ensure queries can run efficiently
- Monitor resources: Watch CPU and memory usage
- Optimize queries: Let Claude suggest query improvements
- Model Context Protocol: modelcontextprotocol.io
- Claude Desktop: claude.ai/download
- Developer Guide: See INSTALL.md for technical details
- GitHub Repository: github.com/skanga/dbchat
- Download the appropriate JAR file for your database(s)
- Install Claude Desktop (free)
- Configure your database connection
- Add DBChat to Claude Desktop settings
- Start asking questions about your data!
Transform your relationship with data. No more complex SQL queries, no more waiting for reports. Just natural conversations with your database, powered by Claude's intelligence and DBChat's seamless integration.
Get started today and discover what your data has been trying to tell you.
.png)

