-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Open
0 / 30 of 3 issues completedLabels
type/enhancementEverything related with code enhancement or performanceEverything related with code enhancement or performancetype/proposalEverything you want Dubbo haveEverything you want Dubbo have
Milestone
Description
Pre-check
- I am sure that all the content I provide is in English.
Search before asking
- I had searched in the issues 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
- During application startup, verify
mcp.server.enabled=true
- If enabled, automatically register a Triple protocol server
- Expose the configured SSE endpoint
Service Registration
- Scan services for
@DubboService
annotations - Validate methods to ensure Triple protocol compatibility
- 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
- I agree to follow this project's Code of Conduct
AlbumenJAlbumenJ
Sub-issues
Metadata
Metadata
Assignees
Labels
type/enhancementEverything related with code enhancement or performanceEverything related with code enhancement or performancetype/proposalEverything you want Dubbo haveEverything you want Dubbo have
Type
Projects
Status
Todo