This guide shows how to integrate Universal Database MCP Server with Continue, the open-source AI code assistant.
Continue is an open-source AI code assistant that runs in VS Code and JetBrains IDEs. It supports MCP, allowing you to connect to databases and query them using natural language.
Key Benefits:
- Open-source and customizable
- Native MCP support
- Works with multiple LLM providers
- VS Code and JetBrains support
- Continue extension installed in VS Code or JetBrains
- Node.js 20.0.0 or later
- Database instance accessible from your machine
Continue uses a configuration file at:
- All platforms:
~/.continue/config.json
Add the MCP server to your config.json:
{
"mcpServers": [
{
"name": "database",
"command": "npx",
"args": [
"universal-db-mcp",
"--type", "mysql",
"--host", "localhost",
"--port", "3306",
"--user", "root",
"--password", "your_password",
"--database", "your_database"
]
}
]
}{
"mcpServers": [
{
"name": "mysql-dev",
"command": "npx",
"args": [
"universal-db-mcp",
"--type", "mysql",
"--host", "localhost",
"--port", "3306",
"--user", "root",
"--password", "password",
"--database", "myapp"
]
}
]
}{
"mcpServers": [
{
"name": "postgres-dev",
"command": "npx",
"args": [
"universal-db-mcp",
"--type", "postgres",
"--host", "localhost",
"--port", "5432",
"--user", "postgres",
"--password", "password",
"--database", "myapp"
]
}
]
}{
"mcpServers": [
{
"name": "mysql-users",
"command": "npx",
"args": [
"universal-db-mcp",
"--type", "mysql",
"--host", "localhost",
"--port", "3306",
"--user", "root",
"--password", "password",
"--database", "users_db"
]
},
{
"name": "postgres-analytics",
"command": "npx",
"args": [
"universal-db-mcp",
"--type", "postgres",
"--host", "localhost",
"--port", "5432",
"--user", "postgres",
"--password", "password",
"--database", "analytics"
]
}
]
}- Open Continue chat panel
- Use the
/toolscommand to see available tools - Ask questions about your database:
What tables are in the database?
Show me the schema of the users table
Generate a TypeScript interface for the orders table
Find all users who signed up this week
Schema Exploration:
List all tables and their columns
What are the relationships between tables?
Show me the indexes on the products table
Code Generation:
Create a repository class for the users table
Generate SQL migrations for adding a new column
Write a function to get user orders with pagination
Data Analysis:
How many orders were placed this month?
What's the average order value?
Find the top 10 products by sales
| Tool | Description |
|---|---|
execute_query |
Execute SQL queries |
get_schema |
Get database schema information |
get_table_info |
Get detailed table information |
clear_cache |
Clear schema cache |
get_enum_values |
Get all unique values for a specified column |
get_sample_data |
Get sample data from a table (with automatic data masking) |
connect_database |
Dynamically connect to a database (supports all 17 types) |
disconnect_database |
Disconnect from the current database |
get_connection_status |
Get current database connection status |
- Use read-only database users
- Never commit credentials to version control
- Use environment variables for sensitive data
- Keep write mode disabled unless necessary
- Use specific queries instead of SELECT *
- Add LIMIT to prevent large result sets
- Cache schema information
Symptoms: Continue doesn't show database tools
Solutions:
- Verify config.json syntax is valid
- Check the file is at
~/.continue/config.json - Ensure Node.js 20+ is installed
- Restart VS Code/IDE
Symptoms: Database connection errors
Solutions:
- Verify database is running
- Check credentials are correct
- Ensure network connectivity
- Test with database client first
For integration issues:
- GitHub Issues: https://github.com/Anarkh-Lee/universal-db-mcp/issues
- Continue Discord: https://discord.gg/continue