-
Notifications
You must be signed in to change notification settings - Fork 8.9k
feat: Import the ModelContextProtocol core feature classes #7786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR imports core Model Context Protocol (MCP) classes to prepare for subsequent MCPTool functionality implementation in the Seata console module. The changes introduce a comprehensive MCP server infrastructure including protocol definitions, transport providers, runtime engines, session management, and auto-registration capabilities.
Key Changes
- Protocol Infrastructure: Adds complete MCP protocol definitions including JSON-RPC message types, server/client capabilities, and tool specifications
- Transport Layer: Implements SSE and Streamable transport providers with WebMVC integration for handling MCP communication
- Runtime Engine: Introduces AsyncRuntimeEngine for managing tool registration, request/notification handling, and schema validation
- Session Management: Provides session factories and runtime sessions supporting both SSE and Streamable protocols with health monitoring
Reviewed changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| MCPProperties.java | Configuration properties class for MCP server settings supporting SSE and Streamable types |
| KeepAliveScheduler.java | Utility for scheduling keep-alive pings to maintain session health |
| WebMvcStreamableChannelProvider.java | Streamable transport provider with SSE support for bidirectional MCP communication |
| WebMvcSseChannelProvider.java | SSE-specific channel provider for unidirectional server-to-client messaging |
| RuntimeExchangeContext.java | Context object for MCP request/notification exchanges |
| RuntimeCoreInterface.java | Builder interface for constructing async runtime engines |
| RuntimeCapabilities.java | Capability definitions for tools, completions, and server features |
| AsyncRuntimeEngine.java | Core engine managing tool registry, request handling, and protocol negotiation |
| MCPAutoRegister.java | Spring BeanPostProcessor for auto-registering @tool annotated methods |
| StreamableServerRuntimeSession.java | Session implementation supporting streamable protocol with response streaming |
| StandardStreamableSessionFactory.java | Factory for creating streamable sessions with initialization |
| StandardJsonSchemaValidator.java | JSON schema validator using networknt schema library |
| ServerRuntimeSession.java | Base server session handling initialization and message routing |
| MCPServerManager.java | Lifecycle manager for MCP server with pause/resume capabilities |
| RuntimeUtils.java | Common utility methods for validation and text operations |
| Tool.java & ToolParam.java | Annotations for marking MCP tool methods and parameters |
| MCPServerConfig.java | Spring configuration for MCP server beans |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ⅰ. Describe what this PR did
Import the core classes related to ModelContextProtocol to prepare for the subsequent implementation of MCPTool functionality.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews