Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
bdcff7d
Add OJDBC Log Analyzer MCP Server code
Youssef-Erradi Nov 19, 2025
c470afd
Add target and dependency-reduced-pom.xml to .gitignore
Youssef-Erradi Nov 19, 2025
a4299fe
Fix package name
Youssef-Erradi Nov 19, 2025
4ccc4a0
Fix configuration for maven shade plugin
Youssef-Erradi Nov 19, 2025
4c9408f
Remove dependency-reduced-pom.xml from .gitignore file
Youssef-Erradi Nov 19, 2025
9e6d90b
Add type to the provided JSON configuration
Youssef-Erradi Nov 19, 2025
ceca78c
Add title to tools and fix their names
Youssef-Erradi Nov 19, 2025
ba21492
Fix name and description of list-log-files-from-directory tool
Youssef-Erradi Nov 19, 2025
f1f1969
Adding support for yaml config (custom tools and database connections)
aarrasseayoub01 Nov 20, 2025
351d946
more refactoring
aarrasseayoub01 Nov 20, 2025
22a11bd
Code refactoring
aarrasseayoub01 Nov 20, 2025
340f3f8
Add http streamable transport method && update readme && enable tools…
MouhsinElmajdouby Nov 24, 2025
de8196a
Adding similarity search and explain/execute plan tools support. Addi…
aarrasseayoub01 Nov 24, 2025
ef02f18
update jetty version to 12.1.1
MouhsinElmajdouby Nov 25, 2025
a1a3843
Merge remote-tracking branch 'origin/yaml-config' into yaml-config
MouhsinElmajdouby Nov 25, 2025
a3a2147
Rename OracleJDBCLogAnalyzerMCPServer class and test to OracleJDBCLog…
Youssef-Erradi Nov 25, 2025
1ea3202
Add oauth and web packages
Youssef-Erradi Nov 25, 2025
1415e52
Fix OracleJDBCLogAnalyzer class name
Youssef-Erradi Nov 25, 2025
adf1d05
Use JUL for logging
Youssef-Erradi Nov 25, 2025
9897a9b
hanlde NPE by logging info when YAML config file is not provided
Youssef-Erradi Nov 25, 2025
ba3605c
Add HTTP Authentication Configuration section and system properties
Youssef-Erradi Nov 25, 2025
2460421
Merge pull request #1
Youssef-Erradi Nov 25, 2025
abdcdee
Remove LICENSE.txt file
Youssef-Erradi Nov 25, 2025
e2bfe6d
Remove THIRD_PARTY_LICENSES.txt file
Youssef-Erradi Nov 25, 2025
fdaeec5
Adding support for env variables within yaml file
aarrasseayoub01 Nov 25, 2025
4c34fb2
Add Dockerfile and container usage documentation
MouhsinElmajdouby Nov 25, 2025
3501993
Update json with bash tags in readme
MouhsinElmajdouby Nov 25, 2025
28a6967
Updating list of tools
aarrasseayoub01 Nov 25, 2025
8087b9f
updating readme
aarrasseayoub01 Nov 25, 2025
7c5fa26
Remove EXPOSE 45450 from Dockerfile
MouhsinElmajdouby Nov 25, 2025
2be4430
Merge pull request #4 from Youssef-Erradi/mcp-server-docker-image
Youssef-Erradi Nov 25, 2025
3e949d5
Merge pull request #3 from Youssef-Erradi/yaml-env-variable
Youssef-Erradi Nov 25, 2025
6f25fad
Add WebUtils class with buildURLFromRequest static method
Youssef-Erradi Nov 26, 2025
caae5f7
Remove buildServerURL method
Youssef-Erradi Nov 26, 2025
41ac365
Rename errorHeader method to handleError and add HttpServletRequest p…
Youssef-Erradi Nov 26, 2025
e7a26c1
Use WebUtils.buildURLFromRequest to buil the MCP endpoint
Youssef-Erradi Nov 26, 2025
860019a
Add 'redirectOAuthToOpenID' system property to support OAuth servers …
Youssef-Erradi Nov 26, 2025
105e882
Switch from jetty http server to tomcat server
MouhsinElmajdouby Nov 26, 2025
871b82f
Merge pull request #5 from Youssef-Erradi/switch-jetty-to-tomcat-http…
Youssef-Erradi Nov 27, 2025
b83d84a
Adding support for http + ssl
aarrasseayoub01 Nov 27, 2025
321892b
Updating readme
aarrasseayoub01 Nov 27, 2025
7efc45c
Handling missing certificate info
aarrasseayoub01 Nov 28, 2025
34bc91c
updating readme
aarrasseayoub01 Nov 28, 2025
3669e79
Merge pull request #6 from Youssef-Erradi/https-support
Youssef-Erradi Nov 28, 2025
14555fb
Switch Docker image to Oracle OpenJDK 17
MouhsinElmajdouby Nov 28, 2025
86a767c
Merge pull request #7 from Youssef-Erradi/switch-to-oracle-openjdk17-…
Youssef-Erradi Nov 28, 2025
9a5a80e
Grouping all needed system properties into one class
aarrasseayoub01 Dec 2, 2025
ccf7bd7
Adding custom tool schemas for the custom tools
aarrasseayoub01 Dec 2, 2025
efb7314
making yaml file work fine without sources
aarrasseayoub01 Dec 2, 2025
f1efc13
Updating multiple source config yaml behaviour and the default source…
aarrasseayoub01 Dec 3, 2025
8ff4993
Merge branch 'oracle-db-toolbox-mcp-server' of https://github.com/You…
aarrasseayoub01 Dec 3, 2025
53b5234
Merge pull request #8 from Youssef-Erradi/multiple-changes
jeandelavarene Dec 4, 2025
877c7b3
Making sure env variable substitution happens before getting default …
aarrasseayoub01 Dec 5, 2025
6226e68
Merge pull request #9 from Youssef-Erradi/multiple-changes
jeandelavarene Dec 5, 2025
2632d74
Add getMissingConfigurationWarningMessage() method
Youssef-Erradi Dec 7, 2025
668d84d
Add support for reading ORACLE_DB_TOOLBOX_AUTH_TOKEN env var and use …
Youssef-Erradi Dec 7, 2025
f8718bc
Fix log line in enabling Authentication without OAuth2 section in README
Youssef-Erradi Dec 7, 2025
8aec622
Making Http optional
aarrasseayoub01 Dec 8, 2025
7f4bb31
merge
aarrasseayoub01 Dec 8, 2025
4fa02a4
Merge pull request #10 from Youssef-Erradi/optional-http
Youssef-Erradi Dec 8, 2025
b382503
Fix quoting typo in Docker JAVA_TOOL_OPTIONS example
MouhsinElmajdouby Dec 10, 2025
f6c171b
Merge pull request #11 from Youssef-Erradi/fix-docker-java-tool-optio…
Youssef-Erradi Dec 10, 2025
cb487e2
Rename log analyzer tools to include 'jdbc' or 'rdbms' keywords
Youssef-Erradi Dec 10, 2025
dcd6b3b
TODO list
jeandelavarene Dec 10, 2025
bf32292
new tools package for embedded tools
aarrasseayoub01 Dec 10, 2025
adb06bf
merge
aarrasseayoub01 Dec 10, 2025
6475ef7
Updating read.me to put more emphasis on custom tools and ssl support
aarrasseayoub01 Dec 10, 2025
ce65927
Rename to package
Youssef-Erradi Dec 10, 2025
026dbf9
Add Copyright and License headders + Add JavaDoc
Youssef-Erradi Dec 10, 2025
333673f
Rename mainClass to 'OracleDatabaseMCPToolkit'
Youssef-Erradi Dec 10, 2025
2233526
rename oracle-db-toolbox-mcp-server to oracle-db-mcp-toolkit
Youssef-Erradi Dec 10, 2025
26b4d70
Merge pull request #12 from Youssef-Erradi/refactoring
jeandelavarene Dec 10, 2025
26ec484
Reorganising
aarrasseayoub01 Dec 10, 2025
7489b77
Merge pull request #13 from Youssef-Erradi/refactoring
aarrasseayoub01 Dec 10, 2025
b627b58
Format changes
jeandelavarene Dec 10, 2025
7352926
Add license
jeandelavarene Dec 10, 2025
6a0c87f
Adding license.txt and changing "source" to "dataSource"
aarrasseayoub01 Dec 10, 2025
ee2b8c8
Merge pull request #14 from Youssef-Erradi/refactoring
aarrasseayoub01 Dec 10, 2025
befbd2c
Renaming toolbox to toolkit
jeandelavarene Dec 10, 2025
179bb26
Merge remote-tracking branch 'origin/oracle-db-toolbox-mcp-server' in…
jeandelavarene Dec 10, 2025
4ff52ae
Renaming toolbox to toolkit
jeandelavarene Dec 10, 2025
edf3c30
Updating readme with datasource
aarrasseayoub01 Dec 11, 2025
bca223b
Merge pull request #15 from Youssef-Erradi/refactoring
aarrasseayoub01 Dec 11, 2025
38b46f5
Making fields private and using getters instead
aarrasseayoub01 Dec 11, 2025
04bc415
Adding javadoc for enableHttps method
aarrasseayoub01 Dec 11, 2025
e051448
Merge pull request #16 from Youssef-Erradi/refactoring
jeandelavarene Dec 11, 2025
8365d65
Clarify README wording for vault-based providers
MouhsinElmajdouby Dec 11, 2025
2de9d4d
Adding javadoc for enableHttps method
aarrasseayoub01 Dec 11, 2025
64e6ed0
Using char[] for passwords instead of String
aarrasseayoub01 Dec 11, 2025
53a5aca
Add password method as a workaround for the necessity of leaving pass…
aarrasseayoub01 Dec 11, 2025
894e38d
Fixing conflicts and making fields public again for yaml parsing
aarrasseayoub01 Dec 11, 2025
beb3652
.
aarrasseayoub01 Dec 11, 2025
c78b0e0
Merge pull request #18 from Youssef-Erradi/docs-clarify-ojdbc-ext-dir…
aarrasseayoub01 Dec 11, 2025
4e4228b
Adding DEMO.md
aarrasseayoub01 Dec 12, 2025
3a8fa96
Merge pull request #19 from Youssef-Erradi/demo
aarrasseayoub01 Dec 12, 2025
7317213
Merge branch 'oracle:main' into oracle-db-mcp-toolkit
Youssef-Erradi Dec 15, 2025
b30969d
Add diagram
jeandelavarene Dec 15, 2025
a0a92ed
Add the YAML configuration file that creates the hotels-by-name custo…
Youssef-Erradi Dec 16, 2025
663ce1e
Updating README.md and DEMO.md with more details
aarrasseayoub01 Dec 16, 2025
36dd6f3
Merge pull request #20 from Youssef-Erradi/readme-more-details
jeandelavarene Dec 16, 2025
8d4b5ce
Enabling keep alive and adding validation to ucp (#21)
aarrasseayoub01 Dec 17, 2025
b39b147
Fix 'get-jdbc-connection-events' tool name - update DEMO.md
Youssef-Erradi Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ venv.bak/

.coverage*
htmlcov/

# Maven
**/target/
131 changes: 131 additions & 0 deletions src/oracle-db-mcp-toolkit/DEMO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Oracle Database MCP Toolkit Demo

## 1.Overview

To test the capabilities of the Oracle Database MCP Toolkit, a demo instance of the MCP server is made available via
<https://mcptoolkit.orcl.dev:45453/mcp> with the following tools activated:

JDBC log analysis tools:

- **`get-jdbc-stats`**: Extracts performance statistics including error counts, sent/received packets and byte counts.
- **`get-jdbc-queries`**: Retrieves all executed SQL queries with timestamps and execution times.
- **`get-jdbc-errors`**: Extracts all errors reported by both server and client.
- **`jdbc-log-comparison`**: Compares two log files for performance metrics, errors, and network information.

RDBMS/SQLNet trace analysis Tools:

- **`get-rdbms-errors`**: Extracts errors from RDBMS/SQLNet trace files.
- **`get-rdbms-packet-dumps`**: Extracts packet dumps for a specific connection ID.

Custom tools (created using YAML configuration file):

- **`hotels-by-name`**: Returns the details of a hotel given its name. The details include the capacity, rating and address.
This tool is created using the following YAML configuration file:

```yaml
dataSources:
dev-db:
url: ${db_url}
user: ${user}
password: ${password}

tools:
hotels-by-name:
dataSource: dev-db
description: Returns the details of a hotel given its name. The details include the capacity, rating and address.
parameters:
- name: name
type: string
description: Hotel name to search for.
statement: SELECT * FROM hotels WHERE name LIKE '%' || :name || '%'
```

Where `${db_url}`, `${user}` and `${password}`are environment variables.

## 2. Requirements

An MCP Client that support Streamable HTTP transport mode is needed, such as MCP Inspector, Cline or Claude Desktop.

**Note**: If you're using Claude Desktop, you also need [mcp-remote](https://www.npmjs.com/package/mcp-remote).

## 3. Setup

The deployed instance uses `streamableHttp` transport protocol and a runtime generated `Authorization` token.

Use the following token `3e297077-f01e-4045-a9d0-2a71e97e6dfa`.

### MCP Inspector

To use MCP Inspector as an MCP client, specify `streamableHttp`as transport type, `https://mcptoolkit.orcl.dev:45453/mcp` as the URL, _Via Proxy_ as Connection Type,
for Authentication, add a `Authorization` custom header with `Bearer 3e297077-f01e-4045-a9d0-2a71e97e6dfa` as value.
the final configuration should look as shown below:

<img src="https://objectstorage.eu-amsterdam-1.oraclecloud.com/n/axumz0amlzwj/b/oracle-db-toolkit-mcp-demo/o/mcp-Inspector-1.png" height="500px" width="auto" alt="MCP Inspector config screenshot">

After checking the configuration, click the *Connect* button, and the available tools will be shown in the main section:

<img src="https://objectstorage.eu-amsterdam-1.oraclecloud.com/n/axumz0amlzwj/b/oracle-db-toolkit-mcp-demo/o/mcp-Inspector-2.png" height="500px" width="auto" alt="MCP Inspector tools screenshot">

_Note :_ The filePath should be provided as a URL.

### Cline

Add or merge this configuration into `cline_mcp_settings.json`:

```json
{
"mcpServers": {
"Oracle Database MCP Toolkit (Demo)": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"type": "streamableHttp",
"url": "https://mcptoolkit.orcl.dev:45453/mcp",
"headers": {
"Authorization": "Bearer 3e297077-f01e-4045-a9d0-2a71e97e6dfa"
}
}
}
}
```

After saving the configuration file, the available tools will be shown in the *Configure* Tab of *MCP Servers* settings:

<img src="https://objectstorage.eu-amsterdam-1.oraclecloud.com/n/axumz0amlzwj/b/oracle-db-toolkit-mcp-demo/o/cline-1.png" height="500px" width="auto" alt="Cline tools screenshot">

Here's an example of a prompt that trigger the `get-jdbc-queries` tool:

<img src="https://objectstorage.eu-amsterdam-1.oraclecloud.com/n/axumz0amlzwj/b/oracle-db-toolkit-mcp-demo/o/cline-2.png" height="500px" width="auto" alt="Cline prompt example screenshot">

### Claude Desktop

In order to connect the MCP server and also to provide the `Authorization` token to Claude Desktop, The [mcp-remote](https://www.npmjs.com/package/mcp-remote) is used to properly configure.
Below is an example of `claude_desktop_config.json` file:

```json
{
"mcpServers": {
"Oracle Database MCP Toolkit (Demo)": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcptoolkit.orcl.dev:45453/mcp",
"--header",
"Authorization:${DEMO_TOKEN}"
],
"env": {
"DEMO_TOKEN": "Bearer 3e297077-f01e-4045-a9d0-2a71e97e6dfa"
}
}
}
}
```

Upon saving the configuration file an opening Claude Desktop, you'll be to see the tools in the *Connectors* section:

<img src="https://objectstorage.eu-amsterdam-1.oraclecloud.com/n/axumz0amlzwj/b/oracle-db-toolkit-mcp-demo/o/claude-1.png" height="500px" width="auto" alt="Claude Desktop tools screenshot">

Here's the result of the same prompt used to know what queries were executed :

<img src="https://objectstorage.eu-amsterdam-1.oraclecloud.com/n/axumz0amlzwj/b/oracle-db-toolkit-mcp-demo/o/claude-2.png" height="500px" width="auto" alt="Claude Desktop prompt example screenshot">
35 changes: 35 additions & 0 deletions src/oracle-db-mcp-toolkit/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ---------- 1) Build stage ----------
FROM container-registry.oracle.com/java/openjdk:17 AS builder

ARG MAVEN_VERSION=3.9.11
ARG MAVEN_BASE_URL=https://dlcdn.apache.org/maven/maven-3

RUN curl -fsSL \
${MAVEN_BASE_URL}/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
-o /tmp/maven.tar.gz \
&& tar -xzf /tmp/maven.tar.gz -C /opt \
&& ln -s /opt/apache-maven-${MAVEN_VERSION} /opt/maven \
&& rm /tmp/maven.tar.gz

ENV MAVEN_HOME=/opt/maven
ENV PATH="${MAVEN_HOME}/bin:${PATH}"

WORKDIR /src

COPY . .

RUN mvn -B -q -DskipTests clean package

# ---------- 2) Runtime stage ----------
FROM container-registry.oracle.com/java/openjdk:17

RUN useradd -r -u 10001 appuser && \
mkdir -p /app /ext && chown -R appuser:appuser /app /ext

WORKDIR /app
USER appuser

COPY --from=builder /src/target/oracle-db-mcp-toolkit-*.jar \
/app/oracle-db-mcp-toolkit.jar

ENTRYPOINT ["java", "-jar", "/app/oracle-db-mcp-toolkit.jar"]
35 changes: 35 additions & 0 deletions src/oracle-db-mcp-toolkit/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Copyright (c) 2025 Oracle and/or its affiliates.

The Universal Permissive License (UPL), Version 1.0

Subject to the condition set forth below, permission is hereby granted to any
person obtaining a copy of this software, associated documentation and/or data
(collectively the "Software"), free of charge and under any and all copyright
rights in the Software, and any and all patent rights owned or freely
licensable by each licensor hereunder covering either (i) the unmodified
Software as contributed to or provided by such licensor, or (ii) the Larger
Works (as defined below), to deal in both

(a) the Software, and
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
one is included with the Software (each a "Larger Work" to which the Software
is contributed by such licensors),

without restriction, including without limitation the rights to copy, create
derivative works of, display, perform, and distribute the Software and make,
use, sell, offer for sale, import, export, have made, and have sold the
Software and the Larger Work(s), and to sublicense the foregoing rights on
either these or other terms.

This license is subject to the following condition:
The above copyright notice and either this complete permission notice or at
a minimum a reference to the UPL must be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading