java-sdk/spring-ai-mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christian Tzolov 86659344fc feat: add structured logging support with severity levels
- Add client and server-side logging capabilities with configurable severity levels
- Implement logging message notifications with DEBUG to EMERGENCY levels
- Add logging consumers for client-side log handling
- Update documentation with logging examples and configuration
- Add comprehensive tests for logging functionality
- Fix typo in README.md (notificaiotn -> notification)

- Centralize MCP method names as constants
  - Move all JSON-RPC method names to McpSchema class as static constants
  - Replace hardcoded method strings with constant references in McpAsyncClient
    and McpAsyncServer
  - Update test cases to use new method name constants

Resolves #35
2024-12-31 14:46:32 +01:00
..
src/main/java/org/springframework/ai/mcp/spring feat: add structured logging support with severity levels 2024-12-31 14:46:32 +01:00
pom.xml Next development version 2024-12-30 13:25:53 +01:00
README.md docs Update pom version in docs 2024-12-29 18:56:38 +01:00

Spring AI MCP Spring

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 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:

<dependency>
    <groupId>org.springframework.experimental</groupId>
    <artifactId>spring-ai-mcp</artifactId>
    <version>0.4.0-SNAPSHOT</version>
</dependency>

License

This project is licensed under the Apache License 2.0.

Contributing

This is an experimental Spring project. Contributions are welcome! Please refer to the main project's contribution guidelines.