You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/public_cloud/ai_machine_learning/endpoints_tuto_15_mcp_langchain4j/guide.fr-fr.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: AI Endpoints - Model Context Protocol (MCP) avec LangChain4j
3
3
excerpt: Apprenez à utiliser le Model Context Protocol (MCP) avec Java, LangChain4j et OVHcloud AI Endpoints
4
-
updated: 2025-06-27
4
+
updated: 2025-08-06
5
5
---
6
6
7
7
> [!primary]
@@ -11,7 +11,7 @@ updated: 2025-06-27
11
11
12
12
## Objective
13
13
14
-
OVHcloud **[AI Endpoints](https://endpoints.ai.cloud.ovh.net/)** allows developers to easily add AI features to there day to day developments.
14
+
OVHcloud **[AI Endpoints](https://endpoints.ai.cloud.ovh.net/)** allows developers to easily add AI features to their day to day developments.
15
15
16
16
In this article, we will explore how to create a Model Context Protocol (MCP) server and client using [Quarkus](https://quarkus.io/) and [LangChain4J](https://docs.langchain4j.dev/) to interact with OVHcloud AI Endpoints.
17
17
@@ -23,7 +23,7 @@ Combined with OVHcloud **[AI Endpoints](https://endpoints.ai.cloud.ovh.net/)** w
23
23
24
24
-**Model Context Protocol**: MCP is a protocol that allows your LLM to ask for additional context or data from external sources during the generation processes. If you want more information about MCP, please refer to the [official documentation](https://modelcontextprotocol.io/introduction).
25
25
-**[LangChain4j](https://github.com/langchain4j/langchain4j)**: Java-based framework inspired by [LangChain](https://github.com/langchain-ai/langchain), designed to simplify the integration of LLMs (Large Language Models) into applications. Note that LangChain4j is not officially maintained by the LangChain team, despite the similar name.
26
-
-**[AI Endpoints](https://endpoints.ai.cloud.ovh.net/)**: A serverless platform by OVHcloud providing easy access to a variety of world-renowned AI models including Mistral, LLaMA, and more. This platform is designed to be simple, secure, and intuitive, with data privacy as a top priority.
26
+
-**[AI Endpoints](https://endpoints.ai.cloud.ovh.net/)**: A serverless platform by OVHcloud providing easy access to a variety of world-renowned AI models including Mistral, LLaMA, and more. This platform is designed to be simple, secure, and intuitive with data privacy as a top priority.
27
27
28
28
## Requirements
29
29
@@ -33,7 +33,7 @@ Combined with OVHcloud **[AI Endpoints](https://endpoints.ai.cloud.ovh.net/)** w
33
33
34
34
## Instructions
35
35
36
-
In this tutorial, we will explore how to easily create, in Java, a MCP Server using Quarkus and a client using LangChain4J.
36
+
In this tutorial, we will explore how to easily create in Java, a MCP Server using Quarkus and a client using LangChain4J.
37
37
38
38
### Creating a Server with Quarkus
39
39
@@ -44,7 +44,7 @@ The goal of this MCP server is to allow the LLM to ask for information about OVH
44
44
> ℹ️ The code used to call the [OVHcloud API](https://eu.api.ovh.com/) is in the [GitHub repository](https://github.com/ovh/public-cloud-examples/tree/main/ai/ai-endpoints/mcp-quarkus-langchain4j) and will not be detailed here.
45
45
>
46
46
47
-
Thanks to Quarkus, the only things you need to create a MCP server is to define the tools that you want to expose to the LLM.
47
+
Thanks to Quarkus, the only thing you need to create a MCP server, is to define the tools that you want to expose to the LLM.
48
48
49
49
```java
50
50
// Quarkus code for MCP Server
@@ -63,16 +63,16 @@ public class PublicCloudUserTool {
63
63
}
64
64
```
65
65
66
-
⚠️ The description is very important as it will be used by the LLM to choose the right tool for the task. ⚠️
66
+
⚠️ The description is very important, as it will be used by the LLM to choose the right tool for the task. ⚠️
67
67
68
-
At the time of writing, there are two type of MCP servers: [stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio) and [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http).
68
+
At the time of writing, there are two types of MCP servers: [stdio](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio) and [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http).
69
69
This blog post uses the Streamable mode thanks to Quarkus with the quarkus-mcp-server-sse extension.
70
70
71
-
Run your server with the quarkus dev command. Your MCP server will be used on http://localhost:8080.
71
+
Run your server with the quarkus dev command. Your MCP server will be used on <http://localhost:8080>.
72
72
73
73
### Using the MCP server with LangChain4J
74
74
75
-
You can, now, use the MCP server with LangChain4J to create a powerful chatbot that can now interact with your OVHcloud account!
75
+
You can now use the MCP server with LangChain4J to create a powerful chatbot that can now interact with your OVHcloud account!
76
76
77
77
```java
78
78
///usr/bin/env jbang "$0" "$@" ; exit $?
@@ -190,5 +190,3 @@ If you need training or technical assistance to implement our solutions, contact
190
190
Please feel free to send us your questions, feedback, and suggestions regarding AI Endpoints and its features:
191
191
192
192
- In the #ai-endpoints channel of the OVHcloud [Discord server](https://discord.gg/ovhcloud), where you can engage with the community and OVHcloud team members.
193
-
194
-
If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](/links/professional-services) to get a quote and ask our Professional Services experts for a custom analysis of your project.
0 commit comments