Content
# Dada Delivery MCP Server
This is a Dada Delivery MCP server, based on the latest MCP Python SDK 1.12.0, using the streamable-http transmission protocol.
## Features
- ✅ Create delivery orders (`create_order`)
- ✅ Cancel delivery orders (`cancel_order`)
- ✅ Query order status (`query_order`)
- ✅ Get cancellation reason list (`get_cancel_reasons`)
- ✅ Use streamable-http transmission protocol (recommended for production)
- ✅ Asynchronous API calls
- ✅ Configure resource access
## System Requirements
- Python 3.10+
- MCP Python SDK 1.12.0+
## Installation
### Method 1: Using uv (Recommended)
```bash
# If uv is not installed yet
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone or navigate to the project directory
cd dada-mcp-server
# uv will automatically install dependencies based on pyproject.toml
uv sync
```
### Method 2: Using pip
```bash
pip install "mcp>=1.12.0" "requests>=2.31.0" "aiohttp>=3.8.0" "uvicorn>=0.24.0"
```
## Running the Server
### Streamable HTTP Mode (Recommended for Production)
```bash
# Run directly using uv
uv run python server.py
# Or use the startup script
./start_http_server.sh
```
## Complete Workflow with uv
```bash
# 1. Install uv (if not installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2. Navigate to the project directory
cd dada-mcp-server
# 3. Sync dependencies
uv sync
# 4. Run the MCP server (streamable-http transmission)
uv run python server.py
# 5. Run any MCP related commands
uv run mcp --help
```
## MCP Tool Description
### 1. create_order - Create Delivery Order
Create a new Dada delivery order.
**Parameters:**
- `receiver_name` (str): Recipient's name
- `receiver_address` (str): Delivery address
- `receiver_phone` (str): Recipient's phone number
- `receiver_lat` (float): Latitude of the delivery address
- `receiver_lng` (float): Longitude of the delivery address
- `cargo_price` (float, optional): Price of the goods, default is 50.0
- `tips` (float, optional): Tip, default is 1.0
- `info` (str, optional): Remarks, default is "Remarks"
**Returns:** JSON formatted order creation result, including order ID
### 2. cancel_order - Cancel Delivery Order
Cancel an already created delivery order.
**Parameters:**
- `order_id` (str): Order ID
- `cancel_reason_id` (int, optional): Cancellation reason ID, default is 1
- `cancel_reason` (str, optional): Custom cancellation reason
**Cancellation Reason ID Description:**
- 1: No delivery person accepted the order
- 2: Delivery person did not come to pick up the goods
- 3: Delivery person's attitude was too poor
- 4: Customer canceled the order
- 5: Order was filled out incorrectly
- 10000: Other (requires providing cancel_reason)
### 3. query_order - Query Order Status
Query the current status of a specified order.
**Parameters:**
- `order_id` (str): Order ID
**Returns:** JSON formatted order status information
### 4. get_cancel_reasons - Get Cancellation Reason List
Get all available reasons for order cancellation.
**Returns:** JSON formatted cancellation reason mapping table
## MCP Resources
### dada://config - Configuration Information
Access configuration information for Dada delivery services (excluding sensitive data).
## MCP Client Connection
### FastGPT Integration
After the server starts, the MCP client (such as FastGPT) can connect via the streamable-http protocol:
```bash
# The server will display the listening address and port after startup
# For example: http://localhost:8080
# Configure this address in the MCP server settings of FastGPT
```
## Development and Debugging
Start the server for development and debugging:
```bash
uv run python server.py
```
The server will run using the streamable-http transmission protocol, supporting modern MCP over HTTP connections.
## uv Project Management
```bash
# Add a new dependency
uv add package-name
# Remove a dependency
uv remove package-name
# Update dependencies
uv sync --upgrade
# Check project status
uv tree
```
## Version Information
- MCP Python SDK: >=1.12.0
- Transmission Protocol: streamable-http (recommended for production)
- Python Requirement: >=3.10
- Package Manager: uv (recommended)
## License
MIT License
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for...
Appwrite
Build like a team of hundreds
squeez
Hook-based token compressor for 5 AI CLI hosts (Claude Code, Copilot CLI,...
asqav-sdk
Python SDK for AI agent governance - audit trails, policy enforcement,...
coze-mcp-for-openclaw
Coze MCP and Skill Management for OpenClaw