YO

yyue9527/oracle-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

13 stars 7 forks 품질 46 트렌드 20

A Model Context Protocol (MCP) server implementation for Oracle database operations

개요

A Model Context Protocol (MCP) server implementation for Oracle database operations, built on top of spring-ai-mcp-server-webmvc-spring-boot-starter. This service provides a set of tools for interacting with Oracle databases through MCP, utilizing Server-Sent Events (SSE) for real-time communication. - List all tables in the Oracle database - Describe table structure (columns, data types, constraints) - Execute SQL statements (SELECT, INSERT, UPDATE, DELETE) - Secure database connection management - Real-time communication via SSE - Built on spring-ai-mcp-server-webmvc-spring-boot-starter - Spring Boot 3.2.0 - spring-ai-mcp-server-webmvc-spring-boot-starter - Oracle JDBC Driver - Model Context Protocol (MCP) Framework - Lombok - Java 17 - Maven 3.6+ - Spring Boot Test Framework - JUnit 5 - JDK 17 - Maven 3.6+ - Oracle Database instance - MCP Server environment - Cursor IDE Create or modify application.properties or application.

README

원문 README의 일부입니다. 원문 보기.

Oracle MCP Server

A Model Context Protocol (MCP) server implementation for Oracle database operations, built on top of spring-ai-mcp-server-webmvc-spring-boot-starter. This service provides a set of tools for interacting with Oracle databases through MCP, utilizing Server-Sent Events (SSE) for real-time communication.

Features

  • List all tables in the Oracle database
  • Describe table structure (columns, data types, constraints)
  • Execute SQL statements (SELECT, INSERT, UPDATE, DELETE)
  • Secure database connection management
  • Real-time communication via SSE
  • Built on spring-ai-mcp-server-webmvc-spring-boot-starter

Technology Stack

Core Dependencies

  • Spring Boot 3.2.0
  • spring-ai-mcp-server-webmvc-spring-boot-starter
  • Oracle JDBC Driver
  • Model Context Protocol (MCP) Framework
  • Lombok

Development Tools

  • Java 17
  • Maven 3.6+
  • Spring Boot Test Framework
  • JUnit 5

Getting Started

Prerequisites

  • JDK 17
  • Maven 3.6+
  • Oracle Database instance
  • MCP Server environment
  • Cursor IDE

Configuration

1. Database Configuration

Create or modify application.properties or application.yml with the following settings:

oracle:
  connectionString: jdbc:oracle:thin:@//your-oracle-host:1521/your-service-name
  username: your-username
  password: your-password

2. Cursor MCP Configuration

In your Cursor IDE, configure the MCP server in the settings:

{
  "mcpServers": {
    "oracle-mcp-server": {
      "url": "http://{server-ip}:{server-port}/sse",
      "enabled": true
    }
  }
}

This configuration:

  • Sets the MCP server name as “oracle-mcp-server”
  • Configures the server URL to “http://{server-ip}:{server-port}/sse”
    • Replace {server-ip} with your server’s IP address
    • Replace {server-port} with your server’s port number
  • Enables the MCP server for use in Cursor

Building the Project

mvn clean install

Running the Application

mvn spring-boot:run

API Tools

1. List Tables Tool

  • Name: list_tables
  • Description: Get a list of all tables in Oracle database
  • Usage: No parameters required
  • Returns: Newline-separated list of table names

2. Describe Table Tool

  • Name: describe_table
  • Description: Get structure information of specified table
  • Parameter: tableName - Name of the table to describe
  • Returns: CSV format of table structure including:
    • Column names
    • Data types
    • Nullable status
    • Data length
    • Primary key information

3. Execute SQL Tool

  • Name: execute_sql
  • Description: Execute Oracle SQL statement
  • Parameter: sql - SQL statement to execute
  • Returns:
    • For SELECT: CSV format of query results
    • For INSERT/UPDATE/DELETE: Number of affected rows

Implementation Details

Architecture

com.mcp.oracle/
├── config/
│   └── OracleConfig.java         # Database configuration
├── service/
│   └── OracleService.java        # Core service implementation
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "oracle-mcp-server": { "url": "http://{server-ip}:{server-port}/sse", "enabled": true } } }