Skip to main content
Glama
README.md
<!-- mcp-name: io.github.sepehr071/alibaba-ir-mcp -->

<div align="center">

# alibaba-ir-mcp: Alibaba (علی‌بابا) Iran train, bus, flight, hotel, villa and tour search MCP server for AI agents

**alibaba-ir-mcp is an unofficial, read-only MCP server that gives AI agents the train, bus, flight, hotel, villa and tour listings of Alibaba (alibaba.ir), Iran's largest travel site.**<br>
Its 14 tools look up city codes, search trains, buses, domestic and international flights, hotels, holiday homes and tour packages with prices and availability,<br>
show bus seat maps and find the cheapest day to travel. No API key or Alibaba account is needed. It works in Claude, Cursor, Copilot and any other MCP client.

[![PyPI](https://img.shields.io/pypi/v/alibaba-ir-mcp?color=2563eb)](https://pypi.org/project/alibaba-ir-mcp/)
[![Python](https://img.shields.io/pypi/pyversions/alibaba-ir-mcp)](https://pypi.org/project/alibaba-ir-mcp/)
[![CI](https://github.com/sepehr071/alibaba-ir-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/sepehr071/alibaba-ir-mcp/actions/workflows/ci.yml)
[![License: PolyForm Noncommercial](https://img.shields.io/badge/license-PolyForm%20Noncommercial-c2410c)](https://github.com/sepehr071/alibaba-ir-mcp/blob/main/LICENSE)

[For AI agents](#for-ai-agents) · [Quick start](#quick-start) · [Tools](#tools) · [FAQ](#faq) · [فارسی](#فارسی)

</div>

---

## For AI agents

- **What:** unofficial MCP server (model context protocol) for alibaba.ir: train tickets (company, class, compartments, price, seats left, round trips), intercity buses (company, bus type, terminals, price, free seats), domestic and international flights (airline, times, fare classes, baggage, refund fees, round trips), hotels, villa and holiday-home rentals, tour packages and the cheapest day per route.
- **Install:** `uvx alibaba-ir-mcp` or `claude mcp add alibaba -- uvx alibaba-ir-mcp`. Transport: stdio. Needs [uv](https://docs.astral.sh/uv/getting-started/installation/) (Python 3.10+).
- **Auth:** none, no API key or account. Optional `ALIBABA_IR_MCP_PROXY` (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.
- **Access:** read-only. It cannot log in, book, hold seats or pay, so no confirmation is needed before calling any tool.
- **Tools:** 14, all prefixed `al_`. Typical sequences: `al_trains` / `al_buses` / `al_flights` / `al_flights_international` for one day; `al_*_cheapest` then the search for the chosen day; `al_stays` then `al_stay_detail`; `al_cities` when unsure of a city code.
- **Use when:** the user asks for train, bus or flight options, prices or seats, a hotel, a villa to rent or a tour package, or the cheapest day to travel.
- **Do not use when:** the user wants to buy or book (send them to alibaba.ir), or asks about visas and insurance (not covered).
- **Output:** compact JSON. Prices are Toman (Alibaba's API uses Rial; the tools divide by 10 as the site does): per adult for transport, for the whole stay for hotels, villas and tours. Dates are accepted as Gregorian `2026-11-11` or Jalali `1405-08-20`; times are Iran local time.
- **Machine-readable:** [`server.json`](https://github.com/sepehr071/alibaba-ir-mcp/blob/main/server.json).

## Quick start

```bash
claude mcp add alibaba -- uvx alibaba-ir-mcp
```

Other clients: `{"command": "uvx", "args": ["alibaba-ir-mcp"]}`.

## Tools

| Tool | What it does |
|---|---|
| `al_cities` | City and airport names to the codes the other tools take (THR, MHD, SYZ...); `international=true` searches airports worldwide. |
| `al_trains` | Trains on one day (or a round trip): company, class and compartment, departure and arrival, price, seats left, discount; filter by class, passengers, women-only or men-only compartments. |
| `al_trains_cheapest` | Lowest train price for each of the next days. |
| `al_buses` | Intercity buses on one day: company, bus type, departure, price, seats, terminals, stops; says when a route has no buses and the next date that has. |
| `al_buses_cheapest` | Lowest bus price and bus count for each of the next days. |
| `al_bus_seats` | Free seats of one bus: counts per status, seat numbers and rows. |
| `al_flights` | Domestic flights on one day (or round trip): airline, flight number, times, aircraft, fare class, price per adult, child and infant, seats, baggage, cancellation fees. |
| `al_flights_cheapest` | Lowest domestic fare for each of the next days. |
| `al_flights_international` | International flights (any city Alibaba sells): airline, segments, stops, duration, baggage, price, round trip. |
| `al_stays` | Villas, suites, cottages and other holiday homes in a city: price, rating, capacity, filters for type, price, rating. |
| `al_stay_detail` | One holiday home: beds, amenities, house rules, cancellation terms, nightly price calendar, reviews. |
| `al_hotels` | Hotels in a city (Iran and abroad): stars, rating, price for the stay, meal plan, perks. |
| `al_tours` | Tour packages (travel plus hotel) to Kish, Mashhad, Istanbul, Dubai and more: hotel, room, price per person. |
| `al_tours_cheapest` | Lowest tour price per person for 11 days around a date. |

Example: "cheapest way from Tehran to Mashhad next Thursday" -> `al_trains_cheapest`, `al_flights_cheapest`, then
`al_trains` / `al_flights` / `al_buses` for that day.

## FAQ

**Is this official?** No. It reads the same public JSON the alibaba.ir web app loads for anyone without an account.

**Why does a train search sometimes fail?** The rail suppliers go offline for maintenance for a while, usually just
after midnight Tehran time. The site shows the same message; try again in a few minutes.

**Why are there several rows for one flight?** Each fare class is its own row; the site hides the repeats by default.

**Where do the villas come from?** Alibaba resells Jabama's listings; `al_stays` shows the same places and prices as alibaba.ir/accommodation.

**Does it work outside Iran?** Yes on most networks, directly or through `ALIBABA_IR_MCP_PROXY`.

## فارسی

سرور MCP غیررسمی و فقط‌خواندنی برای علی‌بابا (alibaba.ir): جستجوی قطار، اتوبوس، پرواز داخلی و خارجی، هتل، ویلا و تور با قیمت و ظرفیت، نقشه صندلی اتوبوس و ارزان‌ترین روز سفر.
نصب: `uvx alibaba-ir-mcp`. قیمت‌ها به تومان و تاریخ‌ها به شمسی (۱۴۰۵-۰۸-۲۰) یا میلادی پذیرفته می‌شود. خرید بلیت از طریق این ابزار ممکن نیست. Sepehr Radmard (سپهر رادمرد): github.com/sepehr071

## مجوز استفاده (License)

<a href="https://www.linkedin.com/in/sepehr-radmard"><img src="https://raw.githubusercontent.com/sepehr071/iran-mcp/main/assets/license-banner.png" alt="استفادهٔ شخصی و غیرتجاری رایگان است؛ برای استفادهٔ تجاری با سپهر رادمرد تماس بگیرید. Free for personal and non-commercial use; commercial use needs a license." width="100%"></a>

**استفادهٔ شخصی و غیرتجاری رایگان است.** استفاده در شرکت، محصول پولی یا پروژهٔ مشتری به مجوز تجاری نیاز دارد؛ از راه [لینکدین](https://www.linkedin.com/in/sepehr-radmard) یا [گیت&zwnj;هاب](https://github.com/sepehr071) با سپهر رادمرد تماس بگیرید. متن کامل: [PolyForm Noncommercial 1.0.0](https://github.com/sepehr071/alibaba-ir-mcp/blob/main/LICENSE). نسخه&zwnj;های پیش از 0.2.1 با مجوز MIT منتشر شده&zwnj;اند و همان مجوز را دارند.

Free for personal and non-commercial use under the [PolyForm Noncommercial License 1.0.0](https://github.com/sepehr071/alibaba-ir-mcp/blob/main/LICENSE). Using it in a company, a paid product or a client project needs a commercial license: contact Sepehr Radmard on [LinkedIn](https://www.linkedin.com/in/sepehr-radmard) or [GitHub](https://github.com/sepehr071). Versions before 0.2.1 were released under MIT and stay under it.

TDQS

A3.8/5.0

Scored across 14 tools

Disambiguation4/5

Most tools target a distinct resource+action: trains, buses, flights, hotels, stays, tours, plus dedicated cheapest-calendar variants that descriptions explicitly frame as 'call this first' helpers. The remaining overlap (al_flights vs al_flights_international, al_stays vs al_hotels) is explained in the descriptions but still requires reading them carefully.

Naming Consistency4/5

All names share an 'al_' prefix and snake_case, with predictable suffixes (_cheapest, _detail, _seats, _international) for variant tools. The base search tools use bare nouns (al_buses, al_flights) while others use noun_suffix, a minor inconsistency in an otherwise coherent scheme.

Tool Count5/5

14 tools is well within a healthy range and each one earns its place: one search tool per vertical plus calendar-price and detail helpers. No obvious redundancy or padding.

Completeness3/5

Search, cheapest-day calendars, seat maps, detail and city-code lookup cover discovery well, but there is no booking/purchase flow, no passenger or checkout handling, and no hotel-detail tool comparable to al_stay_detail. Agents can research but hit a dead end when they need to actually reserve.

Maintenance

ActivityNo data
ResponsivenessOutdated data