Stellar1999 opened a new issue, #15332:
URL: https://github.com/apache/dubbo/issues/15332

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar feature requirement.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Descriptions
   
   ## Background
   To better help developers expose Dubbo services as AI capabilities and 
enhance the integration with AI systems, we propose integrating the MCP (Model 
Control Protocol) with Dubbo. This integration will:
   - Support automatic service export as MCP tools
   - Enable client-side invocation based on MCP SSE mode
   
   ## Overview
   This proposal outlines the integration of Apache Dubbo with MCP, enabling 
Dubbo services to be exposed as MCP tools. This integration facilitates 
seamless communication between Dubbo services and MCP-compatible systems.
   
   ## Features
   
   ### 1. Configuration Options
   - `dubbo.mcp.enabled`: Enable/disable MCP integration (default: false)
   - `dubbo.mcp.sse.endpoint`: Server-Sent Events (SSE) endpoint path (default: 
`/dubbo/mcp/sse`)
   
   > **Note**: These configuration options are only available when using the 
Triple protocol. Non-Triple protocols will result in an error. This version 
only supports the Triple-REST protocol.
   
   ### 2. Core Functionality
   - Automatic SSE connection establishment through the configured endpoint
   - Support for `@DubboService` annotation to register Dubbo interface methods 
as MCP tools
   - Annotation attributes:
     - `mcp`: Enable/disable MCP server (default: false)
   - Automatic data retrieval from Triple OpenAPI when annotation attributes 
are empty
   
   ## Implementation Details
   
   ### Service Initialization
   1. During application startup, verify `mcp.server.enabled=true`
   2. If enabled, automatically register a Triple protocol server
   3. Expose the configured SSE endpoint
   
   ### Service Registration
   1. Scan services for `@DubboService` annotations
   2. Validate methods to ensure Triple protocol compatibility
   3. For annotated services:
      - Register name and description with MCP
      - Convert method parameters to JSON Schema
      - Register with McpServer using mcp-java-sdk
   
   ## Impact
   - New feature addition
   - No breaking changes to existing functionality
   - Requires Triple protocol support
   
   ## Alternatives Considered
   - Direct integration without MCP protocol
   - Custom protocol implementation
   
   ## References
   - MCP Protocol Specification
   - Triple Protocol Documentation
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to