Commit graph java-sdk/spring-ai-mcp-core
Author SHA1 Message Date
Dariusz Jędrzejczyk
8b2ce26e8a
Fix tests by restarting the container in each test
The reason is that the server performs shutdown after SSE connection is
closed.
2024-12-17 15:33:41 +01:00
Christian Tzolov
716d1a0e7f Enhance DefaultMcpSession with request/response handling
- Add comprehensive documentation for MCP session components in MCP-SESSION.md
- Add logging and error handling in McpAsyncClient
- Update test configurations and dependencies
- Add reactor-netty-http and spring-context test dependencies

Resolves #6
2024-12-17 13:42:59 +01:00
Christian Tzolov
0ebb38ce0e Fix the docker.io/tzolov/mcp-everything-server:v1 url 2024-12-15 23:32:11 +01:00
Christian Tzolov
bc281dee54 feat: add SSE transport and improve documentation
- Add Server-Sent Events (SSE) transport implementation with test coverage
- Add detailed documentation for both SSE and STDIO transports
- Extract common test logic into abstract base classes
- Add testcontainers support for SSE integration tests
- Replace System.out with SLF4J logging
- Externalize dependency versions to properties
- Implement endpoint event handling per MCP spec
- Add message endpoint sink for reliable message routing
- Improve error handling and graceful shutdown
- Update core module README with expanded features and examples
- Add dependency version properties and logging configuration
- Update architecture and class diagrams

Resolves #4
2024-12-15 22:54:48 +01:00
Christian Tzolov
be31c6119c feat(mcp): add convenience methods without cursor parameter
Add overloaded methods for list operations (tools, resources, templates, prompts)
 that don't require a cursor parameter, simplifying the API for basic use cases
 where pagination is not needed.
2024-12-13 09:15:37 +01:00
Christian Tzolov
c332300651 Delete outdated test 2024-12-13 00:02:35 +01:00
Christian Tzolov
59319e5509 refactor: process output writing 2024-12-12 23:27:46 +01:00
Christian Tzolov
8a0cd4ef06 refactor: improve resource management in StdioServerTransport
- Use try-with-resources for proper reader cleanup
- Remove unnecessary reader/writer instance variables
- Access process streams directly when needed
2024-12-12 23:18:25 +01:00
Dariusz Jędrzejczyk
8397849d6e Properly dispose Schedulers for IO and skip closing BufferedReader as they deadlocked on Ubuntu
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@gmail.com>
2024-12-12 22:54:28 +01:00
Christian Tzolov
a4950c04a5 test: increase MCP client timeout to 20s and enable tests
- Doubles the default timeout from 10s to 20s in McpAsyncClient
- Updates corresponding timeout values in test classes
- Enables previously disabled async client tests
2024-12-12 21:45:51 +01:00
Christian Tzolov
c41f3fe738 Temp disable the entire McpAsyncClientTests 2024-12-12 21:32:06 +01:00
Christian Tzolov
4a1763d355 Temp disable testMcpAsyncClientState 2024-12-12 21:29:18 +01:00
Christian Tzolov
a55379745f Fix javadoc 2024-12-12 21:13:02 +01:00
Christian Tzolov
e9bafe9f21 feat(client): add convenience methods for listing operations without cursor
Add overloaded methods for list operations (tools, resources, templates, prompts)
 that don't require a cursor parameter. This simplifies the API for cases where
 pagination is not needed.
2024-12-12 14:34:45 +01:00
Dariusz Jędrzejczyk
972519b9ea
Improve examples in README.md (#2)
* Improve AsyncMcpClient example in README.md

* Move McpSyncClient example above the async variant and improve the code
2024-12-12 14:34:03 +01:00
Christian Tzolov
7f25221d42 Improve MpcSchema structure 2024-12-12 14:00:31 +01:00
Dariusz Jędrzejczyk
9081b6345f refactor: improve process handling and graceful shutdown
- Enhance process handling in StdioServerTransport with proper cleanup
- Refactor graceful shutdown across McpSession implementations
- Add proper JSON serialization annotations for Role and LoggingLevel enums
- Fix typo in setInboundMessageHandler method name
- Improve test coverage using StepVerifier
- Add documentation and cleanup code
2024-12-12 13:47:01 +01:00
Christian Tzolov
800f145eb2 Update the mcp-core readme 2024-12-11 07:58:44 +01:00
Mark Pollack
9bbf9d9732 Next development version 2024-12-11 01:45:23 -05:00
Mark Pollack
dce530ed91 Release version 0.1.0 2024-12-11 01:44:20 -05:00
Mark Pollack
586f132f46 Update copyright headers and add javaformat plugin 2024-12-10 23:49:24 -05:00
Christian Tzolov
949f961c04 fix docs 2024-12-11 00:56:06 +01:00
Mark Pollack
2747182b3b Remove leftover mvnw scripts and suppress javadoc warnings 2024-12-10 18:55:16 -05:00
Christian Tzolov
a922b1aa7a Add doc diagrams 2024-12-11 00:51:24 +01:00
Mark Pollack
7d7923102b remove extra file 2024-12-10 18:46:49 -05:00
Mark Pollack
9978c25865 package name refactoring 2024-12-10 18:46:49 -05:00
Mark Pollack
39310c2010 remove extraneous .mvn directories 2024-12-10 18:46:49 -05:00
Mark Pollack
910be3cee7 Rename modules, update .gitignore 2024-12-10 18:46:49 -05:00