# WeChat Red Packet Distributor AI Agent Connect

> Calculate fair and deterministic WeChat Red Packet distributions.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_4oOwAHylM3KnZ7hDKsXFVlQsTojQHxrg0gg2hv5Z/ai-agent-connect
- **Tags:** wechat, hongbao, distribution, calculator, fairness

## Description

This MCP server provides precise mathematical models for distributing WeChat Red Packets (Hongbao). It allows AI agents to calculate exact monetary allocations using three distinct strategies: `fixed` for equal splits, `random_fair` using a stick-breaking algorithm to ensure fairness, and `lucky_king` for high-variance distributions. Use `validate_hongbao_config` to ensure the total amount is sufficient for the number of recipients before calculating, and `get_distribution_statistics` to analyze the resulting spread, average, and the highest amount (Lucky King).

## Tools

### calculate_distribution
Generates the specific list of monetary amounts for each participant based on the selected strategy

### get_distribution_statistics
Analyzes a generated list of amounts to provide insight into the fairness and volatility of the distribution

### validate_hongbao_config
Checks if a proposed distribution scenario is mathematically possible before attempting calculation

## Prompt Examples

**Prompt:** 
```
Can you distribute 100 RMB among 10 people using the random_fair mode?
```

**Response:** 
```
The distribution for 100 RMB among 10 people using random_fair is: [12.45, 8.32, 15.10, 7.55, 11.20, 9.45, 13.08, 6.25, 10.50, 6.10].
```

**Prompt:** 
```
Split 50 RMB equally between 5 people.
```

**Response:** 
```
The fixed distribution for 50 RMB among 5 people is: [10.0, 10.0, 10.0, 10.0, 10.0].
```

**Prompt:** 
```
Is it possible to distribute 0.05 RMB to 10 people?
```

**Response:** 
```
No, it is not possible. The minimum required amount for 10 people is 0.10 RMB.
```

## Frequently Asked Questions

**What is the minimum amount required for a distribution?**
Each recipient must receive at least 0.01 RMB. You can use `validate_hongbao_config` to check if your total amount is sufficient for your group size.

**How does the 'random_fair' mode work?**
The `random_fair` mode uses a stick-breaking algorithm. It ensures every person gets at least 0.01 RMB and prevents extreme inequality by capping any single person's share at twice the current remaining average.

**Can I see the statistical spread of the red packet?**
Yes, after generating a distribution with `calculate_distribution`, you can pass the resulting amounts to `get_distribution_statistics` to find the average, variance, and the Lucky King amount.
