Get the FREE Ultimate OpenClaw Setup Guide →

oracle

Oracle Database MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio smith-nathanh-oracle-mcp-server uvx run oracle-mcp-server --debug \
  --env ENVIRONMENT="development|production (optional, defaults to development)" \
  --env DB_CONNECTION_STRING="Oracle DB connection string in the form user/password@host:port/service"

How to use

This MCP server provides a comprehensive interface for interacting with an Oracle database. It supports safe query execution (with automatic row limiting and SQL injection safeguards), schema inspection to enumerate tables, columns, and relationships, and performance analysis through execution plans and resource estimates. It can export results in JSON or CSV formats and enforces security controls like read-only operations and whitelisting of specific tables or columns. You can query data, explore schema metadata, and analyze performance metrics via MCP-compatible clients. For chat-style workflows, the included mcp-chat demo demonstrates step-by-step tool usage by an agent, showing how to construct queries, inspect schemas, and optimize performance as the conversation progresses.

How to install

Prerequisites:

  • Python 3.10+
  • UV package manager (uv) installed and available on PATH
  • Oracle Database access and credentials
  • Oracle Instant Client installed if you plan to use advanced features
  1. Clone the repository and install dependencies:
git clone <repository-url>
cd oracle-mcp-server
# If a setup script is provided, run it to install dependencies
./setup.sh
  1. Configure database connection:
cp .env.example .env
# Edit .env with your Oracle database details (host, port, service, user, password)
  1. Run the MCP server in development mode:
uv run oracle-mcp-server --debug

Alternative: use the startup script for automatic environment setup if provided:

./start_mcp_server.sh --debug
  1. (Optional) Test the connection through the server's quick test or chat demo as described in the docs.

Additional notes

Tips and common considerations:

  • Set QUERY_LIMIT_SIZE to control automatic row limiting for safety.
  • Use the environment variable DB_CONNECTION_STRING to securely configure the database connection; avoid hard-coding credentials.
  • If you enable read-only mode, ensure your user permissions align with the allowed operations.
  • For the mcp-chat demo, set OPENROUTER_API_KEY and DB_CONNECTION_STRING to run multi-turn tool interactions.
  • Check the Oracle Instant Client installation if you plan to enable advanced features like extended data types handling.
  • Consult the documentation links in the repo for setup guides and quick references (QUICK_REFERENCE.md, SETUP_GUIDE.md).

Related MCP Servers

Sponsor this space

Reach thousands of developers