Skip to content

Commit 7965ba4

Browse files
authored
Merge pull request #32776 from Azquelt/feature-mcp-server-snapshot
MCP Server Feature
2 parents 525d805 + c6492d2 commit 7965ba4

File tree

109 files changed

+9880
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+9880
-2
lines changed

dev/build.featureStart.base/resources/com/ibm/ws/test/featurestart/features/feature-levels.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jsonbContainer-3.0=11
3030
jsonp-2.1=11
3131
jsonpContainer-2.1=11
3232
mail-2.1=11
33+
mcpServer-1.0=17
3334
messaging-3.1=11
3435
microProfile-6.0=11
3536
microProfile-6.1=11

dev/cnf/dependabot/check_this_in_if_it_changes/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4626,6 +4626,11 @@
46264626
<artifactId>webdriver-common</artifactId>
46274627
<version>0.9.7376</version>
46284628
</dependency>
4629+
<dependency>
4630+
<groupId>org.skyscreamer</groupId>
4631+
<artifactId>jsonassert</artifactId>
4632+
<version>2.0-rc1</version>
4633+
</dependency>
46294634
<dependency>
46304635
<groupId>org.slf4j</groupId>
46314636
<artifactId>slf4j-api</artifactId>

dev/cnf/oss_dependencies.maven

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ org.seleniumhq.selenium:selenium-chromium-driver:4.8.3
921921
org.seleniumhq.selenium:selenium-remote-driver:4.8.3
922922
org.seleniumhq.selenium:selenium-support:4.8.3
923923
org.seleniumhq.webdriver:webdriver-common:0.9.7376
924+
org.skyscreamer:jsonassert:2.0-rc1
924925
org.slf4j:slf4j-api:1.7.36
925926
org.slf4j:slf4j-jdk14:1.7.36
926927
org.slf4j:slf4j-simple:1.7.36
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-include= ~${workspace}/cnf/resources/bnd/feature.props
2+
symbolicName=io.openliberty.mcpServer1.0.ee-10.0
3+
singleton=true
4+
-features=\
5+
com.ibm.websphere.appserver.servlet-6.0, \
6+
io.openliberty.cdi-4.0, \
7+
io.openliberty.jsonb-3.0, \
8+
com.ibm.websphere.appserver.eeCompatible-10.0,\
9+
io.openliberty.noShip-1.0
10+
kind=noship
11+
edition=full
12+
WLP-Activation-Type: parallel
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
-include= ~${workspace}/cnf/resources/bnd/feature.props
2+
symbolicName=io.openliberty.mcpServer1.0.ee-11.0
3+
singleton=true
4+
-features=\
5+
com.ibm.websphere.appserver.servlet-6.1, \
6+
io.openliberty.cdi-4.1, \
7+
io.openliberty.jsonb-3.0, \
8+
com.ibm.websphere.appserver.eeCompatible-11.0,\
9+
io.openliberty.noShip-1.0
10+
kind=noship
11+
edition=full
12+
WLP-Activation-Type: parallel
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-include= ~${workspace}/cnf/resources/bnd/feature.props
2+
symbolicName=io.openliberty.mcpServer-1.0
3+
visibility=public
4+
IBM-App-ForceRestart: install, \
5+
uninstall
6+
IBM-API-Package: \
7+
io.openliberty.mcp.annotations; type="ibm-api", \
8+
io.openliberty.mcp.content; type="ibm-api", \
9+
io.openliberty.mcp.encoders; type="ibm-api", \
10+
io.openliberty.mcp.messaging; type="ibm-api", \
11+
io.openliberty.mcp.meta; type="ibm-api", \
12+
io.openliberty.mcp.tools; type="ibm-api"
13+
IBM-ShortName: mcpServer-1.0
14+
Subsystem-Name: Model Context Protocol Server 1.0
15+
-features=io.openliberty.mcpServer1.0.ee-10.0;ibm.tolerates:=11.0
16+
-bundles=io.openliberty.mcp; location:="dev/api/ibm/", \
17+
io.openliberty.mcp.internal
18+
kind=noship
19+
edition=full
20+
WLP-Activation-Type: parallel
21+
WLP-InstantOn-Enabled: true
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
###############################################################################
2+
# Copyright (c) 2025 IBM Corporation and others.
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License 2.0
5+
# which accompanies this distribution, and is available at
6+
# http://www.eclipse.org/legal/epl-2.0/
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
###############################################################################
10+
#
11+
#ISMESSAGEFILE FALSE
12+
#NLS_ENCODING=UNICODE
13+
#NLS_MESSAGEFORMAT_NONE
14+
#
15+
16+
description=Adds support for the Model Context Protocol (MCP). Tools, resources, and prompts can be defined in Java code and exposed to AI systems using MCP.

dev/fattest.simplicity/src/componenttest/topology/utils/HttpRequest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2017, 2024 IBM Corporation and others.
2+
* Copyright (c) 2017, 2025 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License 2.0
55
* which accompanies this distribution, and is available at
@@ -234,6 +234,7 @@ public <T> T run(Class<T> type) throws Exception {
234234
Log.info(c, "run", "Sending HTTP Request: " + request.getName() + " " + url);
235235
}
236236
httpClient.executeMethod(request);
237+
237238
/*
238239
* Check for the expected response code.
239240
*/
@@ -243,7 +244,9 @@ public <T> T run(Class<T> type) throws Exception {
243244
}
244245
if (!expectedResponseCode.contains(responseCode)) {
245246
Log.info(c, "run", "Got unexpected response code: " + responseCode);
246-
throw new Exception("Unexpected response: " + responseCode);
247+
String responseBody = request.getResponseBodyAsString();
248+
printResponseContents(responseBody);
249+
throw new Exception("Unexpected response: " + responseCode + "\nResponse Body: " + responseBody);
247250
}
248251

249252
String responseBody = request.getResponseBodyAsString();

dev/io.openliberty.jakartaee9.internal_fat/fat/src/io/openliberty/jakartaee9/internal/tests/EE9Features.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ private static Set<String> getCompatibleFeatures(Set<String> versionedFeatures,
228228
features.add("mpReactiveMessaging-3.0");
229229

230230
// Value-add features which aren't compatible
231+
features.remove("mcpServer-1.0"); // requires EE10+
231232
features.remove("openid-2.0"); // stabilized
232233
features.remove("openapi-3.1"); // depends on mpOpenAPI
233234
features.remove("opentracing-1.0"); // opentracing depends on mpConfig
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
4+
<attributes>
5+
<attribute name="module" value="true"/>
6+
</attributes>
7+
</classpathentry>
8+
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
9+
<classpathentry kind="src" output="bin" path="src"/>
10+
<classpathentry kind="src" output="bin_test" path="test">
11+
<attributes>
12+
<attribute name="test" value="true"/>
13+
</attributes>
14+
</classpathentry>
15+
<classpathentry kind="output" path="bin"/>
16+
</classpath>

0 commit comments

Comments
 (0)