Content
# Open MCP Server
[**English Version**](https://gitee.com/changsong/open-mcp-server/blob/main/README_EN.md)
Open-MCP-Server is a service framework that supports the Model Context Protocol (MCP), designed to simplify the integration of enterprise systems with AI platforms and provide business data support for AI systems. This framework natively supports various open APIs, internal system APIs, Dubbo interfaces, and other multi-protocol access, empowering AI systems to meet customized requirements.
## Core Features
- Unified adaptation of public/private APIs (supports RESTful, gRPC, Dubbo, SOAP, and other protocols)
- AI workflow context-aware data orchestration
- Extensible business logic architecture
- Custom AI solutions while maintaining compatibility with heterogeneous systems
- Intelligent AI assistant session management
- Third-party API integration (aggregated data, stocks, news, videos, etc.)
- Code auto-generation feature
## External Interface Features
### 1. API Testing Interface
#### Interface Testing
```bash
POST /api/test
Content-Type: application/json
{
"apiUrl": "http://api.example.com/data",
"method": "GET",
"cookie": "session=abc123",
"requestData": "{\"param1\": \"value1\"}"
}
```
**Function Description:**
- Supports testing any HTTP API interface
- Automatically handles URL parameter concatenation for GET requests
- Supports Cookie authentication
- Supports all HTTP methods (GET, POST, PUT, DELETE, etc.)
- Returns test results in JSON format
### 2. Code Generation Feature
#### Generate Code
```bash
POST /api/generate
Content-Type: application/json
{
"apiUrl": "http://api.example.com/data",
"method": "GET",
"packagePath": "com.open.mcp.server.api",
"apiName": "ExampleApi",
"requestData": "{\"param1\": \"value1\"}",
"responseData": "{\"result\": \"success\"}"
}
```
#### Download Generated Code
```bash
POST /api/download
Content-Type: application/json
{
"apiUrl": "http://api.example.com/data",
"method": "GET",
"packagePath": "com.open.mcp.server.api",
"apiName": "ExampleApi",
"requestData": "{\"param1\": \"value1\"}",
"responseData": "{\"result\": \"success\"}"
}
```
**Function Description:**
- Automatically generates API interface definitions
- Generates request/response DTO classes
- Generates service implementation classes
- Automatically handles parameter mapping and type conversion
- Supports file download functionality
- Generates complete Spring Boot integration code
### 3. AI Assistant Features
#### Single Q&A
```bash
GET /ai-assistant/ai/ask?question=your question
```
#### Create Session
```bash
POST /ai-assistant/session/create
```
#### Session Chat
```bash
POST /ai-assistant/session/chat
Content-Type: application/x-www-form-urlencoded
sessionId=xxx&message=user message&systemPrompt=system prompt
```
#### Get Session History
```bash
GET /ai-assistant/session/history?sessionId=xxx
```
#### Clear Session
```bash
POST /ai-assistant/session/clear
Content-Type: application/x-www-form-urlencoded
sessionId=xxx&reset=true
```
**Function Description:**
- Supports single Q&A and session modes
- Dynamically injects MCP tools
- Session state management
- Customizable system prompts
- Complete conversation history records
### 4. AI Generation Features
#### Text Generation
```bash
GET /ai/generate?message=content to generate
```
#### Stream Generation
```bash
GET /ai/generateStream?message=content to generate
```
#### MCP Tool Invocation
```bash
GET /ai/mcp?message=question using tools
```
**Function Description:**
- Text generation based on Azure OpenAI
- Supports streaming responses
- Integrates MCP tool invocation
- Supports various deployment models
### 5. Multi-Protocol Service Management
#### HTTP Service Management
```bash
# Get service list
GET /api/http/list
# Get single service
GET /api/http/{id}
# Create service
POST /api/http/save
Content-Type: application/json
# Update service
PUT /api/http/{id}
Content-Type: application/json
# Delete service
DELETE /api/http/{id}
```
#### Dubbo Service Management
```bash
# Get service list
GET /api/dubbo/list
# Get single service
GET /api/dubbo/{id}
# Create service
POST /api/dubbo/save
Content-Type: application/json
# Update service
PUT /api/dubbo/{id}
Content-Type: application/json
# Delete service
DELETE /api/dubbo/{id}
```
#### gRPC Service Management
```bash
# Get service list
GET /api/grpc/list
# Get single service
GET /api/grpc/{id}
# Create service
POST /api/grpc/save
Content-Type: application/json
# Update service
PUT /api/grpc/{id}
Content-Type: application/json
# Delete service
DELETE /api/grpc/{id}
```
#### SOAP Service Management
```bash
# Get service list
GET /api/soap/list
# Get single service
GET /api/soap/{id}
# Create service
POST /api/soap/save
Content-Type: application/json
# Update service
PUT /api/soap/{id}
Content-Type: application/json
# Delete service
DELETE /api/soap/{id}
```
### 6. Registry Center Connection Management
#### Basic CRUD Operations
```bash
# Get connection list
GET /api/registry/list
# Get single connection
GET /api/registry/{id}
# Create connection
POST /api/registry/save
Content-Type: application/json
# Update connection
PUT /api/registry/{id}
Content-Type: application/json
# Delete connection
DELETE /api/registry/{id}
```
#### Advanced Features
```bash
# Paginated query
GET /api/registry/page?connectionName=xxx®istryType=xxx&host=xxx&pageNum=1&pageSize=10
# Batch save
POST /api/registry/batch-save
Content-Type: application/json
# Batch delete
POST /api/registry/batch-delete
Content-Type: application/json
```
### 7. Language Settings
```bash
POST /api/setLanguage
Content-Type: application/json
{
"language": "zh_CN"
}
```
## MCP Tool Features
### Dubbo Service Tool
#### Get Service Information
```bash
# Tool Name: getDubboServiceInfo
# Parameter Description:
{
"interfaceName": "com.example.DemoService" # Fully qualified name of the Dubbo service interface
}
```
#### Invoke Service Method
```bash
# Tool Name: invokeDubboService
# Parameter Description:
{
"interfaceName": "com.example.DemoService", # Fully qualified name of the Dubbo service interface
"methodName": "sayHello", # Name of the method to invoke
"version": "1.0.0", # Service version (optional)
"params": { # Method parameters (JSON format)
"param1": "value1",
"param2": 123
}
}
```
## Configuration Description
### Dubbo Configuration
```yaml
dubbo:
application:
name: ${spring.application.name}
qos-enable: false
registry:
address: zookeeper://127.0.0.1:2181
timeout: 30000
protocol:
name: dubbo
port: -1
consumer:
check: false
timeout: 30000
retries: 0
```
### Aggregated Data API Configuration
```yaml
juhe:
news:
apikey: your_api_key
baseUrl: http://v.juhe.cn
video:
apikey: ${juhe.news.apikey}
baseUrl: ${juhe.news.baseUrl}
```
### MCP Server Configuration
```json
"mcpServers": {
"open-mcp-server": {
"command": "java",
"args": [
"-Dspring.ai.mcp.server.stdio=true",
"-jar",
"/path/to/jar/open-mcp-server-1.0-SNAPSHOT.jar",
"juhe.news.api-key=your_aggregated_key"
]
}
}
```
## Feature Support
### Multi-Protocol Support
- **HTTP/RESTful**: Complete CRUD operations and API testing
- **Dubbo**: Generic calls, service discovery, parameter conversion
- **gRPC**: Service management and invocation
- **SOAP**: Web service support
### AI Integration
- **Azure OpenAI**: Text generation and conversation
- **MCP Tools**: Dynamic tool injection and invocation
- **Session Management**: Multi-session support and state retention
- **Streaming Response**: Real-time data stream processing
### Development Tools
- **Code Generation**: Automatically generate API integration code
- **Interface Testing**: Online API testing tool
- **Registry Center Management**: Multi-registry connection management
- **Internationalization**: Multi-language support
### Third-Party APIs
- **Aggregated Data**: News, video, stock, and other data services
- **Extensible**: Supports adding more third-party APIs
## License
open-mcp-server is licensed under the MIT License.
According to the terms of the MIT License, you are free to use, modify, and distribute this software. For specific terms, please refer to the LICENSE file in the project repository.
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
go-utcp
go-utcp is a scalable protocol for tool interaction across various systems.
sample-agentic-ai-demos
Examples of building Agentic AI with AWS, featuring MCP server integration.
mcp-in-action
MCP In Action helps developers master Model Context Protocol through...