spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

could not found io.modelcontextprotocol.sdk:mcp:jar:0.11.0-SNAPSHOT in repo

Open fanxt0218 opened this issue 1 year ago • 2 comments

Description: When I try to bring in McpAsyncClient, I find that it is not available and cannot be found in the snapshot repository. Earlier, I noticed that io.modelcontextprotocol.sdk has just been upgraded from 1.1.0 to 1.1.0. Is this issue related to this update as well? Because it was able to work normally before

Error message: [ERROR] dependency: io.modelcontextprotocol.sdk:mcp:jar:0.11.0-SNAPSHOT (compile) [ERROR] Could not find artifact io.modelcontextprotocol.sdk:mcp:jar:0.11.0-SNAPSHOT in spring-snapshots (https://repo.spring.io/snapshot) [ERROR]

Repetition: Try introducing MCPClient

fanxt0218 avatar Jul 11 '25 02:07 fanxt0218

I think there might be some issues with your link to the repository? In #3781, the version of the MCP client was upgraded to 0.11.0-SNAPSHOT, and since this is a snapshot version, it is hosted in the Maven Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/. This PR has also correctly configured the repository in the code. Currently, it works well for me locally, and I can successfully download the dependency.

sunyuhan1998 avatar Jul 11 '25 04:07 sunyuhan1998

@sunyuhan1998 Thanks and @fanxt0218 as from the above comment, please add in your repository configuration:

<repositories>
	<repository>
		<name>Central Portal Snapshots</name>
		<id>central-portal-snapshots</id>
		<url>https://central.sonatype.com/repository/maven-snapshots/</url>
		<releases>
			<enabled>false</enabled>
		</releases>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
	<!-- Spring snapshots & milestones repo ... -->
</repositories>

Closing the issue for now.

ilayaperumalg avatar Jul 11 '25 06:07 ilayaperumalg