Skip to content

Conversation

RainYuY
Copy link
Contributor

@RainYuY RainYuY commented May 20, 2025

What is the purpose of the change?

Ref: #15332

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@RainYuY RainYuY force-pushed the feature/mcp_plugin branch 4 times, most recently from 4b00a76 to 4739e28 Compare May 20, 2025 13:49
@codecov-commenter
Copy link

codecov-commenter commented May 20, 2025

Codecov Report

❌ Patch coverage is 37.81842% with 952 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.73%. Comparing base (a7b641f) to head (6018a5a).

Files with missing lines Patch % Lines
...transport/DubboMcpStreamableTransportProvider.java 28.53% 228 Missing and 20 partials ⚠️
...va/org/apache/dubbo/mcp/core/McpServiceFilter.java 12.00% 153 Missing and 1 partial ⚠️
...ache/dubbo/mcp/tool/DubboOpenApiToolConverter.java 30.09% 120 Missing and 24 partials ⚠️
...pache/dubbo/mcp/tool/DubboServiceToolRegistry.java 57.61% 71 Missing and 18 partials ⚠️
...ava/org/apache/dubbo/mcp/util/TypeSchemaUtils.java 51.38% 77 Missing and 11 partials ⚠️
...e/dubbo/mcp/core/McpApplicationDeployListener.java 25.43% 81 Missing and 4 partials ⚠️
...bo/mcp/transport/DubboMcpSseTransportProvider.java 61.72% 30 Missing and 1 partial ⚠️
...pache/dubbo/mcp/core/McpServiceExportListener.java 48.14% 25 Missing and 3 partials ⚠️
...g/apache/dubbo/mcp/tool/DubboMcpGenericCaller.java 47.16% 25 Missing and 3 partials ⚠️
...java/org/apache/dubbo/config/nested/McpConfig.java 0.00% 23 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15406      +/-   ##
============================================
- Coverage     61.02%   60.73%   -0.29%     
- Complexity    11685    11715      +30     
============================================
  Files          1923     1937      +14     
  Lines         87081    88612    +1531     
  Branches      13115    13378     +263     
============================================
+ Hits          53141    53819     +678     
- Misses        28488    29258     +770     
- Partials       5452     5535      +83     
Flag Coverage Δ
integration-tests-java21 32.38% <1.37%> (-0.60%) ⬇️
integration-tests-java8 32.40% <0.39%> (-0.55%) ⬇️
samples-tests-java21 32.04% <1.17%> (-0.58%) ⬇️
samples-tests-java8 29.83% <0.19%> (-0.53%) ⬇️
unit-tests-java11 58.98% <17.64%> (-0.01%) ⬇️
unit-tests-java17 58.49% <37.49%> (-0.28%) ⬇️
unit-tests-java21 58.49% <37.49%> (-0.27%) ⬇️
unit-tests-java8 58.98% <17.64%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@RainYuY RainYuY force-pushed the feature/mcp_plugin branch from 4739e28 to c1ad13b Compare May 20, 2025 14:40
@RainYuY RainYuY force-pushed the feature/mcp_plugin branch from c1ad13b to 1eb59ac Compare May 20, 2025 14:49
RainYuY added 2 commits May 21, 2025 18:43
…d optimized the port selection logic when configurations are not provided.
@RainYuY RainYuY force-pushed the feature/mcp_plugin branch 5 times, most recently from 763676c to 1913eb8 Compare May 24, 2025 02:47
Add errorCode.
Add unitTest
@RainYuY RainYuY force-pushed the feature/mcp_plugin branch from 1913eb8 to 5cd8426 Compare May 24, 2025 03:05
@RainYuY RainYuY marked this pull request as ready for review May 24, 2025 04:50
@RainYuY
Copy link
Contributor Author

RainYuY commented May 24, 2025

PTAL @AlbumenJ @CrazyHZM

Copy link
Contributor

@wcy666103 wcy666103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many Chinese comments in the change commit.

@RainYuY RainYuY force-pushed the feature/mcp_plugin branch from 18e1a2c to f72f378 Compare May 26, 2025 08:45
@RainYuY
Copy link
Contributor Author

RainYuY commented May 26, 2025

There are many Chinese comments in the change commit.

Done.Translation completed.

@SpursJiang
Copy link

Dear Dubbo team:
Once a Dubbo service interface is registered as an MCP (Mesh Control Plane) tool, is its metadata stored exclusively in local memory? Furthermore, are there any plans to register MCP tools with the MCP register in Nacos version 3?
Is the Streamable HTTP protocol supported?

@zrlw
Copy link
Contributor

zrlw commented May 27, 2025

There are many Chinese comments in the change commit.

Done.Translation completed.

no, there are still chinese comments. i.e. McpConstant.java

@RainYuY RainYuY force-pushed the feature/mcp_plugin branch from f72f378 to 7057efb Compare May 27, 2025 02:46
@RainYuY
Copy link
Contributor Author

RainYuY commented May 27, 2025

There are many Chinese comments in the change commit.

Done.Translation completed.

no, there are still chinese comments. i.e. McpConstant.java

You're right. done.

@RainYuY
Copy link
Contributor Author

RainYuY commented May 27, 2025

Dear Dubbo team: Once a Dubbo service interface is registered as an MCP (Mesh Control Plane) tool, is its metadata stored exclusively in local memory? Furthermore, are there any plans to register MCP tools with the MCP register in Nacos version 3? Is the Streamable HTTP protocol supported?

  1. Is its metadata stored exclusively in local memory? Yes.

  2. Furthermore, are there any plans to register MCP tools with the MCP registry in Nacos version 3? Under consideration.

  3. Is the Streamable HTTP protocol supported? No, but I believe we will support it in the future.Now just sse.

@RainYuY RainYuY marked this pull request as ready for review August 9, 2025 05:46
@zrlw zrlw requested a review from Copilot August 9, 2025 09:09
Copy link

@Copilot 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 introduces Model Context Protocol (MCP) integration for Dubbo, allowing Dubbo services to be exposed as MCP tools for AI agents and large language models. The implementation provides HTTP-based transport support through both Server-Sent Events (SSE) and streamable protocols.

  • Adds a new dubbo-mcp plugin module that integrates Dubbo with the Model Context Protocol
  • Implements MCP transport providers supporting both SSE and streamable communication patterns
  • Provides tools for automatically converting Dubbo services to MCP tool specifications using OpenAPI definitions

Reviewed Changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pom.xml Adds dubbo-mcp module to build and creates conditional profiles for Java 17+
dubbo-plugin/dubbo-mcp/pom.xml Defines dependencies for MCP SDK, OpenAPI support, and configuration management
dubbo-plugin/dubbo-mcp/src/main/java/ Core MCP implementation including service filters, transport providers, and tool registry
dubbo-remoting/dubbo-remoting-http12/ Adds NOT_ACCEPTABLE HTTP status and RPC context response header support
dubbo-plugin/dubbo-qos/pom.xml Adds log4j-api dependency
dubbo-distribution/ Updates BOM and all distributions to include dubbo-mcp dependency

@RainYuY RainYuY requested a review from songxiaosheng August 9, 2025 09:46
@RainYuY RainYuY requested a review from songxiaosheng August 12, 2025 08:25
@RainYuY RainYuY requested a review from conghuhu August 20, 2025 03:26
songxiaosheng and others added 3 commits August 22, 2025 20:36
# Conflicts:
#	dubbo-distribution/dubbo-all-shaded/pom.xml
#	dubbo-distribution/dubbo-all/pom.xml
#	dubbo-test/dubbo-test-modules/src/test/java/org/apache/dubbo/dependency/FileTest.java
#	pom.xml
@RainYuY RainYuY dismissed stale reviews from songxiaosheng and AlbumenJ September 28, 2025 01:25

resolved

@RainYuY
Copy link
Contributor Author

RainYuY commented Oct 13, 2025

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

Labels

help wanted Everything needs help from contributors type/proposal Everything you want Dubbo have

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants