You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-25Lines changed: 48 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Turbular
1
+
# Turbular
2
2
3
3
<divalign="center">
4
4
@@ -8,29 +8,34 @@
8
8
9
9
</div>
10
10
11
-
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.
11
+
Turbular is an open-source Model Context Protocol (MCP) server that enables seamless database connectivity for Language
12
+
Models (LLMs). It provides a unified API interface to interact with various database types, making it perfect for AI
13
+
applications that need to work with multiple data sources.
12
14
13
15
## ✨ Features
14
16
15
17
- 🔌 **Multi-Database Support**: Connect to various database types through a single API
16
-
- 🔄 **Schema Normalization**: Automatically normalize database schemas to correct naming conventions for LLM compatibility
18
+
- 🔄 **Schema Normalization**: Automatically normalize database schemas to correct naming conventions for LLM
19
+
compatibility
17
20
- 🔒 **Secure Connections**: Support for SSL and various authentication methods
18
21
- 🚀 **High Performance**: Optimizes your LLM generated queries
19
-
- 📝 **Query Transformation**: Let LLM generate queries against normalized layouts and transform them into their unnormalized form
22
+
- 📝 **Query Transformation**: Let LLM generate queries against normalized layouts and transform them into their
23
+
unnormalized form
20
24
- 🐳 **Docker Support**: Easy deployment with Docker and Docker Compose
21
-
- 🔧 **Easy to Extend**: Adding new database providers can be easily done by extending the [BaseDBConnector interface](app/data_oracle/connectors/baseconnector.py)
25
+
- 🔧 **Easy to Extend**: Adding new database providers can be easily done by extending
26
+
the [BaseDBConnector interface](app/data_oracle/connectors/baseconnector.py)
@@ -71,22 +76,28 @@ Turbular is an open-source Model Context Protocol (MCP) server that enables seam
71
76
### Database Operations
72
77
73
78
#### Get Database Schema
79
+
74
80
```http
75
81
POST /get_schema
76
82
```
83
+
77
84
Retrieve the schema of a connected database for your LLM agent.
78
85
79
86
**Parameters:**
87
+
80
88
-`db_info`: Database connection arguments
81
89
-`return_normalize_schema` (optional): Return schema in LLM-friendly format
82
90
83
91
#### Execute Query
92
+
84
93
```http
85
94
POST /execute_query
86
95
```
96
+
87
97
Optimizes query and then execute SQL queries on the connected database.
88
98
89
99
**Parameters:**
100
+
90
101
-`db_info`: Database connection arguments
91
102
-`query`: SQL query string
92
103
-`normalized_query`: Boolean indicating if query is normalized
@@ -96,37 +107,47 @@ Optimizes query and then execute SQL queries on the connected database.
96
107
### File Management
97
108
98
109
#### Upload BigQuery Key
110
+
99
111
```http
100
112
POST /upload-bigquery-key
101
113
```
114
+
102
115
Upload a BigQuery service account key file.
103
116
104
117
**Parameters:**
118
+
105
119
-`project_id`: BigQuery project ID
106
120
-`key_file`: JSON key file
107
121
108
122
#### Upload SQLite Database
123
+
109
124
```http
110
125
POST /upload-sqlite-file
111
126
```
127
+
112
128
Upload a SQLite database file.
113
129
114
130
**Parameters:**
131
+
115
132
-`database_name`: Name to identify the database
116
133
-`db_file`: SQLite database file (.db or .sqlite)
117
134
118
135
### Utility Endpoints
119
136
120
137
#### Health Check
138
+
121
139
```http
122
140
GET /health
123
141
```
142
+
124
143
Verify if the API is running.
125
144
126
145
#### List Supported Databases
146
+
127
147
```http
128
148
GET /supported-databases
129
149
```
150
+
130
151
Get a list of all supported database types.
131
152
132
153
## 🔧 Development Setup
@@ -139,14 +160,13 @@ Get a list of all supported database types.
139
160
```
140
161
141
162
3. The development server includes:
142
-
- FastAPI server with hot reload
143
-
- PostgreSQL test database
144
-
- Pre-configured test data
163
+
- FastAPI server with hot reload
164
+
- PostgreSQL test database
165
+
- Pre-configured test data
145
166
146
167
4. Access the API documentation:
147
-
- Swagger UI: http://localhost:8000/docs
148
-
- ReDoc: http://localhost:8000/redoc
149
-
168
+
- Swagger UI: http://localhost:8000/docs
169
+
- ReDoc: http://localhost:8000/redoc
150
170
151
171
## 🤝 Contributing
152
172
@@ -166,6 +186,7 @@ We welcome contributions! Here's how you can help:
166
186
- Use meaningful commit messages
167
187
168
188
### Roadmap
189
+
169
190
1. Add more testing, formatting and commit hooks
170
191
2. Add SSH support for database connection
171
192
3. Add APIs as datasources using [steampipe](https://steampipe.io/)
@@ -176,11 +197,13 @@ We welcome contributions! Here's how you can help:
176
197
## 🧪 Testing
177
198
178
199
Run the test suite:
200
+
179
201
```bash
180
202
pytest
181
203
```
182
204
183
205
For development tests with the included PostgreSQL:
206
+
184
207
```bash
185
208
./scripts/test_connection.py
186
209
```
@@ -193,6 +216,7 @@ For development tests with the included PostgreSQL:
193
216
## 📝 Connection Examples
194
217
195
218
### PostgreSQL
219
+
196
220
```python
197
221
connection_info = {
198
222
"database_type": "PostgreSQL",
@@ -206,6 +230,7 @@ connection_info = {
206
230
```
207
231
208
232
### BigQuery
233
+
209
234
```python
210
235
connection_info = {
211
236
"database_type": "BigQuery",
@@ -216,22 +241,20 @@ connection_info = {
216
241
```
217
242
218
243
### SQLite
244
+
219
245
```python
220
246
connection_info = {
221
247
"type": "SQLite",
222
248
"database_name": "my_database"
223
249
}
224
250
```
225
251
226
-
## 📜 License
227
-
228
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
229
-
230
252
## 🙏 Acknowledgments
231
253
232
254
- FastAPI for the amazing framework
233
255
- SQLAlchemy for database support
234
-
-[@henryclickclack](https://github.com/henryclickclack)[Henry Albert Jupiter Hommel](https://www.linkedin.com/in/henry-hommel-304675234/?originalSubdomain=de) as Co-Developer ❤️
256
+
-[@henryclickclack](https://github.com/henryclickclack)[Henry Albert Jupiter Hommel](https://www.linkedin.com/in/henry-hommel-304675234/?originalSubdomain=de)
0 commit comments