A MCP server allowing LLM agents to easily connect and retrieve data from any database
Turbular is an open-source Model Context Protocol (MCP) server that enables seamless database connectivity for Language Models (LLMs). It provides a unified API interface to interact with various database types, making it perfect for AI applications that need to work with multiple data sources.
Database Type | Status | Icon |
---|---|---|
PostgreSQL | โ | |
MySQL | โ | |
SQLite | โ | |
BigQuery | โ | |
Oracle | โ | |
MS SQL | โ | |
Redshift | โ | ![]() |
Clone the repository:
git clone https://github.com/raeudigerRaeffi/turbular.git
cd turbular
Start the development environment:
docker-compose -f docker-compose.dev.yml up --build
Test the connection:
./scripts/test_connection.py
Install Python 3.11 or higher
Install dependencies:
pip install -r requirements.txt
Run the server:
uvicorn app.main:app --reload
POST /get_schema
Retrieve the schema of a connected database for your LLM agent.
Parameters:
db_info
: Database connection argumentsreturn_normalize_schema
(optional): Return schema in LLM-friendly formatPOST /execute_query
Optimizes query and then execute SQL queries on the connected database.
Parameters:
db_info
: Database connection argumentsquery
: SQL query stringnormalized_query
: Boolean indicating if query is normalizedmax_rows
: Maximum number of rows to returnautocommit
: Boolean for autocommit modePOST /upload-bigquery-key
Upload a BigQuery service account key file.
Parameters:
project_id
: BigQuery project IDkey_file
: JSON key filePOST /upload-sqlite-file
Upload a SQLite database file.
Parameters:
database_name
: Name to identify the databasedb_file
: SQLite database file (.db or .sqlite)GET /health
Verify if the API is running.
GET /supported-databases
Get a list of all supported database types.
Fork and clone the repository
Create a development environment:
docker-compose -f docker-compose.dev.yml up --build
The development server includes:
Access the API documentation:
We welcome contributions! Here's how you can help:
Run the test suite:
pytest
For development tests with the included PostgreSQL:
./scripts/test_connection.py
connection_info = {
"database_type": "PostgreSQL",
"username": "user",
"password": "password",
"host": "localhost",
"port": 5432,
"database_name": "mydb",
"ssl": False
}
connection_info = {
"database_type": "BigQuery",
"path_cred": "/path/to/credentials.json",
"project_id": "my-project",
"dataset_id": "my_dataset"
}
connection_info = {
"type": "SQLite",
"database_name": "my_database"
}
This project is licensed under the MIT License - see the LICENSE file for details.
No configuration available
Related projects feature coming soon
Will recommend related projects based on sub-categories