1. Conduid
  2. Data
  3. Oracle 11g MCP
MCP server · Data

Oracle 11g MCP

Oracle Database MCP Server - Model Context Protocol server for Oracle database operations

Unclaimed data
34Low

Scored 4 months ago · breakdown

About Oracle 11g MCP

Oracle 11g MCP is an MCP server in the Data category: oracle Database MCP Server - Model Context Protocol server for Oracle database operations. It has been installed 0 times through Conduid.

Install

Clone
git clone https://github.com/touwaeriol/oracle-11g-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Oracle 11g MCP

Powered by Claude · Grounded in docs

I know everything about Oracle 11g MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • ·Scoped permissionsNot checked yet.

README

Oracle 11g MCP Server

基于官方 MCP Java SDK 实现的 Oracle 数据库 MCP 服务器,提供 SQL 执行、表结构查询和表搜索功能。

功能特性

  • 基于 MCP (Model Context Protocol) Java SDK 实现
  • 提供三个核心工具:
    • execute_sql - 执行任意 SQL 语句
    • get_table_schema - 获取表的详细结构信息
    • search_tables - 根据关键字搜索表和列
  • 支持 SELECT、INSERT、UPDATE、DELETE、CREATE、ALTER、DROP 等所有 SQL 操作
  • 支持事务管理(DML 操作自动事务)
  • 支持参数化查询
  • 结果集限制为 1000 行以避免内存溢出

环境要求

  • JDK 17 或更高版本
  • Gradle 8.x
  • Oracle 数据库(支持 11g 及以上版本)

构建项目

./gradlew clean build

构建成功后,可执行 JAR 文件位于 build/libs/oracle-11g-mcp.jar

配置

环境变量配置

创建 .env 文件(可选):

ORACLE_JDBC_URL=jdbc:oracle:thin:@//host:port/service_name
ORACLE_USERNAME=your_username
ORACLE_PASSWORD=your_password

或者直接设置环境变量:

export ORACLE_JDBC_URL="jdbc:oracle:thin:@//localhost:1521/XE"
export ORACLE_USERNAME="system"
export ORACLE_PASSWORD="oracle"

JDBC URL 格式

支持以下格式:

  • SID 格式:jdbc:oracle:thin:@host:port:SID
  • Service Name 格式:jdbc:oracle:thin:@//host:port/service_name

运行服务器

直接运行

java -jar build/libs/oracle-11g-mcp.jar

使用启动脚本

./run-mcp-server.sh

Docker 支持

构建 Docker 镜像

docker build -t oracle-mcp-server .

使用 Docker Compose

生产环境:

docker-compose up

开发环境(包含 Oracle 11g XE):

docker-compose -f docker-compose.dev.yml up

MCP 工具说明

execute_sql

执行任意 SQL 语句的通用工具。

参数:

  • sql (必需): 要执行的 SQL 语句
  • params (可选): 参数化查询的参数数组

示例:

查询数据:

{
  "name": "execute_sql",
  "arguments": {
    "sql": "SELECT * FROM users WHERE status = ?",
    "params": ["active"]
  }
}

创建表:

{
  "name": "execute_sql",
  "arguments": {
    "sql": "CREATE TABLE test_table (id NUMBER PRIMARY KEY, name VARCHAR2(100))"
  }
}

插入数据:

{
  "name": "execute_sql",
  "arguments": {
    "sql": "INSERT INTO test_table (id, name) VALUES (?, ?)",
    "params": ["1", "Test User"]
  }
}

get_table_schema

获取表的详细结构信息,包括列定义、主键、索引、外键和注释。

参数:

  • table_name (必需): 表名
  • schema (可选): 模式名(默认为当前用户)

示例:

{
  "name": "get_table_schema",
  "arguments": {
    "table_name": "EMPLOYEES",
    "schema": "HR"
  }
}

返回信息包括:

  • 列信息(名称、类型、长度、精度、是否可空、默认值、注释)
  • 主键信息
  • 索引信息(名称、类型、是否唯一、包含的列)
  • 外键信息(约束名、列、引用表、引用列、删除规则)
  • 表注释

search_tables

根据关键字搜索表和列,支持在表名、列名和注释中搜索。

参数:

  • keyword (必需): 搜索关键字
  • schema (可选): 限定搜索的模式(默认搜索所有可访问的模式)
  • search_columns (可选): 是否搜索列名和列注释(默认: true)
  • limit (可选): 返回结果的最大数量(默认: 100,最大: 500)

示例:

搜索包含"order"的表和列:

{
  "name": "search_tables",
  "arguments": {
    "keyword": "order",
    "search_columns": true,
    "limit": 50
  }
}

仅在特定模式中搜索表:

{
  "name": "search_tables",
  "arguments": {
    "keyword": "customer",
    "schema": "SALES",
    "search_columns": false
  }
}

返回信息包括:

  • 匹配的表列表(包含行数、最后分析时间、注释)
  • 匹配的列列表(包含所属表、数据类型、是否可空、注释)
  • 结果按相关性排序(完全匹配 > 前缀匹配 > 包含匹配)

项目结构

oracle-11g-mcp/
├── build.gradle              # Gradle 构建配置
├── src/main/java/
│   └── com/oracle/mcp/
│       ├── config/          # 配置类
│       ├── server/          # MCP 服务器实现
│       └── tools/           # SQL 执行工具
├── docker-compose.yml       # 生产环境配置
├── docker-compose.dev.yml   # 开发环境配置
└── Dockerfile              # Docker 镜像构建

依赖项

  • io.modelcontextprotocol.sdk:mcp:0.10.0 - MCP Java SDK
  • com.oracle.database.jdbc:ojdbc8:23.5.0.24.07 - Oracle JDBC 驱动
  • com.fasterxml.jackson.core:jackson-databind:2.15.3 - JSON 处理
  • io.github.cdimascio:dotenv-java:3.0.0 - 环境变量管理
  • ch.qos.logback:logback-classic:1.4.14 - 日志框架

注意事项

  1. 查询结果集限制为 1000 行,超过部分会被截断
  2. DML 操作(INSERT、UPDATE、DELETE)自动使用事务
  3. DDL 操作(CREATE、ALTER、DROP)立即生效
  4. 支持所有标准 SQL 语句和 Oracle 特定语法

许可证

MIT License

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Oracle 11g MCP

How do I install Oracle 11g MCP?

Run git clone https://github.com/touwaeriol/oracle-11g-mcp, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Oracle 11g MCP safe to use with an AI agent?

Its trust score is 34 out of 100 (low). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Oracle 11g MCP still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.