Skip to main content
Glama
oracle-sqlplus-mcp

oracle-sqlplus-mcp

by sagar1012

oracle-sqlplus-mcp

Ein MCP-Server (Model Context Protocol) für Oracle Database, der sqlplus als Verbindungs-Backend verwendet. Es sind keine Oracle Instant Client Node.js-Bindings erforderlich – lediglich eine funktionierende sqlplus-Binärdatei.


Voraussetzungen

  • sqlplus muss installiert und im PATH verfügbar sein (wird mit Oracle Instant Client oder dem vollständigen Oracle-Client mitgeliefert)

  • Node.js 18+


Related MCP server: sqlserver-mcp-colossal

Installation

npm install -g oracle-sqlplus-mcp
# or run directly with npx (no install needed):
npx oracle-sqlplus-mcp

Format des Verbindungs-Strings

username/password@host:port/servicename

Beispiele:

scott/tiger@localhost:1521/ORCL
myuser/mypass@192.168.1.10:1521/XEPDB1
admin/secret@db.example.com:1521/PROD

Claude Desktop-Konfiguration

Fügen Sie dies zu Ihrer claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "oracle": {
      "command": "npx",
      "args": ["-y", "oracle-sqlplus-mcp"],
      "env": {
        "ORACLE_CONNECTION": "username/password@host:port/servicename"
      }
    }
  }
}

Optionale Umgebungsvariablen

Variable

Standard

Beschreibung

ORACLE_CONNECTION

(erforderlich)

Vollständiger Verbindungs-String

SQLPLUS_PATH

sqlplus

Pfad zur sqlplus-Binärdatei, falls nicht im PATH

QUERY_TIMEOUT_MS

30000

Abfrage-Timeout in Millisekunden

Beispiel für einen benutzerdefinierten sqlplus-Pfad

{
  "mcpServers": {
    "oracle": {
      "command": "npx",
      "args": ["-y", "oracle-sqlplus-mcp"],
      "env": {
        "ORACLE_CONNECTION": "scott/tiger@192.168.1.10:1521/ORCL",
        "SQLPLUS_PATH": "C:\\oracle\\instantclient_21_9\\sqlplus.exe",
        "QUERY_TIMEOUT_MS": "60000"
      }
    }
  }
}

Verfügbare Tools

Tool

Beschreibung

test_connection

Testet die Konnektivität und gibt die Oracle-Version zurück

list_schemas

Listet alle Schemas mit Tabellenanzahl auf

list_tables

Listet Tabellen auf, optional gefiltert nach Schema oder Namensmuster

describe_table

Zeigt Spalten, Datentypen, Nullable-Status und Primärschlüssel an

get_table_sample

Ruft Beispielzeilen aus einer Tabelle ab

execute_query

Führt eine beliebige SELECT-Abfrage aus

execute_ddl

Führt DDL/DML aus (INSERT, UPDATE, DELETE, CREATE, etc.)

list_procedures

Listet gespeicherte Prozeduren, Funktionen und Pakete auf


Beispiel-Prompts

  • "Teste die Oracle-Verbindung"

  • "Liste alle Schemas in der Datenbank auf"

  • "Zeige mir die Tabellen im SCOTT-Schema"

  • "Beschreibe die Tabelle EMPLOYEES"

  • "Hole 5 Beispielzeilen aus HR.EMPLOYEES"

  • "Führe diese Abfrage aus: SELECT * FROM departments WHERE department_id < 50"

  • "Liste alle gespeicherten Prozeduren im HR-Schema auf"


Fehlerbehebung

sqlplus: command not found

Setzen Sie SQLPLUS_PATH auf den vollständigen Pfad Ihrer sqlplus-Binärdatei.

ORA-12541: TNS:no listener

Überprüfen Sie Host, Port und ob der Oracle-Listener läuft.

ORA-01017: invalid username/password

Überprüfen Sie die Anmeldedaten. Format des Verbindungs-Strings: user/pass@host:port/service.

SP2-0306: Invalid option

Stellen Sie sicher, dass die sqlplus-Version den -S Silent-Modus unterstützt (alle modernen Versionen tun dies).

Available Tools

8 tools
describe_tableA

Describe the columns, data types and constraints of a table.

Inputs: table_name (required).

execute_ddlA

Execute a DDL or DML statement (CREATE, INSERT, UPDATE, DELETE, ALTER, DROP). Use with caution — changes are committed immediately.

Inputs: statement (required).

execute_queryA

Execute a SQL SELECT query against the Oracle database and return the results. Use standard Oracle SQL syntax. Do NOT include a trailing semicolon — it is added automatically.

Inputs: query (required).

get_table_sampleA

Fetch a sample of rows from a table (default: 10 rows).

Inputs: table_name (required), limit.

list_proceduresA

List stored procedures and functions for a given schema.

Inputs: schema.

list_schemasA

List all schemas (users/owners) in the database that have at least one table.

Inputs: no named parameters.

list_tablesB

List all tables accessible to the current user, optionally filtered by schema/owner.

Inputs: schema, search.

test_connectionA

Test the Oracle connection and return server version info.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 8 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose: describing tables, executing DDL, running queries, sampling rows, listing procedures, schemas, tables, and testing connections. No overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with underscores (e.g., describe_table, list_tables), making them easy to parse and predict.

    Tool Count5/5

    Eight tools is an appropriate number for a database interaction server, covering essential operations without being overwhelming or too sparse.

    Completeness4/5

    The toolset covers core database operations (querying, DDL/DML, listing objects, describing, sampling) but lacks capabilities like viewing procedure source code or managing users, which are minor gaps.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      MCP server for accessing Oracle databases, enabling schema exploration, query execution, and performance analysis.
      12
      MIT
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      A comprehensive MCP server for SQL Server database operations, enabling CRUD operations, schema exploration, and stored procedure execution through natural language.
      7 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for Oracle Database enabling AI assistants to explore schemas, run queries, write data, and monitor sessions via natural language. Features read-only mode by default and uses Oracle Thin mode for zero-install connectivity.
      10
      2
      MIT