OracleDB MCP
A Model Context Protocol Server that enables LLMs to interact with Oracle Database by providing database tables/columns as context, allowing users to generate SQL statements and retrieve results using natural language prompts.
What is OracleDB MCP?
OracleDB MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that enables llms to interact with oracle database by providing database tables/columns as context, allowing users to generate sql statements and retrieve results using n...
A Model Context Protocol Server that enables LLMs to interact with Oracle Database by providing database tables/columns as context, allowing users to generate SQL statements and retrieve results using natural language prompts.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol Server that enables LLMs to interac
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx oracledb-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use OracleDB MCP
The OracleDB MCP Server is a Python-based Model Context Protocol server that gives LLMs direct access to Oracle Database tables and columns. It exposes a configurable whitelist of tables and columns as context, enabling AI assistants to generate SQL queries, execute them against the database, and return results — all from natural language prompts. This is particularly useful for teams who want conversational access to Oracle data without exposing the entire database schema.
Prerequisites
- Python 3.10+ and uv or pip package manager
- An Oracle Database instance with a valid connection string
- Oracle Instant Client installed on the host machine (required by python-oracledb thin/thick mode)
- An MCP-compatible client such as Claude Desktop
Install the oracledb_mcp_server package
Install the server from PyPI using pip or uv. The package includes all required Oracle DB and MCP dependencies.
pip install oracledb_mcp_serverCreate a .env configuration file
Create a .env file in your working directory with the Oracle connection string and table/column whitelists. Both a comment connection string and an execution connection string are required.
DEBUG=True
COMMENT_DB_CONNECTION_STRING=oracle+oracledb://USERNAME:PASSWORD@HOST:PORT/?service_name=SERVICENAME
DB_CONNECTION_STRING=oracle+oracledb://USERNAME:PASSWORD@HOST:PORT/?service_name=SERVICENAME
TABLE_WHITE_LIST=ACCOUNTS,CUSTOMERS
COLUMN_WHITE_LIST=ACCOUNTS.ACC_ID,CUSTOMERS.CUS_ID
QUERY_LIMIT_SIZE=10Test the server locally
Run the server from the directory containing your .env file to verify the Oracle connection works before connecting to an MCP client.
uv run oracledb_mcp_serverConfigure Claude Desktop
Add the server configuration to your Claude Desktop config file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
Restart Claude Desktop
After saving the configuration, restart Claude Desktop. The server will be available and Claude will have access to the whitelisted Oracle tables and columns as context for SQL generation.
OracleDB MCP Examples
Client configuration
Claude Desktop config block with all required environment variables for connecting to Oracle Database.
{
"mcpServers": {
"oracledb_mcp_server": {
"command": "uv",
"args": ["run", "oracledb_mcp_server"],
"env": {
"DEBUG": "True",
"COMMENT_DB_CONNECTION_STRING": "oracle+oracledb://USERNAME:PASSWORD@IP:PORT/?service_name=SERVICENAME",
"DB_CONNECTION_STRING": "oracle+oracledb://USERNAME:PASSWORD@IP:PORT/?service_name=SERVICENAME",
"TABLE_WHITE_LIST": "ACCOUNTS,CUS_ACC_RELATIONS,CUSTOMERS",
"COLUMN_WHITE_LIST": "ACCOUNTS.ACC_AAD_ID,CUS_ACC_RELATIONS.CAR_CUS_ID,CUSTOMERS.CUS_ID",
"QUERY_LIMIT_SIZE": "10"
}
}
}
}Prompts to try
Natural language prompts that the server will translate into Oracle SQL queries and execute.
- "Show me the first 10 rows from the CUSTOMERS table"
- "How many accounts are linked to customer ID 12345?"
- "List all customer IDs from CUS_ACC_RELATIONS where the account has an AAD ID"
- "Generate a SQL query to find all accounts with no associated customers"Troubleshooting OracleDB MCP
ORA-12541 or connection refused errors when starting the server
Verify the DB_CONNECTION_STRING host, port, and service_name are correct. If using Oracle Thick mode, ensure Oracle Instant Client is installed and the LD_LIBRARY_PATH (Linux) or PATH (Windows) is set to the Instant Client directory.
Server starts but returns empty results or schema errors
Check that TABLE_WHITE_LIST contains exact table names in UPPERCASE as stored in Oracle's data dictionary. Column names in COLUMN_WHITE_LIST must follow the TABLE.COLUMN format exactly, e.g., CUSTOMERS.CUS_ID.
uv command not found when running via Claude Desktop
Use the full absolute path to uv in the command field, e.g., /Users/yourname/.local/bin/uv. Claude Desktop does not inherit shell PATH variables. Run 'which uv' in your terminal to find the correct path.
Frequently Asked Questions about OracleDB MCP
What is OracleDB MCP?
OracleDB MCP is a Model Context Protocol (MCP) server that model context protocol server that enables llms to interact with oracle database by providing database tables/columns as context, allowing users to generate sql statements and retrieve results using natural language prompts. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install OracleDB MCP?
Follow the installation instructions on the OracleDB MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with OracleDB MCP?
OracleDB MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is OracleDB MCP free to use?
Yes, OracleDB MCP is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
OracleDB MCP Alternatives — Similar Databases Servers
Looking for alternatives to OracleDB MCP? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up OracleDB MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use OracleDB MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.