Get the FREE Ultimate OpenClaw Setup Guide →

oracle

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yyue9527-oracle-mcp-server java -jar target/oracle-mcp-server.jar \
  --env ORACLE_JDBC_URL="jdbc:oracle:thin:@//your-oracle-host:1521/your-service-name" \
  --env ORACLE_PASSWORD="your-password" \
  --env ORACLE_USERNAME="your-username" \
  --env SPRING_PROFILES_ACTIVE="default"

How to use

This MCP server implements Oracle database operations accessible via MCP (Model Context Protocol) with real-time updates through Server-Sent Events (SSE). It exposes tools to list all tables, describe table structures, and execute arbitrary SQL statements against an Oracle database. Clients can connect to the SSE endpoint to receive streaming updates and results as commands are executed. Use the provided MCP tools to automate database introspection and SQL execution within your Curve/Cursor IDE or any MCP-compliant client.

To use, configure the MCP server in your environment (URL and credentials) and invoke the available tools: list_tables to fetch a list of tables, describe_table with a tableName to obtain a CSV describing columns, data types, nullability, and PK information, and execute_sql with an sql statement to run queries or updates. The describe_table tool returns a CSV-formatted schema, while execute_sql returns CSV results for SELECTs or a numeric count of affected rows for DML statements. The architecture emphasizes secure connection handling, proper resource management, and error sanitization to ensure safe integration into your workflows.

How to install

Prerequisites:

  • JDK 17 installed on your machine
  • Maven 3.6+ installed
  • Access to an Oracle database (host, service name, credentials)
  • A repository clone of the Oracle MCP Server project

Installation steps:

  1. Clone the repository: git clone https://github.com/your-org/yyue9527-oracle-mcp-server.git cd yyue9527-oracle-mcp-server

  2. Build the project with Maven: mvn clean install

  3. Run the application locally: mvn spring-boot:run

  4. Optional: package as a jar for production: mvn -DskipTests package java -jar target/oracle-mcp-server.jar

Configuration tips:

  • Set up Oracle connection properties in application.properties or application.yml as described in the README.
  • Ensure environment variables or externalized configuration provide the Oracle URL, username, and password securely.

Additional notes

Tips and notes:

  • Secure handling of database credentials is essential; prefer externalized configuration or secret management for ORACLE_PASSWORD.
  • When deploying, consider using a connection pool to optimize performance and resource usage.
  • The server relies on SSE for real-time communication; ensure clients support EventSource for proper streaming experience.
  • If you encounter SQL errors, verify the provided SQL syntax and permissions for the configured Oracle user. Error messages should be sanitized in production environments.
  • The tooling exposes operations via MCP; you can integrate these endpoints into CI/CD pipelines or IDE plugins using MCP-compatible clients.

Related MCP Servers

Sponsor this space

Reach thousands of developers