Skip to main content
iran-bus-mcp: unofficial Iran intercity bus ticket (بلیط اتوبوس) MCP server that searches Safar724 trips, Toman prices and free seats for Claude, Cursor and Copilot

iran-bus-mcp: Iran bus tickets (بلیط اتوبوس) MCP server for AI agents, Safar724

iran-bus-mcp is an unofficial, read-only MCP server that lets an AI agent search intercity bus trips, prices in Toman and free seats on Safar724 (سفر ۷۲۴, safar724.com), the Iranian bus ticket marketplace.
Its 5 tools look up cities, list the trips between two cities on a day, find the cheapest ticket, list terminals and companies on a route, and show the free seats and refund rules of one trip.
No API key or account is needed; it works in Claude, Cursor, Copilot and any other MCP client.

PyPI Python CI License: PolyForm Noncommercial

For AI agents · Quick start · Tools · Limits · فارسی


For AI agents

  • What: unofficial MCP server (model context protocol) for Iranian intercity bus tickets. Only Safar724 is covered today; every tool has a provider argument (all by default) so more ticket sites can join.
  • Install: uvx iran-bus-mcp or claude mcp add iran-bus -- uvx iran-bus-mcp. Transport: stdio. Needs uv (Python 3.10+).
  • Auth: none. Optional IRAN_BUS_MCP_PROXY (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.
  • Access: read-only. It cannot hold a seat, book or pay, and there is no login.
  • Tools: 5, all prefixed bus_.
  • Use when: the user asks which buses run between two Iranian cities on a day, what a ticket costs, which is the cheapest, which terminal it leaves from, or whether seats are left.
  • Output: compact JSON. Prices are Toman per seat. Cities are Persian or English names; dates are Jalali (1405/08/28), Gregorian (2026-11-19), today or tomorrow (Tehran time). Company and bus-type text is Persian.

Quick start

You need uv. No API key or account.

Claude Code:

claude mcp add iran-bus -- uvx iran-bus-mcp

Claude Desktop, Cursor, VS Code and other clients:

{
  "mcpServers": {
    "iran-bus": { "command": "uvx", "args": ["iran-bus-mcp"] }
  }
}

Example prompts:

  • "What is the cheapest bus from Tehran to Isfahan tomorrow?"
  • "List bus trips from Tehran to Mashhad on 1405/08/30 and show free seats."
  • "Which terminals do Tehran to Shiraz buses leave from?"
  • ارزان‌ترین بلیط اتوبوس تهران به اصفهان برای فردا کدام است؟
  • اتوبوس‌های تهران به تبریز در روز ۳۰ آبان را با قیمت و صندلی خالی نشان بده.

A real answer (bus_cheapest, Tehran to Isfahan, 17 Nov 2026 for 1405/08/27): the cheapest trip was 544,500 Toman at 22:30 with Royal Safar Iranian (رویال سفر ایرانیان), 29 seats free, from the Beyhaghi (Argentina) terminal; next were two 551,000 Toman trips at 12:30 and 13:45 from the southern terminal (Khazaneh). Prices and seats change as tickets sell.

Tools

Tool What it does
bus_cities Look up cities (name, code, province) that tickets can be bought for; use it to spell a city exactly.
bus_search List bus trips between two cities on one day: time, company, bus type, price in Toman, free seats, terminals.
bus_cheapest Cheapest bus trips between two cities on one day, merged across providers and sorted by price in Toman.
bus_terminals List the departure and arrival terminals that have trips on a route and the companies running them.
bus_trip Seat map summary and refund penalties of one trip: free seat numbers, seats taken by men or women.

Limits

  • Only Safar724 works. payaneh.ir (پایانه) is not supported.
  • Trips come only for days Safar724 sells; a past date is refused. Trips that continue past the destination are listed with their via city.
  • The site's VIP flag is unreliable, so VIP is read from the bus-type text.
  • Prices and free seats are a snapshot. Booking and payment happen on safar724.com.
  • Works from Iranian and foreign networks (tested from both). Set IRAN_BUS_MCP_PROXY if your network blocks it; the server ignores system proxy variables on purpose.

فارسی

iran-bus-mcp یک سرور MCP غیررسمی و فقط‌خواندنی است که به ایجنت هوش مصنوعی اجازه می‌دهد سفرهای اتوبوس بین‌شهری، قیمت به تومان و صندلی‌های خالی را در سفر ۷۲۴ (safar724.com) جست‌وجو کند. ارزان‌ترین بلیط، پایانه‌ها و شرکت‌های یک مسیر و نقشهٔ صندلی هر سفر را می‌دهد. رزرو و پرداخت ندارد. سایت پایانه (payaneh.ir) فعلاً پشتیبانی نمی‌شود. نصب در Claude Code:

claude mcp add iran-bus -- uvx iran-bus-mcp

Development

uv sync
uv run ruff check . && uv run ruff format --check .
uv run python -m pytest -q          # offline tests on recorded fixtures
uv run python -m pytest -m live -q  # live calls to Safar724

Releases: bump the version in pyproject.toml and server.json, run uv lock, then push a v* tag; GitHub Actions publishes to PyPI.

Disclaimer

Unofficial and not affiliated with or endorsed by Safar724. It is read-only and uses the public pages and API of that site, which can change without notice.

Author

Built and maintained by Sepehr Radmard (سپهر رادمرد). LinkedIn · GitHub · more servers in iran-mcp.

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

استفادهٔ شخصی و غیرتجاری رایگان است؛ برای استفادهٔ تجاری با سپهر رادمرد تماس بگیرید. Free for personal and non-commercial use; commercial use needs a license.

استفادهٔ شخصی و غیرتجاری رایگان است. استفاده در شرکت، محصول پولی یا پروژهٔ مشتری به مجوز تجاری نیاز دارد؛ از راه لینکدین یا گیت‌هاب با سپهر رادمرد تماس بگیرید. متن کامل: PolyForm Noncommercial 1.0.0. نسخه‌های پیش از 0.1.1 با مجوز MIT منتشر شده‌اند و همان مجوز را دارند.

Free for personal and non-commercial use under the PolyForm Noncommercial License 1.0.0. Using it in a company, a paid product or a client project needs a commercial license: contact Sepehr Radmard on LinkedIn or GitHub. Versions before 0.1.1 were released under MIT and stay under it.

Metadata

Release files for iran-bus-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iran-bus-mcp 0.1.2
File Size Uploaded Provenance Actions
iran_bus_mcp-0.1.2.tar.gz 473.9 kB With provenance Details for iran_bus_mcp-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for iran-bus-mcp 0.1.2
File Interpreter ABI Platform Actions
iran_bus_mcp-0.1.2-py3-none-any.whl Python 3 none any Details for iran_bus_mcp-0.1.2-py3-none-any.whl

Total release size: 493.1 kB

Release files / iran_bus_mcp-0.1.2.tar.gz

Download URL iran_bus_mcp-0.1.2.tar.gz
Size 473.9 kB
Tags Source
SHA-256 checksum
How to use checksums
94790c54f0aa740965b9f97f47b39542c835a0a2711195b4a04b36c26491d9e6
BLAKE2b-256 checksum
How to use checksums
a6007aabb2a447696f6782ba519453adc2be3a5fe2bc0ef3c9a24ac9495b5058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / iran_bus_mcp-0.1.2-py3-none-any.whl

Download URL iran_bus_mcp-0.1.2-py3-none-any.whl
Size 19.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba9b0d76ff0ea1eb74b31cc1f86558c5f61450d2bbe4e35d9631ab45c47cccf9
BLAKE2b-256 checksum
How to use checksums
5537d4eb13319a1ccdac125e7e97fb0d6f908497c85422ddaa84426e6bace4a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for iran-bus-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for iran_bus_mcp-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page