This repository was archived by the owner on Feb 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 21 files changed +88
-89
lines changed
main/java/org/springframework/ai/mcp
test/java/org/springframework/ai/mcp
spring-ai-mcp-spring-boot/src/main/java/org/springframework/ai/mcp/spring/boot
spring-ai-mcp-spring/src/main/java/org/springframework/ai/mcp/spring Expand file tree Collapse file tree 21 files changed +88
-89
lines changed Original file line number Diff line number Diff line change 1- package spring . ai . experimental .mcp .client ;
1+ package org . springframework . ai .mcp .client ;
22
33import java .time .Duration ;
44
55import com .fasterxml .jackson .core .type .TypeReference ;
66import com .fasterxml .jackson .databind .ObjectMapper ;
77import reactor .core .publisher .Mono ;
8- import spring . ai . experimental .mcp .spec .DefaultMcpSession ;
9- import spring . ai . experimental .mcp .spec .McpTransport ;
10- import spring . ai . experimental .mcp .spec .McpError ;
11- import spring . ai . experimental .mcp .spec .McpSchema ;
12- import spring . ai . experimental .mcp .spec .McpSchema .GetPromptRequest ;
13- import spring . ai . experimental .mcp .spec .McpSchema .GetPromptResult ;
14- import spring . ai . experimental .mcp .spec .McpSchema .ListPromptsResult ;
15- import spring . ai . experimental .mcp .spec .McpSchema .PaginatedRequest ;
8+ import org . springframework . ai .mcp .spec .DefaultMcpSession ;
9+ import org . springframework . ai .mcp .spec .McpTransport ;
10+ import org . springframework . ai .mcp .spec .McpError ;
11+ import org . springframework . ai .mcp .spec .McpSchema ;
12+ import org . springframework . ai .mcp .spec .McpSchema .GetPromptRequest ;
13+ import org . springframework . ai .mcp .spec .McpSchema .GetPromptResult ;
14+ import org . springframework . ai .mcp .spec .McpSchema .ListPromptsResult ;
15+ import org . springframework . ai .mcp .spec .McpSchema .PaginatedRequest ;
1616
1717/**
1818 * @author Dariusz Jędrzejczyk
Original file line number Diff line number Diff line change 1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16- package spring . ai . experimental .mcp .client ;
16+ package org . springframework . ai .mcp .client ;
1717
1818import java .time .Duration ;
1919
2020import com .fasterxml .jackson .databind .ObjectMapper ;
21- import spring . ai . experimental .mcp .spec .McpTransport ;
21+ import org . springframework . ai .mcp .spec .McpTransport ;
2222
2323/**
2424 * Factory class providing static methods for creating Model Context Protocol (MCP) clients.
Original file line number Diff line number Diff line change 1- package spring . ai . experimental .mcp .client ;
1+ package org . springframework . ai .mcp .client ;
22
33import java .time .Duration ;
44
5- import spring . ai . experimental .mcp .client .util .Assert ;
6- import spring . ai . experimental .mcp .spec .McpSchema ;
7- import spring . ai . experimental .mcp .spec .McpSchema .GetPromptRequest ;
8- import spring . ai . experimental .mcp .spec .McpSchema .GetPromptResult ;
9- import spring . ai . experimental .mcp .spec .McpSchema .ListPromptsResult ;
5+ import org . springframework . ai .mcp .client .util .Assert ;
6+ import org . springframework . ai .mcp .spec .McpSchema ;
7+ import org . springframework . ai .mcp .spec .McpSchema .GetPromptRequest ;
8+ import org . springframework . ai .mcp .spec .McpSchema .GetPromptResult ;
9+ import org . springframework . ai .mcp .spec .McpSchema .ListPromptsResult ;
1010
1111/**
1212 * @author Dariusz Jędrzejczyk
Original file line number Diff line number Diff line change 1- package spring . ai . experimental .mcp .client .stdio ;
1+ package org . springframework . ai .mcp .client .stdio ;
22
33import java .util .ArrayList ;
44import java .util .Arrays ;
99
1010import com .fasterxml .jackson .annotation .JsonInclude ;
1111import com .fasterxml .jackson .annotation .JsonProperty ;
12- import spring . ai . experimental .mcp .client .util .Assert ;
12+ import org . springframework . ai .mcp .client .util .Assert ;
1313
1414/**
1515 * Server parameters for stdio client.
Original file line number Diff line number Diff line change 1313* See the License for the specific language governing permissions and
1414* limitations under the License.
1515*/
16- package spring . ai . experimental .mcp .client .stdio ;
16+ package org . springframework . ai .mcp .client .stdio ;
1717
1818import java .util .Map ;
1919import java .util .List ;
2020
2121import com .fasterxml .jackson .annotation .JsonInclude ;
2222import com .fasterxml .jackson .annotation .JsonProperty ;
2323import com .fasterxml .jackson .databind .ObjectMapper ;
24- import spring . ai . experimental .mcp .client .stdio .ServerParametersParser .McpServerConfigurations .McpServerConfiguration ;
24+ import org . springframework . ai .mcp .client .stdio .ServerParametersParser .McpServerConfigurations .McpServerConfiguration ;
2525
2626/**
2727 * @author Christian Tzolov
Original file line number Diff line number Diff line change 1- package spring . ai . experimental .mcp .client .stdio ;
1+ package org . springframework . ai .mcp .client .stdio ;
22
33import java .io .BufferedReader ;
44import java .io .BufferedWriter ;
1313import reactor .core .publisher .Mono ;
1414import reactor .core .scheduler .Scheduler ;
1515import reactor .core .scheduler .Schedulers ;
16- import spring . ai . experimental .mcp .client .util .Assert ;
17- import spring . ai . experimental .mcp .spec .AbstractMcpTransport ;
18- import spring . ai . experimental .mcp .spec .McpSchema .JSONRPCMessage ;
19- import spring . ai . experimental .mcp .spec .McpSchema .JSONRPCNotification ;
20- import spring . ai . experimental .mcp .spec .McpSchema .JSONRPCRequest ;
21- import spring . ai . experimental .mcp .spec .McpSchema .JSONRPCResponse ;
16+ import org . springframework . ai .mcp .client .util .Assert ;
17+ import org . springframework . ai .mcp .spec .AbstractMcpTransport ;
18+ import org . springframework . ai .mcp .spec .McpSchema .JSONRPCMessage ;
19+ import org . springframework . ai .mcp .spec .McpSchema .JSONRPCNotification ;
20+ import org . springframework . ai .mcp .spec .McpSchema .JSONRPCRequest ;
21+ import org . springframework . ai .mcp .spec .McpSchema .JSONRPCResponse ;
2222
2323/**
2424 * Stdio client for communicating with a server process.
Original file line number Diff line number Diff line change 1313* See the License for the specific language governing permissions and
1414* limitations under the License.
1515*/
16- package spring . ai . experimental .mcp .client .util ;
16+ package org . springframework . ai .mcp .client .util ;
1717
1818import reactor .util .annotation .Nullable ;
1919
Original file line number Diff line number Diff line change 1313* See the License for the specific language governing permissions and
1414* limitations under the License.
1515*/
16- package spring . ai . experimental .mcp .spec ;
16+ package org . springframework . ai .mcp .spec ;
1717
1818import java .util .function .Consumer ;
1919
2020import com .fasterxml .jackson .databind .ObjectMapper ;
2121import reactor .core .publisher .Mono ;
2222import reactor .core .publisher .Sinks ;
23- import spring . ai . experimental .mcp .client .util .Assert ;
24- import spring . ai . experimental .mcp .spec .McpSchema .JSONRPCMessage ;
23+ import org . springframework . ai .mcp .client .util .Assert ;
24+ import org . springframework . ai .mcp .spec .McpSchema .JSONRPCMessage ;
2525
2626/**
2727 * @author Christian Tzolov
Original file line number Diff line number Diff line change 1- package spring . ai . experimental .mcp .spec ;
1+ package org . springframework . ai .mcp .spec ;
22
33import java .time .Duration ;
44import java .util .Map ;
99import com .fasterxml .jackson .databind .ObjectMapper ;
1010import reactor .core .publisher .Mono ;
1111import reactor .core .publisher .MonoSink ;
12- import spring . ai . experimental .mcp .client .util .Assert ;
12+ import org . springframework . ai .mcp .client .util .Assert ;
1313
1414/**
1515 * Implementation of the MCP client session.
Original file line number Diff line number Diff line change 1313* See the License for the specific language governing permissions and
1414* limitations under the License.
1515*/
16- package spring . ai . experimental .mcp .spec ;
16+ package org . springframework . ai .mcp .spec ;
1717
1818public class McpError extends RuntimeException {
1919
You can’t perform that action at this time.
0 commit comments