OracleDB MCP

v1.0.0Databasesstable

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.

oracledb-mcp-servermcpai-integration
Share:
35
Stars
0
Downloads
0
Weekly
0/5

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

Query Oracle Database using natural language prompts.
Generate SQL statements from user requests.
Retrieve data and analyze schemas via AI.
rahgadda

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedApr 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx oracledb-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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_server
2

Create 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=10
3

Test 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_server
4

Configure Claude Desktop

Add the server configuration to your Claude Desktop config file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).

5

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.

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.

Quick Config Preview

{ "mcpServers": { "oracledb-mcp-server": { "command": "npx", "args": ["-y", "oracledb-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides