Oracle

io.github.marcelo-ochoa由 GitHub 帳號 marcelo-ochoa 發布v1.0.7更新於 Oct 24, 2026

MCP server for interacting with Oracle databases

已驗證STDIO僅桌面資料庫資料與分析

概覽

AI 產生的概覽

讓助理以唯讀方式存取 Oracle 資料庫的 MCP 伺服器:執行 SQL 查詢、檢視執行計畫、資料表統計與 AWR 報告。

可以做什麼
  • 在唯讀交易中執行唯讀 SQL 查詢
  • 解析查詢執行計畫並取得目前連線結構的資料表統計
  • 產生 AWR 負載報告,可指定特定 SQL id
  • 以新的連線字串與憑證重新連線到其他資料庫
  • 讀取目前使用者的資料表結構資源(欄位名稱與資料型別)
適用情境
適合讓助理瀏覽 Oracle 結構、草擬並驗證唯讀查詢,或檢視執行計畫與負載報告,而不必自己開啟 SQL 用戶端。
執行需求
以本機程序方式執行(npm 套件或 Docker 映像),僅限桌面環境。需要能連線到 Oracle 執行個體的網路,以及 host:port/service 或 host:port:SID 格式的連線字串,可作為啟動參數或透過重新連線工具提供。憑證來自 ORACLE_USER 與 ORACLE_PASSWORD 環境變數或重新連線工具。執行計畫與 AWR 工具需要 SELECT_CATALOG_ROLE 等額外授權。
安裝前請注意
伺服器持有資料庫憑證:ORACLE_PASSWORD 屬機密,重新連線工具還會以工具參數接收密碼,可能出現在對話紀錄中。雖標示為唯讀,實際可存取的範圍仍取決於帳號本身的權限,且執行計畫與 AWR 工具需要較高的目錄角色。請只連線到你願意讓助理接觸的資料庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Oracle,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Oracle Database

A Model Context Protocol server that provides read-only access to Oracle Database. This server enables LLMs to inspect database schemas, execute and explain read-only queries.

Components

Tools

  • orcl-query

    • Execute read-only SQL queries against the connected Oracle Database
    • Input: sql (string): The SQL query to execute
    • All queries are executed within a READ ONLY transaction
  • orcl-explain

    • Explain plan SQL queries against the connected Oracle Database
    • Input: sql (string): The SQL query to execute
    • Requires GRANT SELECT_CATALOG_ROLE TO your_user;
  • orcl-stats

    • Get statistics for a given table on current connected schema
    • Input: name (string): The table name
    • Table owner is equal to USER SQL function returning value
  • orcl-connect

    • Reconnect using new credentials
    • Input: connectionString (string): SQLNet connect string for example host.docker.internal:1521/freepdb1
    • Input: user (string): Username for example scott
    • Input: password (string): Password, for example tiger

Example: orcl-connect host.docker.internal:1521/freepdb1 hr hr_2025

  • orcl-awr
    • Automatic Workload Repository (AWR) with optional sql_id, requires SELECT_CATALOG_ROLE and grant execute on DBMS_WORKLOAD_REPOSITORY package
    • Input: sql_id (string): (optional) SQL id to get the AWR report for an specific query, if null full last generated AWR report

Resources

The server provides schema information for each table in the Oracle Database current connected user:

  • Table Schemas (oracle://USER/<table>/schema)
    • JSON schema information for each table
    • Includes column names and data types
    • Automatically discovered from Oracle Database metadata

Change Log

See Change Log for the history of changes.

Demos

See Demos for usage examples with Claude Desktop, Docker AI, Gemini CLI, and Antigravity Code Editor.

Oracle AWR in action

See Oracle AWR in action for an example of an AWR report generated using the orcl-awr tool, followed by an analysis of the top SQL statements.

The Oracle server uses environment variables or the orcl-connect tool for secure credential management:

  • ORACLE_USER: Oracle username (optional if using orcl-connect)
  • ORACLE_PASSWORD: Oracle password (optional if using orcl-connect)

Connection String

The connection string should contain only the host, port, and service/SID information (without embedded credentials). Providing it as a command-line argument is optional. If omitted at startup, you must use the orcl-connect tool to establish a connection before using other functionality.

Supported connection string formats:

  • host:port/service_name
  • host:port:SID

Building

Docker:

sh
docker build -t mochoa/mcp-oracle -f src/oracle/Dockerfile .

Usage with Claude Desktop

To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:

Docker

  • When running Docker on macOS, use host.docker.internal if the Oracle Database is running on the host network (e.g., localhost)
  • Credentials are passed via environment variables ORACLE_USER and ORACLE_PASSWORD
json
{  "mcpServers": {    "oracle": {      "command": "docker",      "args": [        "run",         "-i",         "--rm",        "-e", "ORACLE_USER=myuser",        "-e", "ORACLE_PASSWORD=mypassword",        "mochoa/mcp-oracle",        "host.docker.internal:1521/freepdb1"      ]    }  }}

Note: You can still provide the connection string as a final argument if you want to connect automatically on startup: "args": [..., "mochoa/mcp-oracle", "host.docker.internal:1521/freepdb1"].

Sources

As usual the code of this extension is at GitHub, feel free to suggest changes and make contributions, note that I am a beginner developer of React and TypeScript so contributions to make this UI better are welcome.

Compared to SQLcl MCP server

Using SQLcl Docker extension you could register a connection using:

sh
docker exec --user sqlcl -ti mochoa_sqlcl-docker-extension-desktop-extension-service /opt/sqlcl/bin/sql -save hr_mcp -savepwd hr/[email protected]:1521/freepdb1   

after that using this registration:

yml
{  "mcpServers": {    "sqlcl-mcp-server": {      "type": "stdio",      "command": "docker",      "args": [        "exec",        "--user",        "sqlcl",        "-i",        "mochoa_sqlcl-docker-extension-desktop-extension-service",        "/opt/sqlcl/bin/sql",        "-mcp"      ]    }  }}

Just replace above Demo prompts instead of "orcl-query" tool use "run-sql".

📜 License

This project is licensed under the Apache License, Version 2.0 for new contributions, with existing code under MIT - see the LICENSE file for details.

來源:src/oracle/README.md,提交 bd2ce8f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.7最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。