Get the FREE Ultimate OpenClaw Setup Guide →

oracle

MCP server for Oracle database access

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio samscarrow-oracle-mcp-server node /path/to/oracle-mcp/src/index.js \
  --env ORACLE_SID="" \
  --env ORACLE_HOST="" \
  --env ORACLE_PORT="" \
  --env ORACLE_USER="" \
  --env ORACLE_PASSWORD="" \
  --env ORACLE_TNS_NAME="" \
  --env ORACLE_SERVICE_NAME="" \
  --env ORACLE_DEFAULT_SCHEMA="" \
  --env ORACLE_CONNECTION_STRING="hostname:1521/service_name"

How to use

This MCP server provides a set of tools to interact with Oracle databases via AI assistants. It exposes commands for executing SQL queries with safe parameter binding, listing and describing database objects across one or more schemas, and inspecting indexes and constraints. The server supports multiple authentication methods and automatically converts PostgreSQL-style parameters to Oracle format to ensure smooth query execution. To use the Tools, configure Claude Desktop or Claude Code to point at this MCP server (either by directly running the Node.js script or via npx with the package name). The available tools include execute_query, list_tables, describe_table, get_table_indexes, get_table_constraints, and list_schemas. Each tool returns structured results along with metadata such as row counts and schemas for cross-schema queries.

How to install

Prerequisites:

  • Node.js 18+ installed on the host
  • Access to an Oracle database (credentials and network access)
  • Basic knowledge of how to configure Claude to reach an MCP server

Installation steps:

  1. Ensure Node.js is installed. Verify with: node -v npm -v

  2. Install dependencies for the MCP server project (in your project directory): npm install

  3. Prepare environment variables for Oracle access (see Environment Variables in README). Create a .env file or provide them in your Claude configuration: ORACLE_CONNECTION_STRING=hostname:1521/service_name ORACLE_USER=your_username ORACLE_PASSWORD=your_password

    Optional

    ORACLE_DEFAULT_SCHEMA=HR

  4. Run the MCP server locally (example using node): node /path/to/oracle-mcp/src/index.js

  5. Alternatively, if you publish and want to use npx with the package name:

    Ensure the package name matches the one published to npm

    npx -y oracle-mcp-server

  6. Connect Claude Desktop or Claude Code using the provided configuration examples in the README (oracle key under mcpServers).

Additional notes

Tips and caveats:

  • Use bind variables for all queries to prevent SQL injection; the server converts PostgreSQL-style parameters ($1, $2, ...) to Oracle bind variables (:1, :2, ...).
  • Each query is executed with a fresh connection for isolation; there are no persistent pools by default.
  • If you encounter connection issues, verify network access to the Oracle host and ensure the credentials are correct. Check that ORACLE_DEFAULT_SCHEMA (if set) matches the intended schema.
  • When using multiple schemas, you can query across them and specify a target schema in tools like list_tables or describe_table.
  • Audit logging is available by default; review logs for duration and timestamps to monitor performance.
  • If you switch from direct node invocation to npx, ensure the package name matches the published MCP server package name to avoid version mismatches.

Related MCP Servers

Sponsor this space

Reach thousands of developers