Get the FREE Ultimate OpenClaw Setup Guide →

oracledb_mcp_server

MCP server to connect to Oracle Database

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio rahgadda-oracledb_mcp_server uv run oracledb_mcp_server \
  --env DEBUG="True or False" \
  --env QUERY_LIMIT_SIZE="10" \
  --env TABLE_WHITE_LIST="<Comma-separated table names, e.g. ACCOUNTS,CUS_ACC_RELATIONS,CUSTOMERS> (required)" \
  --env COLUMN_WHITE_LIST="<Comma-separated table.column names, e.g. ACCOUNTS.ACC_AAD_ID,CUS_ACC_RELATIONS.CAR_CUS_ID> (required)" \
  --env DB_CONNECTION_STRING="<Oracle DB connection string for execution of queries, required>" \
  --env COMMENT_DB_CONNECTION_STRING="<Oracle DB connection string for comments, required>"

How to use

This MCP server exposes configured Oracle database tables and columns as context for large language models. By running the oracledb_mcp_server with the UV runtime, you enable structured access to the whitelisted tables and columns so that prompts can be augmented with up-to-date database context, enabling the generation and execution of SQL queries based on user prompts. The server reads environment variables to determine which tables and columns are accessible and how many records are returned per query. Use the Interceptor tooling to route prompts to this MCP server and have the inspector translate prompts into SQL-backed context. Configuration in the Claud Desktop example shows how to enable debugging, set connection strings, and define the allowed schema via TABLE_WHITE_LIST and COLUMN_WHITE_LIST. This makes it easy to tailor the MCP environment to specific use cases or production constraints.

How to install

Prerequisites:

  • Python installed (recommended Python 3.8+)
  • Pip (Python package installer)
  1. Create and activate a Python virtual environment (optional but recommended): python -m venv env source env/bin/activate # On Windows use: .\env\Scripts\activate

  2. Install the MCP server package: pip install oracledb_mcp_server

  3. Create a configuration file or set environment variables for the server. At minimum, you should provide Oracle DB connection strings and whitelist configuration. See example below for required env vars.

  4. Run the MCP server using UV runtimes: uv run oracledb_mcp_server

  5. Optional: Verify the server is reachable via the Interceptor command example provided in the README or your tooling integration.

Additional notes

Notes and tips:

  • Ensure Oracle client libraries and Python oracledb driver dependencies are satisfied in your environment so the DB connections can be established.
  • The environment variables COMMENT_DB_CONNECTION_STRING and DB_CONNECTION_STRING may differ if you want separate contexts for commentary and execution; set according to your security model.
  • TABLE_WHITE_LIST and COLUMN_WHITE_LIST must reflect existing schema objects exactly; mismatches will result in access errors.
  • If you run into SSL or network-related issues, verify that the host, port, and service name in the connection string are correct and accessible from the running environment.
  • The DEFAULT QUERY_LIMIT_SIZE is 10 if not provided; adjust to meet performance and data-return requirements.
  • When integrating with Claud Desktop or other MCP clients, ensure the command and environment are correctly wired in the client’s configuration so prompts can be properly contextualized.

Related MCP Servers

Sponsor this space

Reach thousands of developers