snapptrip-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- snapptrip_mcp-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +43 -0
- snapptrip_mcp-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- snapptrip_mcp-0.1.0/.github/banner.png +0 -0
- snapptrip_mcp-0.1.0/.github/dependabot.yml +10 -0
- snapptrip_mcp-0.1.0/.github/workflows/ci.yml +22 -0
- snapptrip_mcp-0.1.0/.github/workflows/publish.yml +51 -0
- snapptrip_mcp-0.1.0/.gitignore +6 -0
- snapptrip_mcp-0.1.0/LICENSE +21 -0
- snapptrip_mcp-0.1.0/PKG-INFO +152 -0
- snapptrip_mcp-0.1.0/README.md +124 -0
- snapptrip_mcp-0.1.0/pyproject.toml +59 -0
- snapptrip_mcp-0.1.0/server.json +32 -0
- snapptrip_mcp-0.1.0/src/snapptrip_mcp/__init__.py +5 -0
- snapptrip_mcp-0.1.0/src/snapptrip_mcp/flights.py +166 -0
- snapptrip_mcp-0.1.0/src/snapptrip_mcp/hotels.py +379 -0
- snapptrip_mcp-0.1.0/src/snapptrip_mcp/http.py +243 -0
- snapptrip_mcp-0.1.0/src/snapptrip_mcp/registry.py +16 -0
- snapptrip_mcp-0.1.0/src/snapptrip_mcp/server.py +93 -0
- snapptrip_mcp-0.1.0/tests/conftest.py +78 -0
- snapptrip_mcp-0.1.0/tests/fixtures/airports.json +94 -0
- snapptrip_mcp-0.1.0/tests/fixtures/calendar.json +191 -0
- snapptrip_mcp-0.1.0/tests/fixtures/filters.json +151 -0
- snapptrip_mcp-0.1.0/tests/fixtures/flights.json +609 -0
- snapptrip_mcp-0.1.0/tests/fixtures/info.json +230 -0
- snapptrip_mcp-0.1.0/tests/fixtures/places.json +84 -0
- snapptrip_mcp-0.1.0/tests/fixtures/pricetable.json +72 -0
- snapptrip_mcp-0.1.0/tests/fixtures/ratings.json +14 -0
- snapptrip_mcp-0.1.0/tests/fixtures/reviews.json +67 -0
- snapptrip_mcp-0.1.0/tests/fixtures/rooms.json +374 -0
- snapptrip_mcp-0.1.0/tests/fixtures/search.json +303 -0
- snapptrip_mcp-0.1.0/tests/test_live_snapptrip.py +51 -0
- snapptrip_mcp-0.1.0/tests/test_snapptrip.py +169 -0
- snapptrip_mcp-0.1.0/uv.lock +1361 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: A tool failed or returned wrong data
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: input
|
|
6
|
+
id: tool
|
|
7
|
+
attributes:
|
|
8
|
+
label: Tool
|
|
9
|
+
description: Which tool, e.g. ins_quote_travel
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: input
|
|
14
|
+
attributes:
|
|
15
|
+
label: Arguments and result
|
|
16
|
+
description: The arguments the agent sent and the error or wrong output. Remove anything personal.
|
|
17
|
+
render: json
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: expected
|
|
22
|
+
attributes:
|
|
23
|
+
label: What you expected
|
|
24
|
+
description: e.g. what irantalent.com, jobinja.ir or jobvision.ir shows for the same input
|
|
25
|
+
- type: input
|
|
26
|
+
id: client
|
|
27
|
+
attributes:
|
|
28
|
+
label: MCP client and OS
|
|
29
|
+
placeholder: Claude Desktop 1.x on Windows 11
|
|
30
|
+
- type: dropdown
|
|
31
|
+
id: network
|
|
32
|
+
attributes:
|
|
33
|
+
label: Network
|
|
34
|
+
options:
|
|
35
|
+
- Direct connection from Iran
|
|
36
|
+
- Direct connection outside Iran
|
|
37
|
+
- VPN or proxy
|
|
38
|
+
- IRAN_JOBS_MCP_PROXY set
|
|
39
|
+
- type: input
|
|
40
|
+
id: version
|
|
41
|
+
attributes:
|
|
42
|
+
label: snapptrip-mcp version
|
|
43
|
+
placeholder: "0.1.0"
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python: ["3.10", "3.11", "3.12", "3.13"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
- uses: astral-sh/setup-uv@v10.2.0
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python }}
|
|
19
|
+
- run: uv sync --locked
|
|
20
|
+
- run: uv run ruff check .
|
|
21
|
+
- run: uv run ruff format --check .
|
|
22
|
+
- run: uv run pytest -q
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
# Tag a release (git tag v0.1.0 && git push --tags) after bumping the version in
|
|
4
|
+
# pyproject.toml and server.json.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags: ["v*"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
pypi:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: pypi
|
|
13
|
+
permissions:
|
|
14
|
+
id-token: write # PyPI trusted publishing
|
|
15
|
+
contents: write # GitHub Release
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- uses: astral-sh/setup-uv@v10.2.0
|
|
19
|
+
- name: Check versions match the tag
|
|
20
|
+
run: |
|
|
21
|
+
TAG=${GITHUB_REF_NAME#v}
|
|
22
|
+
grep -q "^version = \"$TAG\"" pyproject.toml
|
|
23
|
+
test "$(jq -r .version server.json)" = "$TAG"
|
|
24
|
+
test "$(jq -r '.packages[0].version' server.json)" = "$TAG"
|
|
25
|
+
- run: uv sync --locked && uv run pytest -q
|
|
26
|
+
- run: uv build
|
|
27
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
28
|
+
- run: gh release create "$GITHUB_REF_NAME" dist/* --generate-notes --title "$GITHUB_REF_NAME"
|
|
29
|
+
env:
|
|
30
|
+
GH_TOKEN: ${{ github.token }}
|
|
31
|
+
|
|
32
|
+
mcp-registry:
|
|
33
|
+
needs: pypi
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
permissions:
|
|
36
|
+
id-token: write # MCP Registry login via GitHub OIDC
|
|
37
|
+
contents: read
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v7
|
|
40
|
+
- name: Wait for PyPI to serve the new version
|
|
41
|
+
run: |
|
|
42
|
+
for i in $(seq 1 30); do
|
|
43
|
+
curl -sf "https://pypi.org/pypi/snapptrip-mcp/${GITHUB_REF_NAME#v}/json" >/dev/null && exit 0
|
|
44
|
+
sleep 10
|
|
45
|
+
done
|
|
46
|
+
exit 1
|
|
47
|
+
- name: Install mcp-publisher
|
|
48
|
+
run: |
|
|
49
|
+
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.8.1/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
|
|
50
|
+
- run: ./mcp-publisher login github-oidc
|
|
51
|
+
- run: ./mcp-publisher publish
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sepehr Radmard
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: snapptrip-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unofficial read-only MCP server for SnappTrip (snapptrip.com): Iranian hotel search, room prices, reviews and domestic flights.
|
|
5
|
+
Project-URL: Homepage, https://github.com/sepehr071/snapptrip-mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/sepehr071/snapptrip-mcp
|
|
7
|
+
Project-URL: Issues, https://github.com/sepehr071/snapptrip-mcp/issues
|
|
8
|
+
Project-URL: Website, https://mcpfarsi.ir/
|
|
9
|
+
Author-email: Sepehr Radmard <sepehrr80@gmail.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai-agents,claude,domestic-flights,farsi,flights,hotel-prices,hotel-search,iran,iran-hotels,mcp,mcp-server,model-context-protocol,persian,snapp-trip,snapptrip,snapptrip-hotel,travel
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: curl-cffi>=0.16.3
|
|
24
|
+
Requires-Dist: httpx-curl-cffi>=0.1.5
|
|
25
|
+
Requires-Dist: httpx>=0.27
|
|
26
|
+
Requires-Dist: mcp<3,>=2.2
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
<!-- mcp-name: io.github.sepehr071/snapptrip-mcp -->
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
|
|
33
|
+
<img src="https://raw.githubusercontent.com/sepehr071/snapptrip-mcp/main/.github/banner.png" alt="snapptrip-mcp: unofficial SnappTrip (اسنپتریپ) hotel MCP server that searches Iranian hotels, room prices, guest reviews and domestic flights for Claude, Cursor and Copilot" width="100%">
|
|
34
|
+
|
|
35
|
+
# snapptrip-mcp: SnappTrip (اسنپتریپ) hotels and flights MCP server for AI agents
|
|
36
|
+
|
|
37
|
+
**snapptrip-mcp is an unofficial, read-only MCP server that lets an AI agent search hotels, room prices, guest reviews and domestic flights on SnappTrip (اسنپتریپ, snapptrip.com), the Snapp group's travel site.**<br>
|
|
38
|
+
Its 10 tools search Iranian hotels by city, dates, stars, price and facilities, read hotel details, rooms, nightly price calendars and guest reviews, and search domestic flights with a cheapest-days calendar.<br>
|
|
39
|
+
No API key or account is needed; it works in Claude, Cursor, Copilot and any other MCP client. It cannot book, reserve or pay.
|
|
40
|
+
|
|
41
|
+
[](https://pypi.org/project/snapptrip-mcp/)
|
|
42
|
+
[](https://pypi.org/project/snapptrip-mcp/)
|
|
43
|
+
[](https://github.com/sepehr071/snapptrip-mcp/actions/workflows/ci.yml)
|
|
44
|
+
[](https://github.com/sepehr071/snapptrip-mcp/blob/main/LICENSE)
|
|
45
|
+
|
|
46
|
+
[For AI agents](#for-ai-agents) · [Quick start](#quick-start) · [Tools](#tools) · [Limits](#limits) · [فارسی](#فارسی)
|
|
47
|
+
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## For AI agents
|
|
53
|
+
|
|
54
|
+
- **What:** unofficial MCP server (model context protocol) for snapptrip.com: Iranian hotel search, rooms, nightly prices, reviews and domestic one-way flights.
|
|
55
|
+
- **Install:** `uvx snapptrip-mcp` or `claude mcp add snapptrip -- uvx snapptrip-mcp`. Transport: stdio. Needs [uv](https://docs.astral.sh/uv/getting-started/installation/) (Python 3.10+).
|
|
56
|
+
- **Auth:** none. Optional `SNAPPTRIP_MCP_PROXY` (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.
|
|
57
|
+
- **Access:** read-only, no confirmation needed. It cannot log in, book or pay.
|
|
58
|
+
- **Tools:** 10, all prefixed `st_`. Typical sequences: `st_hotel_places` -> `st_hotel_search` -> `st_hotel_detail` / `st_hotel_reviews` / `st_hotel_rooms` -> `st_hotel_calendar`; `st_hotel_filters` for facility ids; `st_flight_airports` -> `st_flight_prices` -> `st_flight_search`.
|
|
59
|
+
- **Use when:** the user wants hotels in an Iranian city for dates, what a room costs, what guests say about a hotel, or the cheapest day to fly between two Iranian cities.
|
|
60
|
+
- **Output:** compact JSON, Gregorian dates (YYYY-MM-DD), Toman. Hotel search and room prices are for the whole stay, the calendar per night, flights for the whole party.
|
|
61
|
+
|
|
62
|
+
## Quick start
|
|
63
|
+
|
|
64
|
+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/). No API key or account.
|
|
65
|
+
|
|
66
|
+
Claude Code:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
claude mcp add snapptrip -- uvx snapptrip-mcp
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Claude Desktop, Cursor, VS Code and other clients:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"mcpServers": {
|
|
77
|
+
"snapptrip": { "command": "uvx", "args": ["snapptrip-mcp"] }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Example prompts:
|
|
83
|
+
|
|
84
|
+
- "Find 4 and 5 star hotels in Shiraz for 25 to 27 November under 10 million Toman."
|
|
85
|
+
- "What is the cheapest day to fly from Tehran to Mashhad this month?"
|
|
86
|
+
- "What do guests say about Park Saadi hotel in Shiraz?"
|
|
87
|
+
- <span dir="rtl">هتلهای شیراز برای ۴ تا ۶ آذر را با قیمت کل اقامت نشان بده.</span>
|
|
88
|
+
- <span dir="rtl">ارزانترین روز پرواز تهران به مشهد کدام است؟</span>
|
|
89
|
+
|
|
90
|
+
Real result (17 Nov 2026), `st_hotel_search(city="شیراز", check_in="2026-11-25", check_out="2026-11-27")` found 113 hotels; the first three: Bozorg 5 stars, rating 4.3 (395 reviews), 16,244,800 Toman for 2 nights; Zandiyeh 5 stars, 4.5 (335), 15,229,500; Arg 3 stars, 4.3 (970), 8,086,000.
|
|
91
|
+
|
|
92
|
+
## Tools
|
|
93
|
+
|
|
94
|
+
| Tool | What it does |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `st_hotel_places` | Find a SnappTrip hotel city or a hotel by name. |
|
|
97
|
+
| `st_hotel_search` | Search hotels in a city for dates with star, price and facility filters. |
|
|
98
|
+
| `st_hotel_filters` | List the filters a city offers for dates: facilities (ids), categories, accommodation types, price range, stars. |
|
|
99
|
+
| `st_hotel_detail` | Get a hotel's description, location, facilities, policies, photos and guest rating breakdown. |
|
|
100
|
+
| `st_hotel_rooms` | List the rooms of a hotel with prices for the dates. |
|
|
101
|
+
| `st_hotel_calendar` | Show a room's per-night price and rooms left for each day, with the cheapest bookable nights. |
|
|
102
|
+
| `st_hotel_reviews` | Read guest reviews of a hotel, newest first, with pros, cons and the room stayed in. |
|
|
103
|
+
| `st_flight_airports` | List the cities SnappTrip offers flights from, with IATA codes and airports. |
|
|
104
|
+
| `st_flight_search` | Search one-way domestic economy flights for a date, cheapest first. |
|
|
105
|
+
| `st_flight_prices` | Show the lowest one-way price per day for the next weeks and the cheapest days. |
|
|
106
|
+
|
|
107
|
+
## Limits
|
|
108
|
+
|
|
109
|
+
- Hotel search and room prices are whole-stay Toman; the calendar is per night; flight prices are converted from Rial to Toman.
|
|
110
|
+
- The flight price calendar accepts only today's date as its start. Flights are one-way, economy, domestic.
|
|
111
|
+
- Not covered: trains, buses, villas, international hotels and flights, booking, login.
|
|
112
|
+
- The 10 tools were mapped from SnappTrip's JavaScript bundles; the hotel tools were checked against the real pages in Chrome (2026-11-16). The flight tools were checked by the owner earlier, not re-checked in Chrome. Request headers were not compared with a browser capture.
|
|
113
|
+
- Prices and availability change by the minute; answers are cached for 60 seconds.
|
|
114
|
+
|
|
115
|
+
## How it works
|
|
116
|
+
|
|
117
|
+
SnappTrip has no public API. The site's own hotel and flight endpoints were mapped from its web app and then verified in Chrome against the rendered pages (hotel cards, prices, rooms, review counts). The server calls those endpoints with a Chrome-impersonating client, read-only, with low concurrency and a short cache.
|
|
118
|
+
|
|
119
|
+
## فارسی
|
|
120
|
+
|
|
121
|
+
<div dir="rtl">
|
|
122
|
+
|
|
123
|
+
snapptrip-mcp یک سرور MCP غیررسمی و فقطخواندنی است که به عامل هوش مصنوعی اجازه میدهد در اسنپتریپ هتلهای ایران، اتاقها، قیمت هر شب، نظر مهمانها و پروازهای داخلی را جستوجو کند. کلید API یا حساب کاربری لازم نیست و رزرو یا پرداخت انجام نمیدهد. نصب در Claude Code:
|
|
124
|
+
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
claude mcp add snapptrip -- uvx snapptrip-mcp
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Development
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
uv sync
|
|
135
|
+
uv run ruff check . && uv run ruff format --check .
|
|
136
|
+
uv run pytest -q # offline tests on recorded fixtures
|
|
137
|
+
uv run pytest -m live -q # live calls to SnappTrip
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Releases: bump the version in `pyproject.toml` and `server.json`, run `uv lock`, then push a `v*` tag; GitHub Actions publishes to PyPI.
|
|
141
|
+
|
|
142
|
+
## Disclaimer
|
|
143
|
+
|
|
144
|
+
Unofficial and not affiliated with or endorsed by SnappTrip or the Snapp group. It is read-only and uses the public endpoints of the site, which can change without notice.
|
|
145
|
+
|
|
146
|
+
## Author
|
|
147
|
+
|
|
148
|
+
Built and maintained by **Sepehr Radmard** (سپهر رادمرد). [LinkedIn](https://www.linkedin.com/in/sepehr-radmard) · [GitHub](https://github.com/sepehr071) · more servers in [iran-mcp](https://github.com/sepehr071/iran-mcp).
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
[MIT](https://github.com/sepehr071/snapptrip-mcp/blob/main/LICENSE)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.sepehr071/snapptrip-mcp -->
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
<img src="https://raw.githubusercontent.com/sepehr071/snapptrip-mcp/main/.github/banner.png" alt="snapptrip-mcp: unofficial SnappTrip (اسنپتریپ) hotel MCP server that searches Iranian hotels, room prices, guest reviews and domestic flights for Claude, Cursor and Copilot" width="100%">
|
|
6
|
+
|
|
7
|
+
# snapptrip-mcp: SnappTrip (اسنپتریپ) hotels and flights MCP server for AI agents
|
|
8
|
+
|
|
9
|
+
**snapptrip-mcp is an unofficial, read-only MCP server that lets an AI agent search hotels, room prices, guest reviews and domestic flights on SnappTrip (اسنپتریپ, snapptrip.com), the Snapp group's travel site.**<br>
|
|
10
|
+
Its 10 tools search Iranian hotels by city, dates, stars, price and facilities, read hotel details, rooms, nightly price calendars and guest reviews, and search domestic flights with a cheapest-days calendar.<br>
|
|
11
|
+
No API key or account is needed; it works in Claude, Cursor, Copilot and any other MCP client. It cannot book, reserve or pay.
|
|
12
|
+
|
|
13
|
+
[](https://pypi.org/project/snapptrip-mcp/)
|
|
14
|
+
[](https://pypi.org/project/snapptrip-mcp/)
|
|
15
|
+
[](https://github.com/sepehr071/snapptrip-mcp/actions/workflows/ci.yml)
|
|
16
|
+
[](https://github.com/sepehr071/snapptrip-mcp/blob/main/LICENSE)
|
|
17
|
+
|
|
18
|
+
[For AI agents](#for-ai-agents) · [Quick start](#quick-start) · [Tools](#tools) · [Limits](#limits) · [فارسی](#فارسی)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## For AI agents
|
|
25
|
+
|
|
26
|
+
- **What:** unofficial MCP server (model context protocol) for snapptrip.com: Iranian hotel search, rooms, nightly prices, reviews and domestic one-way flights.
|
|
27
|
+
- **Install:** `uvx snapptrip-mcp` or `claude mcp add snapptrip -- uvx snapptrip-mcp`. Transport: stdio. Needs [uv](https://docs.astral.sh/uv/getting-started/installation/) (Python 3.10+).
|
|
28
|
+
- **Auth:** none. Optional `SNAPPTRIP_MCP_PROXY` (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.
|
|
29
|
+
- **Access:** read-only, no confirmation needed. It cannot log in, book or pay.
|
|
30
|
+
- **Tools:** 10, all prefixed `st_`. Typical sequences: `st_hotel_places` -> `st_hotel_search` -> `st_hotel_detail` / `st_hotel_reviews` / `st_hotel_rooms` -> `st_hotel_calendar`; `st_hotel_filters` for facility ids; `st_flight_airports` -> `st_flight_prices` -> `st_flight_search`.
|
|
31
|
+
- **Use when:** the user wants hotels in an Iranian city for dates, what a room costs, what guests say about a hotel, or the cheapest day to fly between two Iranian cities.
|
|
32
|
+
- **Output:** compact JSON, Gregorian dates (YYYY-MM-DD), Toman. Hotel search and room prices are for the whole stay, the calendar per night, flights for the whole party.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/). No API key or account.
|
|
37
|
+
|
|
38
|
+
Claude Code:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude mcp add snapptrip -- uvx snapptrip-mcp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Claude Desktop, Cursor, VS Code and other clients:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"snapptrip": { "command": "uvx", "args": ["snapptrip-mcp"] }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Example prompts:
|
|
55
|
+
|
|
56
|
+
- "Find 4 and 5 star hotels in Shiraz for 25 to 27 November under 10 million Toman."
|
|
57
|
+
- "What is the cheapest day to fly from Tehran to Mashhad this month?"
|
|
58
|
+
- "What do guests say about Park Saadi hotel in Shiraz?"
|
|
59
|
+
- <span dir="rtl">هتلهای شیراز برای ۴ تا ۶ آذر را با قیمت کل اقامت نشان بده.</span>
|
|
60
|
+
- <span dir="rtl">ارزانترین روز پرواز تهران به مشهد کدام است؟</span>
|
|
61
|
+
|
|
62
|
+
Real result (17 Nov 2026), `st_hotel_search(city="شیراز", check_in="2026-11-25", check_out="2026-11-27")` found 113 hotels; the first three: Bozorg 5 stars, rating 4.3 (395 reviews), 16,244,800 Toman for 2 nights; Zandiyeh 5 stars, 4.5 (335), 15,229,500; Arg 3 stars, 4.3 (970), 8,086,000.
|
|
63
|
+
|
|
64
|
+
## Tools
|
|
65
|
+
|
|
66
|
+
| Tool | What it does |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `st_hotel_places` | Find a SnappTrip hotel city or a hotel by name. |
|
|
69
|
+
| `st_hotel_search` | Search hotels in a city for dates with star, price and facility filters. |
|
|
70
|
+
| `st_hotel_filters` | List the filters a city offers for dates: facilities (ids), categories, accommodation types, price range, stars. |
|
|
71
|
+
| `st_hotel_detail` | Get a hotel's description, location, facilities, policies, photos and guest rating breakdown. |
|
|
72
|
+
| `st_hotel_rooms` | List the rooms of a hotel with prices for the dates. |
|
|
73
|
+
| `st_hotel_calendar` | Show a room's per-night price and rooms left for each day, with the cheapest bookable nights. |
|
|
74
|
+
| `st_hotel_reviews` | Read guest reviews of a hotel, newest first, with pros, cons and the room stayed in. |
|
|
75
|
+
| `st_flight_airports` | List the cities SnappTrip offers flights from, with IATA codes and airports. |
|
|
76
|
+
| `st_flight_search` | Search one-way domestic economy flights for a date, cheapest first. |
|
|
77
|
+
| `st_flight_prices` | Show the lowest one-way price per day for the next weeks and the cheapest days. |
|
|
78
|
+
|
|
79
|
+
## Limits
|
|
80
|
+
|
|
81
|
+
- Hotel search and room prices are whole-stay Toman; the calendar is per night; flight prices are converted from Rial to Toman.
|
|
82
|
+
- The flight price calendar accepts only today's date as its start. Flights are one-way, economy, domestic.
|
|
83
|
+
- Not covered: trains, buses, villas, international hotels and flights, booking, login.
|
|
84
|
+
- The 10 tools were mapped from SnappTrip's JavaScript bundles; the hotel tools were checked against the real pages in Chrome (2026-11-16). The flight tools were checked by the owner earlier, not re-checked in Chrome. Request headers were not compared with a browser capture.
|
|
85
|
+
- Prices and availability change by the minute; answers are cached for 60 seconds.
|
|
86
|
+
|
|
87
|
+
## How it works
|
|
88
|
+
|
|
89
|
+
SnappTrip has no public API. The site's own hotel and flight endpoints were mapped from its web app and then verified in Chrome against the rendered pages (hotel cards, prices, rooms, review counts). The server calls those endpoints with a Chrome-impersonating client, read-only, with low concurrency and a short cache.
|
|
90
|
+
|
|
91
|
+
## فارسی
|
|
92
|
+
|
|
93
|
+
<div dir="rtl">
|
|
94
|
+
|
|
95
|
+
snapptrip-mcp یک سرور MCP غیررسمی و فقطخواندنی است که به عامل هوش مصنوعی اجازه میدهد در اسنپتریپ هتلهای ایران، اتاقها، قیمت هر شب، نظر مهمانها و پروازهای داخلی را جستوجو کند. کلید API یا حساب کاربری لازم نیست و رزرو یا پرداخت انجام نمیدهد. نصب در Claude Code:
|
|
96
|
+
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
claude mcp add snapptrip -- uvx snapptrip-mcp
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uv sync
|
|
107
|
+
uv run ruff check . && uv run ruff format --check .
|
|
108
|
+
uv run pytest -q # offline tests on recorded fixtures
|
|
109
|
+
uv run pytest -m live -q # live calls to SnappTrip
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Releases: bump the version in `pyproject.toml` and `server.json`, run `uv lock`, then push a `v*` tag; GitHub Actions publishes to PyPI.
|
|
113
|
+
|
|
114
|
+
## Disclaimer
|
|
115
|
+
|
|
116
|
+
Unofficial and not affiliated with or endorsed by SnappTrip or the Snapp group. It is read-only and uses the public endpoints of the site, which can change without notice.
|
|
117
|
+
|
|
118
|
+
## Author
|
|
119
|
+
|
|
120
|
+
Built and maintained by **Sepehr Radmard** (سپهر رادمرد). [LinkedIn](https://www.linkedin.com/in/sepehr-radmard) · [GitHub](https://github.com/sepehr071) · more servers in [iran-mcp](https://github.com/sepehr071/iran-mcp).
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
[MIT](https://github.com/sepehr071/snapptrip-mcp/blob/main/LICENSE)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "snapptrip-mcp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Unofficial read-only MCP server for SnappTrip (snapptrip.com): Iranian hotel search, room prices, reviews and domestic flights."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [{ name = "Sepehr Radmard", email = "sepehrr80@gmail.com" }]
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
keywords = ["mcp", "model-context-protocol", "snapptrip", "snapp-trip", "snapptrip-hotel", "iran-hotels", "domestic-flights", "hotel-search", "hotel-prices", "flights", "travel", "iran", "persian", "farsi", "claude", "ai-agents", "mcp-server"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"mcp>=2.2,<3",
|
|
24
|
+
"httpx>=0.27",
|
|
25
|
+
"httpx-curl-cffi>=0.1.5",
|
|
26
|
+
"curl-cffi>=0.16.3",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://github.com/sepehr071/snapptrip-mcp"
|
|
31
|
+
Repository = "https://github.com/sepehr071/snapptrip-mcp"
|
|
32
|
+
Issues = "https://github.com/sepehr071/snapptrip-mcp/issues"
|
|
33
|
+
Website = "https://mcpfarsi.ir/"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
snapptrip-mcp = "snapptrip_mcp.server:main"
|
|
37
|
+
|
|
38
|
+
[dependency-groups]
|
|
39
|
+
dev = ["pytest>=8", "ruff>=0.6"]
|
|
40
|
+
|
|
41
|
+
[build-system]
|
|
42
|
+
requires = ["hatchling"]
|
|
43
|
+
build-backend = "hatchling.build"
|
|
44
|
+
|
|
45
|
+
[tool.hatch.build.targets.wheel]
|
|
46
|
+
packages = ["src/snapptrip_mcp"]
|
|
47
|
+
|
|
48
|
+
[tool.pytest.ini_options]
|
|
49
|
+
testpaths = ["tests"]
|
|
50
|
+
addopts = "-m 'not live'"
|
|
51
|
+
markers = ["live: calls the real SnappTrip APIs (run with -m live)"]
|
|
52
|
+
|
|
53
|
+
[tool.ruff]
|
|
54
|
+
line-length = 120
|
|
55
|
+
target-version = "py310"
|
|
56
|
+
|
|
57
|
+
[tool.ruff.lint]
|
|
58
|
+
select = ["E", "F", "I", "B", "UP"]
|
|
59
|
+
ignore = ["E501"] # long Field(description=...) strings read better on one line
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.sepehr071/snapptrip-mcp",
|
|
4
|
+
"title": "SnappTrip Hotels and Flights",
|
|
5
|
+
"description": "Read-only SnappTrip: Iranian hotel search, rooms, reviews, calendar prices and domestic flights.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/sepehr071/snapptrip-mcp",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"websiteUrl": "https://github.com/sepehr071/snapptrip-mcp",
|
|
11
|
+
"version": "0.1.0",
|
|
12
|
+
"packages": [
|
|
13
|
+
{
|
|
14
|
+
"registryType": "pypi",
|
|
15
|
+
"registryBaseUrl": "https://pypi.org",
|
|
16
|
+
"identifier": "snapptrip-mcp",
|
|
17
|
+
"version": "0.1.0",
|
|
18
|
+
"runtimeHint": "uvx",
|
|
19
|
+
"transport": {
|
|
20
|
+
"type": "stdio"
|
|
21
|
+
},
|
|
22
|
+
"environmentVariables": [
|
|
23
|
+
{
|
|
24
|
+
"name": "SNAPPTRIP_MCP_PROXY",
|
|
25
|
+
"description": "Optional HTTP proxy URL for the SnappTrip requests; system proxy settings are ignored. Also accepts a comma-separated list: one is used until it gets blocked or fails to connect, then the next.",
|
|
26
|
+
"isRequired": false,
|
|
27
|
+
"isSecret": false
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|