MCP Server - Oracle DB Context
About
MCP Server for working with large Oracle databases
Details
- Author
- danielmeppiel
- GitHub stars
- 127
- Downloads
- 639
- Categories
- Database
Jump to
- Smart schema caching to minimize database queries
- Targeted schema lookup for specific tables
- Table search by name pattern matching
- Foreign key relationship mapping between tables
- Built specifically for Oracle databases
- Read‑only mode enabled by default for security
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP Server - Oracle DB ContextCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install and configure it via Docker (recommended) or UV local installation in VSCode Insiders. Set environment variables like ORACLE_CONNECTION_STRING, TARGET_SCHEMA, CACHE_DIR, and optionally READ_ONLY_MODE and THICK_MODE. Start the server locally with uv run main.py. Once connected, AI assistants can call several MCP tools to interact with the database schema.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp server - oracle db context": {
"db-context": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"ORACLE_CONNECTION_STRING",
"-e",
"TARGET_SCHEMA",
"-e",
"CACHE_DIR",
"dmeppiel/mcp-db-context"
],
"env": {
"ORACLE_CONNECTION_STRING": "user/pass@localhost:1521/mydb",
"TARGET_SCHEMA": "",
"CACHE_DIR": ".cache"
}
}
}
}
}
McpServers
{
"db-context": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"ORACLE_CONNECTION_STRING",
"-e",
"TARGET_SCHEMA",
"-e",
"CACHE_DIR",
"dmeppiel/mcp-db-context"
],
"env": {
"ORACLE_CONNECTION_STRING": "user/pass@localhost:1521/mydb",
"TARGET_SCHEMA": "",
"CACHE_DIR": ".cache"
}
}
}
MCP Server - Oracle DB Context
A powerful Model Context Protocol (MCP) server that provides contextual database schema information for large Oracle databases, enabling AI assistants to understand and work with databases containing thousands of tables.
Table of Contents
- Overview - Features - Usage - Integration with GitHub Copilot in VSCode Insiders - Option 1: Using Docker (Recommended) - Option 2: Using UV (Local Installation) - Starting the Server locally - Available Tools - Architecture - Connection Modes - Thin Mode (Default) - Thick Mode - System Requirements - Performance Considerations - Contributing - License - SupportOverview
The MCP Oracle DB Context server solves a critical challenge when working with very large Oracle databases: how to provide AI models with accurate, relevant database schema information without overwhelming them with tens of thousands of tables and relationships.
By intelligently caching and serving database schema information, this server allows AI assistants to:
- Look up specific table schemas on demand
- Search for tables that match specific patterns
- Understand table relationships and foreign keys
- Get database vendor information
Features
- Smart Schema Caching: Builds and maintains a local cache of your database schema to minimize database queries
- Targeted Schema Lookup: Retrieve schema for specific tables without loading the entire database structure
- Table Search: Find tables by name pattern matching
- Relationship Mapping: Understand foreign key relationships between tables
- Oracle Database Support: Built specifically for Oracle databases
- MCP Integration: Works seamlessly with GitHub Copilot in VSCode, Claude, ChatGPT, and other AI assistants that support MCP
- Read-Only Mode: Default security mode that prevents write operations while allowing full read access
Usage
Integration with GitHub Copilot in VSCode Insiders
To use this MCP server with GitHub Copilot in VSCode Insiders, follow these steps:
1. Install VSCode Insiders
- Download and install the latest version of VSCode Insiders
2. Install GitHub Copilot Extension
- Open VSCode Insiders
- Go to the Extensions marketplace
- Search for and install "GitHub Copilot"
3. Configure MCP Server
- Recommended: Using Docker
- Alternative: Using UV
4. Enable Agent Mode
- Open Copilot chat in VSCode Insiders
- Click on "Copilot Edits"
- Choose "Agent mode"
- Click the refresh button in the chat input to load the available tools
After completing these steps, you'll have access to all database context tools through GitHub Copilot's chat interface.
Option 1: Using Docker (Recommended)
In VSCode Insiders, go to your user or workspace settings.json file and add the following:
"mcp": {
"inputs": [
{
"id": "db-password",
"type": "promptString",
"description": "Oracle DB Password",
"password": true,
}
],
"servers": {
"oracle": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"ORACLE_CONNECTION_STRING",
"-e",
"TARGET_SCHEMA",
"-e",
"CACHE_DIR",
"-e",
"THICK_MODE",
"dmeppiel/oracle-mcp-server"
],
"env": {
"ORACLE_CONNECTION_STRING":"<db-username>/${input:db-password}@<host>:1521/<service-name>",
"TARGET_SCHEMA":"",
"CACHE_DIR":".cache",
"THICK_MODE":"", // Optional: set to "1" to enable thick mode
"ORACLE_CLIENT_LIB_DIR":"", // Optional: in case you use thick mode and you want to set a non-default directory for client libraries
"READ_ONLY_MODE":"1" // Optional: set to "0" to allow write operations (default: "1" for read-only)
}
}
}
}
When using Docker (recommended approach):
- All dependencies are included in the container
- Set THICK_MODE=1 in the environment variables to enable thick mode if needed
- If you use THICK_MODE, you can optionally set the path where Oracle Client libraries are installed with ORACLE_CLIENT_LIB_DIR if it differs from the default location.
Option 2: Using UV (Local Installation)
This option requires installing and setting up the project locally:1. Prerequisites
- Python 3.12 or higher
- Oracle database access
- Oracle instant client (required for the oracledb Python package)
2. Install UV
# Install uv using curl (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using PowerShell (Windows)
irm https://astral.sh/uv/install.ps1 | iex
Make sure to restart your terminal after installing uv.
3. Project Setup
# Clone repository
git clone https://github.com/yourusername/oracle-mcp-server.git
cd oracle-mcp-server
# Create and activate virtual environment
uv venv
# Activate (On Unix/macOS)
source .venv/bin/activate
# Activate (On Windows)
.venv\Scripts\activate
# Install dependencies
uv pip install -e .
4. Configure VSCode Settings
"mcp": {
"inputs": [
{
"id": "db-password",
"type": "promptString",
"description": "Oracle DB Password",
"password": true,
}
],
"servers": {
"oracle": {
"command": "/path/to/your/.local/bin/uv",
"args": [
"--directory",
"/path/to/your/oracle-mcp-server",
"run",
"main.py"
],
"env": {
"ORACLE_CONNECTION_STRING":"<db-username>/${input:db-password}@<host>:1521/<service-name>",
"TARGET_SCHEMA":"",
"CACHE_DIR":".cache",
"THICK_MODE":"", // Optional: set to "1" to enable thick mode
"ORACLE_CLIENT_LIB_DIR":"", // Optional: in case you use thick mode and if you want to set a non-default directory for client libraries
"READ_ONLY_MODE":"1" // Optional: set to "0" to allow write operations (default: "1" for read-only)
}
}
}
}
- Replace the paths with your actual uv binary path and oracle-mcp-server directory path
For both options:
- Replace the ORACLE_CONNECTION_STRING with your actual database connection string
- The TARGET_SCHEMA is optional, it will default to the user's schema
- The CACHE_DIR is optional, defaulting to .cache within the MCP server root folder
- The READ_ONLY_MODE defaults to "1" (read-only) for security. Set to "0" only when write operations are needed
Starting the Server locally
To run the MCP server directly:
uv run main.py
For development and testing:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



