Skip to main content
Glama
oracle-sqlplus-mcp

oracle-sqlplus-mcp

by sagar1012

oracle-sqlplus-mcp

sqlplus를 연결 백엔드로 사용하는 Oracle Database용 MCP(Model Context Protocol) 서버입니다. Oracle Instant Client Node.js 바인딩이 필요 없으며, 작동하는 sqlplus 바이너리만 있으면 됩니다.


필수 조건

  • sqlplus가 설치되어 있고 PATH에서 사용 가능해야 합니다 (Oracle Instant Client 또는 전체 Oracle 클라이언트에 포함됨)

  • Node.js 18 이상


Related MCP server: sqlserver-mcp-colossal

설치

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

연결 문자열 형식

username/password@host:port/servicename

예시:

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

Claude Desktop 설정

claude_desktop_config.json에 추가하세요:

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

선택적 환경 변수

변수

기본값

설명

ORACLE_CONNECTION

(필수)

전체 연결 문자열

SQLPLUS_PATH

sqlplus

PATH에 없는 경우 sqlplus 바이너리 경로

QUERY_TIMEOUT_MS

30000

밀리초 단위의 쿼리 타임아웃

사용자 지정 sqlplus 경로 예시

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

사용 가능한 도구

도구

설명

test_connection

연결을 테스트하고 Oracle 버전을 반환

list_schemas

테이블 개수와 함께 모든 스키마 나열

list_tables

스키마 또는 이름 패턴으로 필터링하여 테이블 나열

describe_table

열, 데이터 유형, Null 허용 여부, 기본 키 표시

get_table_sample

테이블에서 샘플 행 가져오기

execute_query

모든 SELECT 쿼리 실행

execute_ddl

DDL/DML 실행 (INSERT, UPDATE, DELETE, CREATE 등)

list_procedures

저장 프로시저, 함수, 패키지 나열


예시 프롬프트

  • "Oracle 연결 테스트"

  • "데이터베이스의 모든 스키마 나열"

  • "SCOTT 스키마의 테이블 보여줘"

  • "EMPLOYEES 테이블 설명해줘"

  • "HR.EMPLOYEES에서 샘플 행 5개 가져와"

  • "다음 쿼리 실행: SELECT * FROM departments WHERE department_id < 50"

  • "HR 스키마의 모든 저장 프로시저 나열"


문제 해결

sqlplus: command not found

SQLPLUS_PATH를 sqlplus 바이너리의 전체 경로로 설정하세요.

ORA-12541: TNS:no listener

호스트, 포트 및 Oracle 리스너가 실행 중인지 확인하세요.

ORA-01017: invalid username/password

자격 증명을 확인하세요. 연결 문자열 형식: user/pass@host:port/service.

SP2-0306: Invalid option

sqlplus 버전이 -S 자동 모드를 지원하는지 확인하세요 (모든 최신 버전은 지원합니다).

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