java-sdk/mcp-docs/src/main/antora/modules/ROOT/pages/spring-mcp.adoc
Christian Tzolov 580f95526f feat(McpAsyncServer): Add non-blocking execution for tools and resources
- Execute tool calls, resource reads and prompt handling in a non-blocking
  manner using Schedulers.boundedElastic(). This prevents blocking operations
  from impacting server responsiveness.
- Added integration tests to verify non-blocking behavior with tools that
  make HTTP calls to external services.

Related to #48
This is  a temp patch until #48 is resolved properly.
2025-01-04 17:56:48 +01:00

41 lines
1.3 KiB
Text

= Spring AI MCP Spring
:page-title: Spring AI MCP Spring
:doctype: book
:icons: font
:source-highlighter: highlight.js
:toc: left
Spring Integration module for Model Control Protocol (MCP) that provides Spring-specific functionality for working with MCP clients.
== Overview
The `spring-ai-mcp` module is part of the https://github.com/spring-projects-experimental/spring-ai-mcp[Spring AI MCP] project. It provides Spring Framework integration for the Model Control Protocol (MCP), enabling seamless integration of MCP functionality within Spring applications.
== Features
* Spring integration for MCP clients
* Function callback implementation for tool invocations
* Seamless integration with Spring AI's function calling capabilities
== Main Components
=== McpFunctionCallback
The `McpFunctionCallback` class is the primary component of this module. It implements Spring AI's `FunctionCallback` interface and provides:
* Integration between Spring AI's function calling system and MCP tools
* Automatic conversion between JSON and Java objects for tool arguments
* Synchronous tool execution support
== Usage
To use this module, add the following dependency to your Maven project:
[source,xml]
----
<dependency>
<groupId>org.springframework.experimental</groupId>
<artifactId>spring-ai-mcp</artifactId>
<version>0.5.0-SNAPSHOT</version>
</dependency>
----