Oracle MCP Server

Oracle MCP Server

Provides flexible access to Oracle databases for AI assistants like Claude, supporting SQL queries across multiple schemas with comprehensive database introspection capabilities.

Category
Visit Server

Tools

execute_query

Execute a SQL query on the Oracle database

list_tables

List tables from specified schema or all accessible schemas

describe_table

Get table structure including columns, data types, and constraints

get_table_indexes

Get indexes for a specific table

get_table_constraints

Get constraints (primary keys, foreign keys, unique, check) for a table

list_schemas

List all schemas in the database

README

Oracle MCP Server

A Model Context Protocol (MCP) server that provides flexible access to Oracle databases for AI assistants like Claude. Supports querying across multiple schemas and comprehensive database introspection.

Features

  • Execute SQL queries with parameter binding
  • List tables across multiple schemas or filter by specific schema
  • Describe table structures with multi-schema support
  • View indexes and constraints across schemas
  • Multiple Oracle authentication methods
  • Automatic parameter conversion (PostgreSQL style to Oracle)
  • SQL injection prevention via bind variables
  • Audit logging for security monitoring

Installation

npm install

Configuration

Environment Variables

Create a .env file with your Oracle connection details. Choose one of these methods:

Method 1: Easy Connect String

ORACLE_CONNECTION_STRING=hostname:1521/service_name
ORACLE_USER=your_username
ORACLE_PASSWORD=your_password

Method 2: TNS Name

ORACLE_TNS_NAME=ORCL
ORACLE_USER=your_username
ORACLE_PASSWORD=your_password

Method 3: Individual Components

ORACLE_HOST=localhost
ORACLE_PORT=1521
ORACLE_SERVICE_NAME=ORCL  # or ORACLE_SID=ORCL
ORACLE_USER=your_username
ORACLE_PASSWORD=your_password

Optional settings:

ORACLE_DEFAULT_SCHEMA=HR  # Default schema if different from user

Usage with Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "oracle": {
      "command": "node",
      "args": ["/path/to/oracle-mcp/src/index.js"],
      "env": {
        "ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
        "ORACLE_USER": "your_username",
        "ORACLE_PASSWORD": "your_password"
      }
    }
  }
}

Alternatively, use npx if you publish the package:

{
  "mcpServers": {
    "oracle": {
      "command": "npx",
      "args": ["-y", "oracle-mcp-server"],
      "env": {
        "ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
        "ORACLE_USER": "your_username",
        "ORACLE_PASSWORD": "your_password"
      }
    }
  }
}

Usage with Claude Code

For Claude Code, add to ~/.claude.json:

{
  "mcpServers": {
    "oracle": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/oracle-mcp/src/index.js"],
      "env": {
        "ORACLE_CONNECTION_STRING": "hostname:1521/service_name",
        "ORACLE_USER": "your_username",
        "ORACLE_PASSWORD": "your_password"
      }
    }
  }
}

After updating the configuration, restart Claude Desktop or Claude Code.

Available Tools

  1. execute_query - Execute any SQL query

    • Supports parameter binding
    • Auto-converts PostgreSQL-style parameters ($1) to Oracle (:1)
    • Returns rows, rowCount, and metadata
  2. list_tables - List database tables

    • Filter by specific schema or show all accessible schemas
    • Filter by pattern (with % wildcards)
    • Shows schema name, table name, row count, and last analyzed date
  3. describe_table - Get table structure

    • Column names, types, sizes
    • Nullable constraints
    • Default values
    • Works across all accessible schemas or filter by specific schema
  4. get_table_indexes - View table indexes

    • Index types and uniqueness
    • Indexed columns
    • Status information
    • Shows schema name for each index
  5. get_table_constraints - View table constraints

    • Primary keys, foreign keys
    • Unique and check constraints
    • Referenced tables
    • Shows schema name for each constraint
  6. list_schemas - List all accessible schemas

Security

  • All queries use bind variables to prevent SQL injection
  • Connections are created per-query (no persistent pools)
  • Comprehensive audit logging with timestamps and duration
  • Environment variables keep credentials secure
  • Supports both read-only and read-write operations

Requirements

  • Node.js 18+
  • Oracle Database (any version)
  • Network access to Oracle database

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured