Skip to content

Conversation

@Xb2555
Copy link
Contributor

@Xb2555 Xb2555 commented Nov 16, 2025

Ⅰ. 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

@codecov
Copy link

codecov bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 72.08803% with 520 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.96%. Comparing base (30de170) to head (b453165).

Files with missing lines Patch % Lines
...eCore/channel/WebMvcStreamableChannelProvider.java 44.58% 125 Missing and 3 partials ⚠️
.../core/protocol/StreamableServerRuntimeSession.java 17.26% 115 Missing ⚠️
...he/seata/mcp/core/protocol/ProtocolDefinition.java 79.17% 93 Missing and 3 partials ⚠️
.../runtimeCore/channel/WebMvcSseChannelProvider.java 53.92% 45 Missing and 2 partials ⚠️
...pache/seata/mcp/core/register/MCPAutoRegister.java 76.16% 27 Missing and 14 partials ⚠️
...seata/mcp/core/runtimeCore/AsyncRuntimeEngine.java 75.91% 21 Missing and 12 partials ⚠️
...ata/mcp/core/runtimeCore/RuntimeCoreInterface.java 61.53% 19 Missing and 1 partial ⚠️
.../seata/mcp/core/protocol/ServerRuntimeSession.java 91.48% 7 Missing and 1 partial ⚠️
...mcp/core/protocol/StandardJsonSchemaValidator.java 79.41% 4 Missing and 3 partials ⚠️
...rg/apache/seata/mcp/entity/pojo/MCPProperties.java 95.40% 4 Missing ⚠️
... and 9 more
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7786      +/-   ##
============================================
+ Coverage     70.92%   70.96%   +0.04%     
+ Complexity      994      956      -38     
============================================
  Files          1322     1349      +27     
  Lines         50175    52033    +1858     
  Branches       5932     6063     +131     
============================================
+ Hits          35587    36927    +1340     
- Misses        11660    12131     +471     
- Partials       2928     2975      +47     
Files with missing lines Coverage Δ
...a/org/apache/seata/mcp/config/MCPServerConfig.java 100.00% <100.00%> (ø)
...pache/seata/mcp/core/manager/MCPServerManager.java 100.00% <100.00%> (ø)
...eata/mcp/core/protocol/ProtocolErrorException.java 100.00% <100.00%> (ø)
...pache/seata/mcp/core/protocol/SchemaValidator.java 100.00% <100.00%> (ø)
...ore/protocol/StandardStreamableSessionFactory.java 100.00% <100.00%> (ø)
...ta/mcp/core/runtimeCore/DefaultRuntimeContext.java 100.00% <100.00%> (ø)
...che/seata/mcp/core/runtimeCore/RuntimeContext.java 100.00% <100.00%> (ø)
...a/mcp/core/runtimeCore/RuntimeContextResolver.java 100.00% <100.00%> (ø)
...a/mcp/core/runtimeCore/RuntimeExchangeContext.java 100.00% <100.00%> (ø)
...apache/seata/console/config/WebSecurityConfig.java 97.14% <92.30%> (+4.55%) ⬆️
... and 18 more

... and 8 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants