Skip to content

Commit bc49b89

Browse files
Merge pull request #10 from danielmeppiel/pooled-connections
Add connection modes section and thick mode configuration to README
2 parents f72e635 + 2c4a865 commit bc49b89

File tree

1 file changed

+49
-4
lines changed

1 file changed

+49
-4
lines changed

README.md

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ A powerful Model Context Protocol (MCP) server that provides contextual database
1212
- [Starting the Server locally](#starting-the-server-locally)
1313
- [Available Tools](#available-tools)
1414
- [Architecture](#architecture)
15+
- [Connection Modes](#connection-modes)
16+
- [Thin Mode (Default)](#thin-mode-default)
17+
- [Thick Mode](#thick-mode)
1518
- [System Requirements](#system-requirements)
1619
- [Performance Considerations](#performance-considerations)
1720
- [Contributing](#contributing)
@@ -64,9 +67,19 @@ To use this MCP server with GitHub Copilot in VSCode Insiders, follow these step
6467
After completing these steps, you'll have access to all database context tools through GitHub Copilot's chat interface.
6568

6669
#### Option 1: Using Docker (Recommended)
70+
71+
In VSCode Insiders, go to your user or workspace `settings.json` file and add the following:
72+
6773
```json
6874
"mcp": {
69-
"inputs": [],
75+
"inputs": [
76+
{
77+
"id": "db-password",
78+
"type": "promptString",
79+
"description": "Oracle DB Password",
80+
"password": true,
81+
}
82+
],
7083
"servers": {
7184
"db-context": {
7285
"command": "docker",
@@ -80,18 +93,25 @@ After completing these steps, you'll have access to all database context tools t
8093
"TARGET_SCHEMA",
8194
"-e",
8295
"CACHE_DIR",
96+
"-e",
97+
"THICK_MODE",
8398
"dmeppiel/mcp-db-context"
8499
],
85100
"env": {
86-
"ORACLE_CONNECTION_STRING":"user/pass@localhost:1521/mydb",
101+
"ORACLE_CONNECTION_STRING":"<db-username>/${input:db-password}@<host>:1521/<service-name>",
87102
"TARGET_SCHEMA":"",
88103
"CACHE_DIR":".cache",
104+
"THICK_MODE":"" // Optional: set to "1" to enable thick mode
89105
}
90106
}
91107
}
92108
}
93109
```
94110

111+
When using Docker (recommended approach):
112+
- All dependencies are included in the container
113+
- Set `THICK_MODE=1` in the environment variables to enable thick mode if needed
114+
95115
#### Option 2: Using UV (Local Installation)
96116

97117
This option requires installing and setting up the project locally:
@@ -133,7 +153,14 @@ After completing these steps, you'll have access to all database context tools t
133153
4. **Configure VSCode Settings**
134154
```json
135155
"mcp": {
136-
"inputs": [],
156+
"inputs": [
157+
{
158+
"id": "db-password",
159+
"type": "promptString",
160+
"description": "Oracle DB Password",
161+
"password": true,
162+
}
163+
],
137164
"servers": {
138165
"db-context": {
139166
"command": "/path/to/your/.local/bin/uv",
@@ -144,9 +171,10 @@ After completing these steps, you'll have access to all database context tools t
144171
"main.py"
145172
],
146173
"env": {
147-
"ORACLE_CONNECTION_STRING":"user/pass@localhost:1521/mydb",
174+
"ORACLE_CONNECTION_STRING":"<db-username>/${input:db-password}@<host>:1521/<service-name>",
148175
"TARGET_SCHEMA":"",
149176
"CACHE_DIR":".cache",
177+
"THICK_MODE":"" // Optional: set to "1" to enable thick mode
150178
}
151179
}
152180
}
@@ -294,6 +322,23 @@ This MCP server employs a three-layer architecture optimized for large-scale Ora
294322
- Handles authorization and access control
295323
- Provides schema optimization for AI consumption
296324
325+
## Connection Modes
326+
327+
The database connector supports two connection modes:
328+
329+
### Thin Mode (Default)
330+
By default, the connector uses Oracle's thin mode, which is a pure Python implementation. This mode is:
331+
- Easier to set up and deploy
332+
- Sufficient for most basic database operations
333+
- More portable across different environments
334+
335+
### Thick Mode
336+
For scenarios requiring advanced Oracle features or better performance, you can enable thick mode:
337+
- When using Docker (recommended): Set `THICK_MODE=1` in the Docker environment variables
338+
- When using local installation: Export `THICK_MODE=1` environment variable and ensure Oracle Client libraries, compatible with your system architecture and database version, are installed
339+
340+
Note: When using Docker, you don't need to worry about installing Oracle Client libraries as they are included in the container (Oracle Instant Client v23.7). The container supports Oracle databases versions 19c up to 23ai in both linux/arm64 and linux/amd64 architectures.
341+
297342
## System Requirements
298343
299344
- **Python**: Version 3.12 or higher (required for optimal performance)

0 commit comments

Comments
 (0)