Refactor the mcp-core module
- The core module has been refactored to remove unnecessary abstraction between the SSE transport and the STDIO transport. - Tests have been improved and no longer complain about multiple subscriptions to single-subscriber Sink. - SSE transport layer is now assuming non-blocking execution and no longer makes thread hops when not needed. - Decouple ObjectMapper and error handling from AbstractMcpTransport and remove later. Additional improvements: - Rename transport classes to better reflect client-side role (*ServerTransport -> *ClientTransport) - Introduce fluent builder pattern for client configuration - Simplify DefaultMcpSession by removing ObjectMapper dependency - Move unmarshal responsibility to transport layer - Update documentation and diagrams to reflect new architecture - Clean up test implementations
This commit is contained in:
parent
8b2ce26e8a
commit
7a98a935af
1 changed files with 560 additions and 761 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# StdioServerTransport
|
||||
# StdioClientTransport
|
||||
|
||||
The `StdioServerTransport` class implements the [MCP Stdio Transport](https://spec.modelcontextprotocol.io/specification/basic/transports/#stdio) specification, providing communication with MCP servers over standard input/output streams.
|
||||
The `StdioClientTransport` class implements the [MCP Stdio Transport](https://spec.modelcontextprotocol.io/specification/basic/transports/#stdio) specification, providing communication with MCP servers over standard input/output streams.
|
||||
|
||||
## Overview
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ ServerParameters params = ServerParameters.builder()
|
|||
.build();
|
||||
|
||||
// Create transport
|
||||
StdioServerTransport transport = new StdioServerTransport(params);
|
||||
StdioClientTransport transport = new StdioClientTransport(params);
|
||||
|
||||
// Start transport
|
||||
transport.start();
|
||||
|
|
|
|||
Loading…
Reference in a new issue