GS

git-scarrow/oracle-mcp-server

Database management

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 4 forks Качество 80 Тренд 26MIT

[MOVED → codeberg.org/scarrow/oracle-mcp-server] MCP server for Oracle database access

Обзор

A Model Context Protocol (MCP) server for Oracle with two layers: - generic Oracle query/introspection tools - a backend-owned Lab control-plane mirror that reproduces the Notion Lab dispatch/return loop on Oracle tables - 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 - Check Lab control-plane gates and build dispatch packets from backend state - Stamp dispatch consumption, ingest execution returns, and create writers-room scene items - Bootstrap the same Lab mirror on Oracle or PostgreSQL using the included DDL - Multiple Oracle authentication methods - Automatic parameter conversion (PostgreSQL style to Oracle) - SQL injection prevention via bind variables - Audit logging for security monitoring Create a .env file with your Oracle connection details.

README

Показан фрагмент оригинального README. Открыть оригинал.

Oracle MCP Server

A Model Context Protocol (MCP) server for Oracle with two layers:

  • generic Oracle query/introspection tools
  • a backend-owned Lab control-plane mirror that reproduces the Notion Lab dispatch/return loop on Oracle tables

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
  • Check Lab control-plane gates and build dispatch packets from backend state
  • Stamp dispatch consumption, ingest execution returns, and create writers-room scene items
  • Bootstrap the same Lab mirror on Oracle or PostgreSQL using the included DDL
  • 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.

Открыть полный README на GitHub

Установка

npx -y oracle-mcp-server
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "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" } } } }