Haravan MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Haravan MCPshow me this month's revenue summary and top products"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Haravan MCP
Haravan E-commerce OpenAPI MCP Server — Kết nối AI assistants với Haravan stores.
MCP (Model Context Protocol) server cho phép AI assistants (Claude, Cursor, Trae) tương tác trực tiếp với Haravan APIs: quản lý sản phẩm, đơn hàng, khách hàng, tồn kho, webhooks và nhiều hơn.
English below.
Bắt đầu nhanh
Sử dụng với Claude / Cursor / Trae
Thêm vào file cấu hình MCP:
{
"mcpServers": {
"haravan-mcp": {
"command": "npx",
"args": ["-y", "haravan-mcp", "mcp", "-t", "<your_access_token>"]
}
}
}Sử dụng với Docker (HTTP mode)
# Clone repo
git clone <repo-url> && cd HaravanMCP
# Cấu hình token
cp docker/.env.example docker/.env
# Sửa docker/.env → điền HARAVAN_ACCESS_TOKEN
# Chạy
docker compose -f docker/docker-compose.yml up -d
# MCP endpoint: http://localhost:4567/mcp
# Health check: http://localhost:4567/healthSử dụng với OAuth 2.0
# Bước 1: Login
npx haravan-mcp login -a <app_id> -s <app_secret>
# Bước 2: Cấu hình MCP
{
"mcpServers": {
"haravan-mcp": {
"command": "npx",
"args": ["-y", "haravan-mcp", "mcp", "-a", "<app_id>", "--oauth"]
}
}
}Kiến trúc 2 lớp
Claude Skill Layer (AI reasoning, insights, formatting)
│
│ MCP Protocol
▼
MCP Server Layer (pagination, rate limiting, aggregation)
│
│ HTTPS + Bearer Token
▼
Haravan REST API (apis.haravan.com)Smart Tools (7): Server-side pagination + aggregation cho data lớn Base Tools (63): 1:1 mapping với Haravan API cho detail/CRUD
Smart Tools
Tool | Chức năng |
| Tổng DT, AOV, status/source/cancel breakdown, so sánh kỳ trước |
| Top N sản phẩm theo doanh thu + variant breakdown |
| Median/p90 time-to-confirm/close, đơn stuck |
| RFM 8 segments + action suggestions |
| Phân loại: out_of_stock / low / dead / healthy |
| DSR + reorder point + suggested qty per variant |
| Cross-location imbalance + transfer suggestions |
Base Tools (63 tổng)
Category | Tools | Mô tả |
Customers | 14 | CRUD khách hàng + địa chỉ |
Orders | 13 | CRUD đơn hàng + transactions |
Products | 11 | CRUD sản phẩm + variants |
Inventory | 5 | Kiểm kho + locations |
Shop | 6 | Shop info, kho, nhân viên |
Content | 11 | Pages, blogs, articles, script tags |
Webhooks | 3 | Subscribe/unsubscribe |
Presets
# Smart tools only (dashboard/analytics)
haravan-mcp mcp -t <token> --tools "preset.smart"
# Default (smart + detail drill-down)
haravan-mcp mcp -t <token> --tools "preset.default"
# Full CRUD cho specific resources
haravan-mcp mcp -t <token> --tools "preset.products,preset.orders"
# Tất cả tools
haravan-mcp mcp -t <token> --tools "all"
# Mix presets + individual tools
haravan-mcp mcp -t <token> --tools "preset.smart,haravan_webhooks_list"Preset | Tools | Use case |
| 17 | AI assistant — smart + drill-down |
| 7 | Dashboard, analytics |
| 7 | Read-only minimal |
| 11 | Product management |
| 13 | Order management |
| 14 | Customer management |
| 7 | Inventory management |
| 11 | Content management |
| 3 | Webhook management |
CLI Commands
haravan-mcp mcp -t <token> # Start server (stdio)
haravan-mcp mcp -t <token> -m http -p 3000 # Start server (HTTP)
haravan-mcp mcp -t <token> --tools "preset.smart" # Custom tools
haravan-mcp login -a <app_id> -s <secret> # OAuth login
haravan-mcp whoami # Show stored tokens
haravan-mcp logout -a <app_id> # Remove token
haravan-mcp logout --all # Remove all tokens
haravan-mcp tools # List all tools
haravan-mcp tools --presets # Show presets
haravan-mcp tools --project products # Filter by categoryClaude Skill — Tri thức tối ưu
Ngoài MCP Server (70 tools), dự án bao gồm Claude Skill (claudeskill/haravan-mcp/) — bộ não phân tích được upload lên claude.ai, dạy Claude cách sử dụng MCP tools hiệu quả nhất.
Token Efficiency — Lý do tồn tại
Scenario | Không tối ưu | Có Skill + Smart Tools | Tiết kiệm |
"Doanh thu tháng này" | 17 API calls, ~250,000 tokens | 1 tool call, ~300 tokens | 99.9% |
"Top 10 sản phẩm" | 17+342 calls, ~800,000 tokens | 1 tool call, ~500 tokens | 99.9% |
"Phân tích RFM khách hàng" | 50+ calls, ~500,000 tokens | 1 tool call, ~800 tokens | 99.8% |
"Tổng quan cửa hàng" | 100+ calls, ~1,500,000 tokens | 3 calls song song, ~1,200 tokens | 99.9% |
Tri thức tích hợp trong Skill
20+ công thức vận hành e-commerce (từ references/insights-formulas.md):
Order Operations: ODR (Order Defect Rate), Revenue at Risk, Payment Collection Efficiency, Order Cycle Time Breakdown
Inventory Intelligence: ABC-FSN Analysis (phân loại SKU), DSR/DOS (tốc độ bán/ngày tồn kho), Shrinkage Detection, GMROI
Customer Analytics: RFM Scoring (quintile), Purchase Gap Analysis, Customer Concentration Risk, Acquisition vs Retention Economics
Product Intelligence: Catalog Health Score (12 tiêu chí, thang 0-100), Variant Performance Matrix, Product Lifecycle Detection, Price-Volume Curve
Benchmarks ngành e-commerce Việt Nam (từ references/mcp-tools.md):
Metric | Tốt | TB | Cần cải thiện |
Cancel Rate | <3% | 3-5% | >5% |
Repeat Purchase Rate | >30% | 20-30% | <20% |
COD Fail Rate | <15% | 15-25% | >25% |
Catalog Health Score | >80 | 60-80 | <60 |
Discount Penetration | 10-20% | 20-40% | >40% |
10 kịch bản phân tích có sẵn (Decision Tree trong SKILL.md):
Store Pulse — tổng quan cửa hàng (3 calls song song)
Revenue Breakdown — phân tích đa chiều: kênh, sản phẩm, địa lý (4 calls)
Order Pipeline — bottleneck, cycle time, cancel analysis (3 calls)
Stock Health — phân loại kho, đề xuất nhập, cân bằng đa chi nhánh (3 calls)
Customer RFM — 7 segments + marketing actions cho từng segment (2 calls)
Product Performance — best sellers, catalog health, discount ROI
Operations Scorecard — chấm điểm 10 chỉ số (1-10), top 3 mạnh/yếu (5-6 calls)
COD Monitor — fail rate theo tỉnh, risk scoring
Smart Search — tìm đơn/khách/sản phẩm bằng ngôn ngữ tự nhiên
Store Action — thao tác nhanh với xác nhận trước khi write
5 ví dụ output thực tế (từ references/examples.md) với data giả — Claude học cách format bảng, viết insight, xử lý lỗi.
Cách cài Skill
Claude.ai: Upload haravan-mcp-skill.zip tại claude.ai/skills
Claude Code: Copy thư mục claudeskill/haravan-mcp/ vào ~/.claude/skills/haravan-mcp/
Cấu trúc Skill
claudeskill/haravan-mcp/
├── SKILL.md (718 dòng)
│ ├── Phần 1: 5 quy tắc bắt buộc
│ ├── Phần 2: Decision tree — câu hỏi → tool nào
│ ├── Phần 3: 10 kịch bản phân tích chi tiết (output templates)
│ ├── Phần 4: Xử lý lỗi (401/403/429/500/network)
│ ├── Phần 5: Multi-turn drill-down
│ ├── Phần 6: Cách viết insight xuất sắc (SAI vs ĐÚNG)
│ └── Phần 7: Anti-patterns
└── references/
├── mcp-tools.md — Tool catalog + benchmarks ngành
├── insights-formulas.md — 20+ công thức: ODR, RFM, DSR, GMROI, ABC-FSN...
└── examples.md — 5 ví dụ output hoàn chỉnh với data thực tếDevelopment
npm install # Install dependencies
npm run build # Build TypeScript
npm run dev -- mcp -t <token> # Dev mode
npm test # Run tests
npm run format # Prettier formatTài liệu
Doc | Nội dung |
Tổng quan dự án, tầm nhìn, roadmap | |
Kiến trúc: transport, middleware, auth flow | |
Quy chuẩn code, cấu trúc thư mục, patterns | |
Tư duy thiết kế MCP + Claude Skill | |
Docker, Cloudflare Tunnel, troubleshooting | |
Tóm tắt codebase, dependencies, data flow |
Environment Variables
Variable | Mô tả |
| Private app token |
| OAuth App ID |
| OAuth App Secret |
Tác giả
Nguyễn Ngọc Tuấn Founder — Transform Group | Lark Platinum Partner Facebook
License
MIT
English
What is Haravan MCP?
An MCP (Model Context Protocol) server that connects AI assistants (Claude, Cursor, Trae) to Haravan e-commerce stores. Manage products, orders, customers, inventory, and more through natural language.
Architecture
Two-layer design:
MCP Server (7 smart tools): Server-side pagination, rate limiting, aggregation for large datasets
Claude Skill (SKILL.md): AI reasoning, insights, formatting — handles simple analysis from smart tool outputs
Quick Start
{
"mcpServers": {
"haravan-mcp": {
"command": "npx",
"args": ["-y", "haravan-mcp", "mcp", "-t", "<your_token>"]
}
}
}Docker
docker compose -f docker/docker-compose.yml up -d
# MCP endpoint: http://localhost:4567/mcpDocumentation
All docs are in Vietnamese (default) with English summaries at the bottom of each file. See docs/ directory.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pluginmd/Haravan-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server