Skip to main content
Glama
zamb124
by zamb124
README.md
# ๐Ÿš€ Yango Tech MCP Server - One Command Installation

## ๐Ÿ›’ Yango Tech Integration

This project provides integration with **[Yango Tech](https://yango-tech.com/)** - a leading platform for ecommerce automation.

**Yango Tech is part of Yango Group**, a global tech company that transforms the everyday business of people around the world:

๐Ÿ“Š **150m+** rides since 2018  
๐Ÿ’ฐ **$2.5B+** GMV  
โœ… **99.99%** orders delivered without missing items  
๐Ÿ“ฆ **1.3M+** daily orders

**Yango Tech** offers comprehensive solutions for:
- ๐ŸŒ **APP Website applications**
- ๐Ÿช **Order management** and logistics
- ๐Ÿ“ฆ **Real-time inventory management** 
- ๐Ÿ›๏ธ **Product cataloging** with detailed information
- ๐Ÿšš **Delivery and order fulfillment**
- ๐Ÿ“Š **Analytics and sales reporting**
- ๐Ÿ”„ **API integration** for B2B automation

Through this MCP server, you can easily interact with the Yango Tech API directly from [Claude Desktop](https://www.anthropic.com/claude) or [Cursor IDE](https://www.cursor.com/), gaining access to orders, products, stock levels, and other platform information.

## For Users - Simple Installation

**Download this project and run one command:**

```bash
python3 install.py
```

**Done! Everything will be configured automatically.** ๐ŸŽ‰

---

## What the installer does:

1. โœ… **Automatically detects your OS** (Mac/Windows/Linux)
2. โœ… **Finds Python** and creates virtual environment
3. โœ… **Installs all dependencies** automatically (including FastMCP 2.5+)
4. โœ… **Detects installed IDEs** ([Claude Desktop](https://www.anthropic.com/claude) & [Cursor IDE](https://www.cursor.com/))
5. โœ… **Offers test API key** or your own
6. โœ… **Creates IDE configurations** automatically (if IDEs installed)
7. โœ… **Generates config files** in project root for manual setup
8. โœ… **Tests functionality** with real API
9. โœ… **Shows instructions** for next steps

**๐Ÿ’ก Works even without IDEs installed** - configuration files are always generated!

---

# ๐ŸŽฏ **POWERFUL IDE INTEGRATION**

## ๐Ÿค– **[Claude Desktop](https://www.anthropic.com/claude) & [Cursor IDE](https://www.cursor.com/) Ready!**

After installation, you'll have **seamless integration** with:

### ๐Ÿ–ฅ๏ธ **[Claude Desktop](https://www.anthropic.com/claude)** 
**Professional AI assistant with Yango Tech powers**
- ๐Ÿ’ฌ **Natural language queries** to Yango Tech API
- ๐Ÿ” **Smart product search** with readable names  
- ๐Ÿ“‹ **Order management** through conversation
- ๐Ÿ“Š **Real-time inventory** checking

#### ๐Ÿ“ธ **See [Claude Desktop](https://www.anthropic.com/claude) in Action:**

**๐Ÿ›๏ธ Product Catalog Analysis:**
![Claude Product Report](source/claude%20product%20report.png)

**๐ŸŽฌ Live Product Search Demo:**

![Claude Products Demo](source/claude_products_report.gif)

**๐Ÿ“ฆ Inventory Management:**
![Claude Stock Report](source/claude%20stock%20report.png)

**๐Ÿ“‹ Order Details Lookup:**
![Claude Order Detail](source/claude%20order%20detail.png)

**๐Ÿ” Order Status Tracking:**
![Claude Order Status](source/claude%20order%20status.png)

### โšก **[Cursor IDE](https://www.cursor.com/)**
**AI-powered code editor with business data access**
- ๐Ÿ› ๏ธ **Code while querying** [Yango Tech](https://yango-tech.com/) data
- ๐Ÿ”„ **API integration** directly in your workflow
- ๐Ÿ“ **Documentation generation** with real data
- ๐Ÿš€ **Rapid prototyping** with live business insights

### ๐ŸŽจ **Why This Is Game-Changing:**

**Instead of switching between multiple tools**, you can:
- โœจ **Ask Claude**: *"Show me details for order 240920-728268"*
- โœจ **Ask [Cursor](https://www.cursor.com/)**: *"What products are low in stock at store L001?"*  
- โœจ **Get instant answers** with **human-readable product names**
- โœจ **Work faster** with **natural language** instead of complex API calls

**๐Ÿ”— All powered by [Yango Tech](https://yango-tech.com/) - your ecommerce automation platform!**

---

## After installation

1. **Restart [Claude Desktop](https://www.anthropic.com/claude) and/or [Cursor IDE](https://www.cursor.com/)** (if installed)
2. **You'll have 6 Yango Tech tools with product name enrichment:**
   - `get_order_details` - Get order details with product names
   - `get_order_status` - Get order status  
   - `get_all_products` - Get all products with display names
   - `get_products_batch` - Get products with pagination and names
   - `get_all_stocks` - Get all stocks with product names
   - `get_stocks_batch` - Get stocks with pagination and names

**๐ŸŽฏ Key Feature:** All tools show user-friendly product names instead of cryptic product IDs!

---

## ๐Ÿ“ Generated Configuration Files

The installer always creates these files in the project root:

- **`claude_desktop_config.json`** - Ready-to-use [Claude Desktop](https://www.anthropic.com/claude) configuration
- **`cursor_settings.json`** - Ready-to-use [Cursor IDE](https://www.cursor.com/) configuration

**Use these files for:**
- Manual IDE setup
- Backup configurations
- Copying settings to other machines
- Troubleshooting

---

## ๐Ÿงช Test commands for [Claude Desktop](https://www.anthropic.com/claude) & [Cursor IDE](https://www.cursor.com/):

- **"Show 5 products from Yango Tech catalog"** (with product names)
- **"Show product stocks in stores"** (with product names)
- **"Show details of order 240920-728268"** (with enriched cart items)
- **"Get order status for 240920-728268"**

---

## โš™๏ธ Requirements

- **Python 3.8+** (automatically detected and verified)
- **Internet** for downloading dependencies
- **[Claude Desktop](https://www.anthropic.com/claude)** and/or **[Cursor IDE](https://www.cursor.com/)** (optional - configs generated anyway)

### ๐Ÿ Don't have Python installed?

**No problem!** If Python is missing or too old, the installer shows detailed installation guides:

- **macOS**: Official installer, Homebrew, or pyenv
- **Windows**: Official installer (โš ๏ธ check "Add to PATH"), Microsoft Store, or Chocolatey  
- **Linux**: Package manager (`apt`, `dnf`, `pacman`) or from source

**Why Python 3.8+?** Required for FastMCP framework compatibility.

**Quick check**: Run `python3 --version` or `python --version`

**๐Ÿ“– Detailed guide**: See [PYTHON_SETUP.md](PYTHON_SETUP.md) for step-by-step instructions

---

## ๐Ÿงน Complete Environment Reset

If you need to completely clean and reinstall:

```bash
python3 cleanup.py
python3 install.py
```

The cleanup script removes:
- Virtual environment
- Configuration files from both IDEs
- Generated configuration files
- Environment files
- Cache files

---

## ๐ŸŒ API Endpoints

- **Test Environment**: `https://api.tst.eu.cloudretail.tech`
- **Production Environment**: `https://api.retailtech.yango.com`

---

## ๐Ÿ› ๏ธ For Developers

<details>
<summary>Technical Information</summary>

### Project Architecture

```
yangotech_mcp/
โ”œโ”€โ”€ install.py               # ๐ŸŽฏ Universal installer  
โ”œโ”€โ”€ cleanup.py               # ๐Ÿงน Complete cleanup script
โ”œโ”€โ”€ server.py                # FastMCP server
โ”œโ”€โ”€ client.py                # HTTP client for Yango Tech API
โ”œโ”€โ”€ models.py                # Pydantic data models
โ”œโ”€โ”€ claude_desktop_config.json  # Generated Claude config
โ”œโ”€โ”€ cursor_settings.json        # Generated Cursor config
โ””โ”€โ”€ README.md                # This documentation
```

### Development Installation

```bash
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate  # macOS/Linux
# or
.venv\Scripts\activate     # Windows

# Install dependencies (now includes FastMCP 2.5+)
pip install -e .

# Test API
export YANGO_TECH_API_KEY="your_api_key"
python test_api_connection.py

# Run MCP server
python server.py
```

### Technology Stack

- **[FastMCP 2.5+](https://github.com/jlowin/fastmcp)**: Modern MCP server framework
- **[Python 3.8+](https://www.python.org/)**: Core language
- **[HTTPx](https://www.python-httpx.org/)**: Async HTTP client
- **[Pydantic](https://docs.pydantic.dev/latest/)**: Data validation
- **[python-dotenv](https://github.com/theskumar/python-dotenv)**: Environment management

### API Endpoints

Server works with real Yango Tech API:
- **Test URL**: `https://api.tst.eu.cloudretail.tech/b2b/v1`
- **Production URL**: `https://api.retailtech.yango.com/b2b/v1`
- **Authorization**: OAuth token in header
- **Methods**: POST for most requests
- **Pagination**: Cursor-based for large data

### IDE Support

- **[Claude Desktop](https://www.anthropic.com/claude)**: Uses `mcpServers` configuration
- **[Cursor IDE](https://www.cursor.com/)**: Uses `mcp.servers` configuration
- **Auto-detection**: Installer detects which IDEs are installed
- **Universal**: Works without IDEs - configs always generated

</details>

---

## ๐Ÿ“ž Support

If something doesn't work:

1. **Check Python**: `python3 --version` (should be 3.8+)
2. **Complete reset**: `python3 cleanup.py && python3 install.py`
3. **Manual setup**: Use generated config files (`claude_desktop_config.json`, `cursor_settings.json`)
4. **Manual setup guide**: [MANUAL_SETUP.md](MANUAL_SETUP.md) for detailed instructions
5. **Check IDE logs** ([Claude Desktop](https://www.anthropic.com/claude) or [Cursor IDE](https://www.cursor.com/))
6. **Make sure** IDEs are restarted after installation

---

**๐ŸŽฏ Goal: One command - and everything works in both [Claude Desktop](https://www.anthropic.com/claude) and [Cursor IDE](https://www.cursor.com/) (or generates configs for manual setup)!**