diff --git a/mcp-bom/pom.xml b/mcp-bom/pom.xml new file mode 100644 index 0000000..abae513 --- /dev/null +++ b/mcp-bom/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + + + org.springframework.experimental + mcp-parent + 0.5.0-SNAPSHOT + ../pom.xml + + + mcp-bom + pom + Spring AI MCP BOM + Spring AI MCP Bill of Materials + + + ${basedir}/.. + + + + + + + org.springframework.experimental + mcp + ${project.version} + + + + + org.springframework.experimental + mcp-test + ${project.version} + + + + + org.springframework.experimental + mcp-webflux-sse-transport + ${project.version} + + + + + org.springframework.experimental + mcp-webmvc-sse-transport + ${project.version} + + + + + org.springframework.experimental + spring-ai-mcp + ${project.version} + + + + diff --git a/mcp-docs/src/main/antora/modules/ROOT/nav.adoc b/mcp-docs/src/main/antora/modules/ROOT/nav.adoc index 2bc05df..115ff34 100644 --- a/mcp-docs/src/main/antora/modules/ROOT/nav.adoc +++ b/mcp-docs/src/main/antora/modules/ROOT/nav.adoc @@ -1,5 +1,4 @@ * xref:overview.adoc[Overview] +** xref:dependency-management.adoc[Dependency Management] * xref:mcp.adoc[MCP Java SDK] * xref:spring-mcp.adoc[Spring AI MCP] -// ** xref:concepts.adoc[AI Concepts] -// * xref:getting-started.adoc[Getting Started] diff --git a/mcp-docs/src/main/antora/modules/ROOT/pages/dependency-management.adoc b/mcp-docs/src/main/antora/modules/ROOT/pages/dependency-management.adoc new file mode 100644 index 0000000..36d327f --- /dev/null +++ b/mcp-docs/src/main/antora/modules/ROOT/pages/dependency-management.adoc @@ -0,0 +1,109 @@ +[[dependency-management]] += Dependency Management + +[[mcp-bom]] +== Bill of Materials (BOM) + +The Bill of Materials (BOM) declares the recommended versions of all the dependencies used by a given release. +Using the BOM from your application’s build script avoids the need for you to specify and maintain the dependency versions yourself. +Instead, the version of the BOM you’re using determines the utilized dependency versions. +It also ensures that you’re using supported and tested versions of the dependencies by default, unless you choose to override them. + +Add the BOM to your project: + +[tabs] +====== +Maven:: ++ +[source,xml,indent=0,subs="verbatim,quotes"] +---- + + + + org.springframework.experimental + mcp-bom + 0.5.0-SNAPSHOT + pom + import + + + +---- + +Gradle:: ++ +[source,groovy,indent=0,subs="verbatim,quotes"] +---- +dependencies { + implementation platform("org.springframework.experimental:mcp-bom:0.5.0-SNAPSHOT") + // Replace the following with the starter dependencies of specific modules you wish to use + //... +} +---- +Gradle users can also use the Spring AI MCP BOM by leveraging Gradle (5.0+) native support for declaring dependency constraints using a Maven BOM. +This is implemented by adding a 'platform' dependency handler method to the dependencies section of your Gradle build script. +As shown in the snippet below this can then be followed by version-less declarations of the Starter Dependencies for the one or more spring-ai modules you wish to use, e.g. spring-ai-openai. +====== + +[[dependencies]] +== Available Dependencies + +The following dependencies are available and managed by the BOM: + +=== Core Dependencies + +* `org.springframework.experimental:mcp` - Core MCP library providing the base functionality and APIs for Model Context Protocol implementation. +* `org.springframework.experimental:spring-ai-mcp` - Spring AI integration with MCP, providing Spring-specific features and utilities. + +=== Transport Dependencies + +* `org.springframework.experimental:mcp-webflux-sse-transport` - WebFlux-based Server-Sent Events (SSE) transport implementation for reactive applications. +* `org.springframework.experimental:mcp-webmvc-sse-transport` - WebMVC-based Server-Sent Events (SSE) transport implementation for servlet-based applications. + +=== Testing Dependencies + +* `org.springframework.experimental:mcp-test` - Testing utilities and support for MCP-based applications. + +[[repositories]] +=== Milestone and Snapshot Repositories + +To use the Milestone and Snapshot version, you need to add references to the Spring Milestone and/or Snapshot repositories in your build file. +Add the following repository definitions to your Maven or Gradle build file: + +[tabs] +====== +Maven:: ++ +[source,xml,indent=0,subs="verbatim,quotes"] +---- + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + false + + + +---- + +Gradle:: ++ +[source,groovy,indent=0,subs="verbatim,quotes"] +---- +repositories { + mavenCentral() + maven { url 'https://repo.spring.io/milestone' } + maven { url 'https://repo.spring.io/snapshot' } +} +---- +====== diff --git a/mcp-docs/src/main/antora/modules/ROOT/pages/mcp.adoc b/mcp-docs/src/main/antora/modules/ROOT/pages/mcp.adoc index ef76335..b1a98cc 100644 --- a/mcp-docs/src/main/antora/modules/ROOT/pages/mcp.adoc +++ b/mcp-docs/src/main/antora/modules/ROOT/pages/mcp.adoc @@ -35,7 +35,6 @@ The core MCP functionality: org.springframework.experimental mcp - 0.5.0-SNAPSHOT ---- + @@ -48,14 +47,12 @@ For HTTP SSE transport implementations, add one of the following dependencies org.springframework.experimental mcp-webflux-sse-transport - 0.5.0-SNAPSHOT org.springframework.experimental mcp-webmvc-sse-transport - 0.5.0-SNAPSHOT ---- @@ -83,6 +80,7 @@ implementation 'org.springframework.experimental:mcp-webmvc-sse-transport' ---- ====== +Reffer to the xref:dependency-management.adoc[Dependency Management] page for more information. == Architecture diff --git a/mcp-docs/src/main/antora/modules/ROOT/pages/overview.adoc b/mcp-docs/src/main/antora/modules/ROOT/pages/overview.adoc index f38e3bd..b6a0cda 100644 --- a/mcp-docs/src/main/antora/modules/ROOT/pages/overview.adoc +++ b/mcp-docs/src/main/antora/modules/ROOT/pages/overview.adoc @@ -37,7 +37,7 @@ Spring integration features: * Spring-friendly MCP client abstractions * Auto-configurations (WIP) -== Installation +== Getting Started [tabs] ====== @@ -48,29 +48,25 @@ Maven:: org.springframework.experimental - mcp - 0.5.0-SNAPSHOT + mcp org.springframework.experimental mcp-webflux-sse-transport - 0.5.0-SNAPSHOT org.springframework.experimental mcp-webmvc-sse-transport - 0.5.0-SNAPSHOT org.springframework.experimental spring-ai-mcp - 0.5.0-SNAPSHOT ---- + @@ -107,6 +103,8 @@ repositories { ---- ====== +Reffer to the xref:dependency-management.adoc[Dependency Management] page for more information. + == Examples * link:https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sqlite/simple[SQLite Simple] - Basic LLM-database integration diff --git a/mcp-docs/src/main/antora/modules/ROOT/pages/spring-mcp.adoc b/mcp-docs/src/main/antora/modules/ROOT/pages/spring-mcp.adoc index d1bd57e..fd28fa9 100644 --- a/mcp-docs/src/main/antora/modules/ROOT/pages/spring-mcp.adoc +++ b/mcp-docs/src/main/antora/modules/ROOT/pages/spring-mcp.adoc @@ -118,10 +118,11 @@ To use this module, add the following dependency to your Maven project: org.springframework.experimental spring-ai-mcp - 0.5.0-SNAPSHOT ---- +Reffer to the xref:dependency-management.adoc[Dependency Management] page for more information. + === Example: Creating an MCP Tool Server with Spring AI Functions [source,java] diff --git a/pom.xml b/pom.xml index e2a87c5..81d7a14 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,7 @@ + mcp-bom mcp mcp-transport/mcp-webflux-sse-transport mcp-transport/mcp-webmvc-sse-transport