Skip to content

Commit ec468ce

Browse files
tzolovleijendary
authored andcommitted
docs(mcp) Update the MCP documentation to latewt 0.2.0 release
Signed-off-by: leijendary <[email protected]>
1 parent 40b57ed commit ec468ce

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/model-context-protocol.adoc

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Maven::
3939
----
4040
<dependency>
4141
<groupId>org.springframework.experimental</groupId>
42-
<artifactId>spring-ai-mcp-spring</artifactId>
43-
<version>0.1.0</version>
42+
<artifactId>spring-ai-mcp</artifactId>
43+
<version>0.2.0</version>
4444
</dependency>
4545
----
4646
@@ -49,12 +49,30 @@ Gradle::
4949
[source,groovy,indent=0,subs="verbatim,quotes"]
5050
----
5151
dependencies {
52-
implementation 'org.springframework.experimental:spring-ai-mcp-spring:0.1.0'
52+
implementation 'org.springframework.experimental:spring-ai-mcp:0.2.0'
5353
}
5454
----
5555
======
5656

57-
TIP: Refer to the xref:getting-started.adoc#repositories[Repositories] section to add the Spring Milestone Repository to your build file.
57+
[NOTE]
58+
====
59+
The Spring AI MCP milestones are not available in the Maven Central Repository yet.
60+
Please add tehe Spring Milestone Repository to your build file to access the Spring AI MCP artifacts:
61+
62+
[source,xml,indent=0,subs="verbatim,quotes"]
63+
----
64+
<repositories>
65+
<repository>
66+
<id>spring-milestones</id>
67+
<name>Spring Milestones</name>
68+
<url>https://repo.spring.io/libs-milestone-local</url>
69+
<snapshots>
70+
<enabled>false</enabled>
71+
</snapshots>
72+
</repository>
73+
</repositories>
74+
----
75+
====
5876

5977
The latter builds on top of mcp-core to provide some useful Spring AI abstractions, such as `McpFunctionCallback`.
6078

@@ -68,7 +86,7 @@ var stdioParams = ServerParameters.builder("npx")
6886
.addEnvVar("BRAVE_API_KEY", System.getenv("BRAVE_API_KEY"))
6987
.build();
7088
71-
var mcpClient = McpClient.sync(new StdioServerTransport(stdioParams));
89+
var mcpClient = McpClient.using(new StdioClientTransport(stdioParams)).sync();
7290
7391
var init = mcpClient.initialize();
7492

0 commit comments

Comments
 (0)