Commit graph java-sdk/mcp
Author SHA1 Message Date
Christian Tzolov
abd0facf4e feat: Add MCP server with Server stdio/sse transport improve MCP client
- Implement MCP server with async/sync support and builder pattern configuration
 - Add Server stdio/SSE transport layers with robust error handling
 - Convert McpClient and McpServer to interfaces for better extensibility
 - Add sampling capabilities for LLM interactions (text/image)
 - Implement dynamic root management and runtime tool management
 - Add comprehensive prompt and resource capabilities
 - Add support for dynamic root management (add/remove roots at runtime)

 Architecture Changes

 - Introduce registration records for tools, resources, and prompts
 - Improve thread safety with concurrent collections
 - Enhance resource template handling
 - Implement builder patterns for Server/Client capabilities
 - Add support for server capabilities and implementation info

Transport Layer:
 - Implement SseServerTransport with SSE endpoints
 - Add StdioServerTransport for process-based communication
 - Reorganize transport packages for better organization
 - Improve transport error handling and shutdown processes

Documentation:

 - Add detailed MCP reference documentation
 - Include architecture diagrams and API documentation
 - Add comprehensive test coverage for all components
 - Include sample projects demonstrating stdio/SSE transports

BREAKING CHANGES:

 Transport Package Reorganization

 - Move StdioClientTransport to o.s.ai.mcp.client.transport
 - Move SseClientTransport to o.s.ai.mcp.client.transport
 - Move ServerParameters to o.s.ai.mcp.client.transport
 - StdioClientTransport.errorHandler changed to private with
   setter method Migration: Use setErrorHandler() method
   instead of direct field access

 API Changes

 - Replace static factory methods with builder pattern
 - Update ServerCapabilities to use builder pattern
 - Make StdioClientTransport.errorHandler private with setter
 - Replace rootsListProvider with direct root management
 - Remove deprecated static factory methods

Resolves #27,#25,#24,#11
Related to #12
2024-12-28 21:03:29 +01:00
Christian Tzolov
c83a45f880 Next development version 2024-12-21 18:19:21 +01:00
Christian Tzolov
9d20ca8dc4 Release version 0.2.0 2024-12-21 18:19:01 +01:00
Christian Tzolov
890350c634 minor javadoc 2024-12-21 16:35:22 +01:00
Christian Tzolov
12fd8e51f3 refactor: rename artifacts and restructure modules
- Rename spring-ai-mcp-core to mcp for simpler artifact naming
- Rename spring-ai-mcp-spring to spring-ai-mcp for clarity
- Rename parent artifact from spring-ai-mcp to mcp-parent
- Update artifact references in pom files and documentation
- Update directory structure and paths in GitHub workflow

Resolves #31

chore: improve module descriptions and update dependencies

- Update parent pom description to better reflect overall project scope
- Update mcp module description to detail core Java SDK capabilities
- Update spring-ai-mcp module description to emphasize Spring integration features
- Update dependency versions to stable releases:
  * JUnit: 5.11.3 -> 5.10.2
  * Jackson: 2.18.2 -> 2.17.0
2024-12-21 16:30:19 +01:00
Christian Tzolov
1d7ab91314 rename mcp to mcp-core and spring into mcp-spring 2024-12-10 18:56:38 +01:00
Christian Tzolov
0dec9420c6 Add simple StdioServerTransportTest 2024-12-10 14:20:52 +01:00
Christian Tzolov
7c9cf46e8a Factor out the McpSession into an inteface with DefaultMcpSession impl. 2024-12-10 14:03:11 +01:00
Christian Tzolov
7abf118412 refactor(transport): improve MCP transport layer design
- Rename DefaultMcpTransport to AbstractMcpTransport and make it abstract
- Add graceful shutdown support via closeGracefully() method
- Enhance McpTransport interface with default close() implementation
- Improve documentation across transport layer classes
2024-12-10 13:27:09 +01:00
Christian Tzolov
1b6d661470 code cleaning 2024-12-10 11:46:58 +01:00
Christian Tzolov
b378ab73dd generate some README 2024-12-09 23:40:25 +01:00
Christian Tzolov
c248642d52 another restructuring 2024-12-09 23:31:23 +01:00
Christian Tzolov
68c21d2264 Clean the code and add more tests 2024-12-09 23:05:23 +01:00
Christian Tzolov
1982c39bbc break into multiple modules. The mcp module is the MCP implementation with minimal dependecies 2024-12-09 18:48:51 +01:00
Christian Tzolov
376dd213de WIP 2024-12-09 16:05:21 +01:00