Hello Dubbo Community,

I am pleased to present a proposal for integrating Apache Dubbo with MCP
(Model Control Protocol). This integration will enable Dubbo services to be
exposed as MCP tools, facilitating 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

I welcome your feedback and suggestions on this proposal. Please feel free
to share your thoughts on the mailing list.

Best regards,
Stellar1999

Reply via email to