Skip to content

BAEL-9140 Quarkus MCP code #18576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
576c87e
BAEL-7248 code for How to select date from Datepicker in Selenium
Jan 5, 2025
a1fe105
BAEL-7248 code for minor changes
Jan 5, 2025
9edcc46
Merge branch 'eugenp:master' into master
vshanbha Jan 12, 2025
cabd6f0
Merge branch 'eugenp:master' into master
vshanbha Jan 26, 2025
22881e9
BAEL-7248 modified code to use FluentWait without timeout
Jan 26, 2025
ba85993
BAEL-7248 modified code removed unwanted lines
Jan 26, 2025
cf1357f
Merge branch 'eugenp:master' into master
vshanbha Feb 1, 2025
85620af
BAEL-7248 indendention of static variables modified in SeleniumDatePi…
Feb 1, 2025
57d995c
Merge branch 'eugenp:master' into master
vshanbha Apr 24, 2025
0d4fb6e
Merge branch 'eugenp:master' into master
vshanbha May 5, 2025
b432a4a
Merge branch 'eugenp:master' into master
vshanbha May 17, 2025
324a9be
BAEL-9140 Quarkus MCP server added
vshanbha May 18, 2025
fad8052
Merge branch 'eugenp:master' into master
vshanbha May 18, 2025
a0e3ede
BAEL-9140 Quarkus MCP server unit tests added
vshanbha May 18, 2025
6209e8e
BAEL-9140 Quarkus MCP server module pom and unit test dependencies mo…
vshanbha May 24, 2025
aca903d
Merge branch 'eugenp:master' into master
vshanbha May 24, 2025
a202a37
BAEL-9140 Quarkus MCP client module added
vshanbha May 24, 2025
2f9caa8
BAEL-9140 Quarkus MCP tweaking of code and prompts
vshanbha May 25, 2025
980aea4
Merge branch 'eugenp:master' into master
vshanbha May 25, 2025
c9cefb4
Merge branch 'eugenp:master' into master
vshanbha May 26, 2025
e5fe03c
Merge branch 'eugenp:master' into master
vshanbha May 27, 2025
9713d46
BAEL-9140 Quarkus MCP modules. review comments
vshanbha May 27, 2025
d5f9694
Merge branch 'eugenp:master' into master
vshanbha May 27, 2025
cd53181
Merge branch 'eugenp:master' into master
vshanbha Jun 7, 2025
ce28098
BAEL-9140 - review comments. moved modules to be in alphabetical order
vshanbha Jun 7, 2025
911ccd1
Merge branch 'eugenp:master' into master
vshanbha Jun 10, 2025
be0dd47
Modified java versions to ensure compatibility with Java 17
vshanbha Jun 11, 2025
5d8f4f7
Merge branch 'eugenp:master' into master
vshanbha Jun 11, 2025
7cbe8b2
Merge branch 'master' of github.com:vshanbha/baeldung-tutorials
vshanbha Jun 11, 2025
28ea0d8
Merge branch 'master' into master
lor6 Jun 23, 2025
0538ebe
BAEL-9140 move modules to single parent, remove extra mvn files
lor6 Jun 23, 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 @@ -29,6 +29,9 @@ out/
# Mac
.DS_Store

# Quarkus
.quarkus/

# Maven
log/*
target/
Expand Down
17 changes: 9 additions & 8 deletions quarkus-modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,27 @@
</parent>

<modules>
<module>consume-rest-api</module>
<module>jfr</module>
<!-- <module>mongo-db</module> --> <!-- JAVA-42048 -->
<module>quarkus</module>
<module>quarkus-citrus</module>
<module>quarkus-clientbasicauth</module>
<module>quarkus-extension</module>
<module>quarkus-elasticsearch</module>
<module>quarkus-jandex</module>
<module>quarkus-vs-springboot</module>
<module>quarkus-funqy</module>
<module>quarkus-kogito</module>
<module>quarkus-testcontainers</module>
<module>consume-rest-api</module>
<module>quarkus-virtual-threads</module>
<!--<module>quarkus-hibernate-reactive</module>--> <!--moved to heavy profile-->
<module>quarkus-jandex</module>
<module>quarkus-kogito</module>
<module>quarkus-langchain4j</module>
<!-- <module>quarkus-rbac</module> --> <!-- JAVA-42048 -->
<module>quarkus-websockets-next</module>
<module>quarkus-management-interface</module>
<module>quarkus-mcp-langchain</module>
<module>quarkus-panache</module>
<!-- <module>quarkus-rbac</module> --> <!-- JAVA-42048 -->
<module>quarkus-testcontainers</module>
<module>quarkus-virtual-threads</module>
<module>quarkus-vs-springboot</module>
<module>quarkus-websockets-next</module>
</modules>

</project>
1 change: 1 addition & 0 deletions quarkus-modules/quarkus-kogito/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
<mapstruct.version>1.6.3</mapstruct.version>
<!-- currently, the only version supporting Quarkus 3 -->
<kogito.version>2.44.0.Alpha</kogito.version>
<maven.compiler.release>17</maven.compiler.release>
</properties>

</project>
55 changes: 55 additions & 0 deletions quarkus-modules/quarkus-mcp-langchain/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>quarkus-mcp-langchain</artifactId>
<name>quarkus-mcp-langchain</name>
<packaging>pom</packaging>

<parent>
<groupId>com.baeldung</groupId>
<artifactId>quarkus-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<modules>
<module>quarkus-mcp-server</module>
<module>quarkus-mcp-client</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus.platform</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<maven.compiler.release>17</maven.compiler.release>
<compiler-plugin.version>3.14.0</compiler-plugin.version>
<quarkus.platform.version>3.22.3</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.5.2</surefire-plugin.version>
<quarkus-langchain4j.version>1.0.0.CR2</quarkus-langchain4j.version>
<junit-jupiter.version>5.12.2</junit-jupiter.version>
</properties>

</project>
103 changes: 103 additions & 0 deletions quarkus-modules/quarkus-mcp-langchain/quarkus-mcp-client/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>quarkus-mcp-client</artifactId>
<name>quarkus-mcp-client</name>

<parent>
<groupId>com.baeldung</groupId>
<artifactId>quarkus-mcp-langchain</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-mcp</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-ollama</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-http</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.quarkus.platform</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus.platform.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
<goal>native-image-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>native</id>
<activation>
<property>
<name>native</name>
</property>
</activation>
<properties>
<skipITs>false</skipITs>
<quarkus.native.enabled>true</quarkus.native.enabled>
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#
# Before building the container image run:
#
# ./mvnw package
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/quarkus-mcp-client-jvm .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/quarkus-mcp-client-jvm
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005
# when running the container
#
# Then run the container using :
#
# docker run -i --rm -p 8080:8080 quarkus/quarkus-mcp-client-jvm
#
# This image uses the `run-java.sh` script to run the application.
# This scripts computes the command line to execute your Java application, and
# includes memory/GC tuning.
# You can configure the behavior using the following environment properties:
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override
# the default JVM options, use `JAVA_OPTS_APPEND` to append options
# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
# in JAVA_OPTS (example: "-Dsome.property=foo")
# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
# used to calculate a default maximal heap memory based on a containers restriction.
# If used in a container without any memory constraints for the container then this
# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
# of the container available memory as set here. The default is `50` which means 50%
# of the available memory is used as an upper boundary. You can skip this mechanism by
# setting this value to `0` in which case no `-Xmx` option is added.
# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
# is used to calculate a default initial heap memory based on the maximum heap memory.
# If used in a container without any memory constraints for the container then this
# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
# is used as the initial heap size. You can skip this mechanism by setting this value
# to `0` in which case no `-Xms` option is added (example: "25")
# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
# This is used to calculate the maximum value of the initial heap memory. If used in
# a container without any memory constraints for the container then this option has
# no effect. If there is a memory constraint then `-Xms` is limited to the value set
# here. The default is 4096MB which means the calculated value of `-Xms` never will
# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
# when things are happening. This option, if set to true, will set
# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
# true").
# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
# (example: "20")
# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
# (example: "40")
# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
# (example: "4")
# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
# previous GC times. (example: "90")
# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
# contain the necessary JRE command-line options to specify the required GC, which
# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
# - HTTPS_PROXY: The location of the https proxy. (example: "[email protected]:8080")
# - HTTP_PROXY: The location of the http proxy. (example: "[email protected]:8080")
# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi9/openjdk-21:1.21

ENV LANGUAGE='en_US:en'


# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 target/quarkus-app/*.jar /deployments/
COPY --chown=185 target/quarkus-app/app/ /deployments/app/
COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/

EXPOSE 8080
USER 185
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"

ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]

Loading