iranseda-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.
Files changed (33) hide show
  1. iranseda_mcp-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +43 -0
  2. iranseda_mcp-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. iranseda_mcp-0.1.0/.github/banner.png +0 -0
  4. iranseda_mcp-0.1.0/.github/dependabot.yml +10 -0
  5. iranseda_mcp-0.1.0/.github/workflows/ci.yml +22 -0
  6. iranseda_mcp-0.1.0/.github/workflows/publish.yml +51 -0
  7. iranseda_mcp-0.1.0/.gitignore +6 -0
  8. iranseda_mcp-0.1.0/LICENSE +80 -0
  9. iranseda_mcp-0.1.0/PKG-INFO +156 -0
  10. iranseda_mcp-0.1.0/README.md +128 -0
  11. iranseda_mcp-0.1.0/pyproject.toml +56 -0
  12. iranseda_mcp-0.1.0/server.json +32 -0
  13. iranseda_mcp-0.1.0/src/iranseda_mcp/__init__.py +5 -0
  14. iranseda_mcp-0.1.0/src/iranseda_mcp/http.py +220 -0
  15. iranseda_mcp-0.1.0/src/iranseda_mcp/lib.py +169 -0
  16. iranseda_mcp-0.1.0/src/iranseda_mcp/registry.py +16 -0
  17. iranseda_mcp-0.1.0/src/iranseda_mcp/sd.py +363 -0
  18. iranseda_mcp-0.1.0/src/iranseda_mcp/server.py +94 -0
  19. iranseda_mcp-0.1.0/tests/conftest.py +78 -0
  20. iranseda_mcp-0.1.0/tests/fixtures/epglist.html +1935 -0
  21. iranseda_mcp-0.1.0/tests/fixtures/episode.html +791 -0
  22. iranseda_mcp-0.1.0/tests/fixtures/lib_download.html +5 -0
  23. iranseda_mcp-0.1.0/tests/fixtures/lib_item.html +877 -0
  24. iranseda_mcp-0.1.0/tests/fixtures/lib_music_category.html +512 -0
  25. iranseda_mcp-0.1.0/tests/fixtures/lib_search.html +3085 -0
  26. iranseda_mcp-0.1.0/tests/fixtures/live.html +747 -0
  27. iranseda_mcp-0.1.0/tests/fixtures/player.html +1 -0
  28. iranseda_mcp-0.1.0/tests/fixtures/program.html +1610 -0
  29. iranseda_mcp-0.1.0/tests/fixtures/programlist.html +1322 -0
  30. iranseda_mcp-0.1.0/tests/fixtures/radiolist.html +1178 -0
  31. iranseda_mcp-0.1.0/tests/test_iranseda.py +161 -0
  32. iranseda_mcp-0.1.0/tests/test_live_iranseda.py +46 -0
  33. iranseda_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. sd_episode
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 iranseda.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
+ - IRANSEDA_MCP_PROXY set
39
+ - type: input
40
+ id: version
41
+ attributes:
42
+ label: iranseda-mcp version
43
+ placeholder: "0.1.0"
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Question or idea
4
+ url: https://github.com/sepehr071/iranseda-mcp/discussions
5
+ about: Ask how to use it or suggest a new tool
Binary file
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: monthly
7
+ - package-ecosystem: uv
8
+ directory: /
9
+ schedule:
10
+ interval: monthly
@@ -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/iranseda-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,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ dist/
5
+ .pytest_cache/
6
+ .ruff_cache/
@@ -0,0 +1,80 @@
1
+ Required Notice: Copyright (c) 2026 Sepehr Radmard (https://github.com/sepehr071)
2
+
3
+ Free for personal and non-commercial use under the terms below. Commercial use needs a
4
+ separate license: contact Sepehr Radmard at https://www.linkedin.com/in/sepehr-radmard or https://github.com/sepehr071.
5
+
6
+ Versions released before this license change were published under the MIT license and stay under it.
7
+
8
+ # PolyForm Noncommercial License 1.0.0
9
+
10
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
11
+
12
+ ## Acceptance
13
+
14
+ In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
15
+
16
+ ## Copyright License
17
+
18
+ The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
19
+
20
+ ## Distribution License
21
+
22
+ The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
23
+
24
+ ## Notices
25
+
26
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
27
+
28
+ > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
29
+
30
+ ## Changes and New Works License
31
+
32
+ The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
33
+
34
+ ## Patent License
35
+
36
+ The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
37
+
38
+ ## Noncommercial Purposes
39
+
40
+ Any noncommercial purpose is a permitted purpose.
41
+
42
+ ## Personal Uses
43
+
44
+ Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
45
+
46
+ ## Noncommercial Organizations
47
+
48
+ Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
49
+
50
+ ## Fair Use
51
+
52
+ You may have "fair use" rights for the software under the law. These terms do not limit them.
53
+
54
+ ## No Other Rights
55
+
56
+ These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
57
+
58
+ ## Patent Defense
59
+
60
+ If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
61
+
62
+ ## Violations
63
+
64
+ The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
65
+
66
+ ## No Liability
67
+
68
+ ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
69
+
70
+ ## Definitions
71
+
72
+ The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
73
+
74
+ **You** refers to the individual or entity agreeing to these terms.
75
+
76
+ **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
77
+
78
+ **Your licenses** are all the licenses granted to you for the software under these terms.
79
+
80
+ **Use** means anything you do with the software requiring one of your licenses.
@@ -0,0 +1,156 @@
1
+ Metadata-Version: 2.5
2
+ Name: iranseda-mcp
3
+ Version: 0.1.0
4
+ Summary: Unofficial read-only MCP server for Iranseda (ایران‌صدا, radio.iranseda.ir), the IRIB audio archive: radio channels, live streams, schedules, programs, audiobooks, music, Quran.
5
+ Project-URL: Homepage, https://github.com/sepehr071/iranseda-mcp
6
+ Project-URL: Repository, https://github.com/sepehr071/iranseda-mcp
7
+ Project-URL: Issues, https://github.com/sepehr071/iranseda-mcp/issues
8
+ Project-URL: Website, https://mcpfarsi.ir/
9
+ Author-email: Sepehr Radmard <sepehrr80@gmail.com>
10
+ License-Expression: PolyForm-Noncommercial-1.0.0
11
+ License-File: LICENSE
12
+ Keywords: ai-agents,audio,claude,epg,farsi,iran,iran-sada,iranseda,iranseda-ir,iranseda-mcp,irib,live-radio,mcp,mcp-server,model-context-protocol,persian,podcast,radio,radio-archive
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/iranseda-mcp -->
30
+
31
+ <div align="center">
32
+
33
+ <img src="https://raw.githubusercontent.com/sepehr071/iranseda-mcp/main/.github/banner.png" alt="iranseda-mcp: unofficial Iranseda (ایران‌صدا) MCP server that lists IRIB radio channels, gives live stream links and schedules, and finds audiobooks, music and Quran recitations for Claude, Cursor and Copilot" width="100%">
34
+
35
+ # iranseda-mcp: Iranseda (ایران‌صدا) IRIB radio and audio archive MCP server for AI agents
36
+
37
+ **iranseda-mcp is an unofficial, read-only MCP server that lets an AI agent list IRIB radio channels, open their live streams, read daily schedules and find programs, episodes, audiobooks, music and Quran recitations on Iranseda (ایران‌صدا, iranseda.ir), the audio archive of Iran's national broadcaster.**<br>
38
+ Its 9 tools list national, provincial and Nama radio channels with what is on now, give a channel's public live stream (HLS) with now and next, show a channel's schedule for a day, find a radio program by name, show its episodes and an episode's audio files, and search the audiobook, music, kids, speech, nava and Quran libraries down to mp3 and mp4 links.<br>
39
+ No API key or account is needed; it works in Claude, Cursor, Copilot and any other MCP client.
40
+
41
+ [![PyPI](https://img.shields.io/pypi/v/iranseda-mcp?color=2563eb)](https://pypi.org/project/iranseda-mcp/)
42
+ [![Python](https://img.shields.io/pypi/pyversions/iranseda-mcp)](https://pypi.org/project/iranseda-mcp/)
43
+ [![CI](https://github.com/sepehr071/iranseda-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/sepehr071/iranseda-mcp/actions/workflows/ci.yml)
44
+ [![License: PolyForm Noncommercial](https://img.shields.io/badge/license-PolyForm%20Noncommercial-c2410c)](https://github.com/sepehr071/iranseda-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 Iranseda: radio channels, live streams, schedules, programs, episodes, and the audiobook, music, kids, speech, nava and Quran libraries.
55
+ - **Install:** `uvx iranseda-mcp` or `claude mcp add iranseda -- uvx iranseda-mcp`. Transport: stdio. Needs [uv](https://docs.astral.sh/uv/getting-started/installation/) (Python 3.10+).
56
+ - **Auth:** none. Optional `IRANSEDA_MCP_PROXY` (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.
57
+ - **Access:** read-only. It cannot log in, play audio or download files; results give stream and file URLs.
58
+ - **Tools:** 9, all prefixed `sd_`. Typical sequences: `sd_channels` -> `sd_live_now` / `sd_schedule`; `sd_search_programs` -> `sd_program` -> `sd_episode`; `sd_library_search` -> `sd_library_item` -> `sd_library_file`.
59
+ - **Use when:** the user asks what is on a radio channel now, wants the live stream link of Radio Quran, Radio Iran or another IRIB channel, wants a program's recent episodes and their mp3 files, or wants an audiobook, a recitation or a sermon from Iranseda.
60
+ - **Output:** compact JSON. Dates are Gregorian (the site shows Jalali), times are Tehran time, durations are minutes. Titles are Persian.
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 iranseda -- uvx iranseda-mcp
70
+ ```
71
+
72
+ Claude Desktop, Cursor, VS Code and other clients:
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "iranseda": { "command": "uvx", "args": ["iranseda-mcp"] }
78
+ }
79
+ }
80
+ ```
81
+
82
+ Example prompts:
83
+
84
+ - "What is on Radio Quran right now, and what is its live stream?"
85
+ - "Show today's schedule of Radio Iran."
86
+ - "Find an audiobook about Islamic thought in the Quran on Iranseda."
87
+ - <span dir="rtl">الان در رادیو قرآن چه برنامه‌ای پخش می‌شود؟</span>
88
+ - <span dir="rtl">برنامهٔ «به افق آفتاب» را در رادیو ایران پیدا کن و آخرین قسمت‌هایش را بده.</span>
89
+
90
+ Real answer (18 Nov 2026): `sd_live_now(channel="15")` returned the Radio Quran (شبکه قرآن) HLS stream `https://s1cdn3.iranseda.ir/liveedge/radio-quran/playlist.m3u8`, now "تلاوت استاد احمد ابوالقاسمی" from 13:35 for 15 minutes, then a 5-minute interlude, "كلام ناب از خورشید انقلاب" at 13:55 and the national news at 14:00.
91
+
92
+ ## Tools
93
+
94
+ | Tool | What it returns |
95
+ |---|---|
96
+ | `sd_channels` | IRIB radio channels (national, provincial or Nama) with the program playing now and channel ids |
97
+ | `sd_live_now` | A channel's public HLS live stream URL, plus the program on now and the next ones |
98
+ | `sd_schedule` | A channel's programs for one day: start time, length, title, program and episode ids |
99
+ | `sd_search_programs` | Programs of one channel whose name contains a text (the site has no global search) |
100
+ | `sd_program` | A program's description, broadcast time and its latest episodes, about 20 per page |
101
+ | `sd_episode` | One episode's date, description and the audio file URL of each part |
102
+ | `sd_library_search` | Audiobooks, music, kids, speeches, nava and Quran recitations by text or category code |
103
+ | `sd_library_item` | One library item's details (narrator, singer, category) and its tracks |
104
+ | `sd_library_file` | The mp3 and mp4 download links and sizes of one library track |
105
+
106
+ ## Limits
107
+
108
+ - The site has no JSON API and no global search. `sd_search_programs` filters one channel's program list by name; library sub-sites have a real search, except the Quran site, whose search is broken upstream (use a category code such as `ga`).
109
+ - Results are parsed from the site's HTML, so a redesign can break a tool. The site sometimes answers a blank page; the server retries and then returns an error.
110
+ - Live streams were checked for 77 channels on 18 Nov 2026: 63 gave a playlist, 12 timed out on one CDN node and 2 provincial channels (Zabol, Marivan) answered 404. Whether a given player accepts a stream was not tested.
111
+ - The program list marks a program that is airing as ended; that field (`ended_jalali`) is exposed but not trusted.
112
+ - Audio files are never fetched or played; mp3 and mp4 links are returned as URLs only. The podcast sub-site is an empty stub and is not covered.
113
+ - It worked from an Iranian line and through a foreign proxy in testing; if your network is blocked, set `IRANSEDA_MCP_PROXY`. The server ignores system proxy variables on purpose.
114
+
115
+ ## How it works
116
+
117
+ Iranseda has no public API documentation. The pages were mapped by watching iranseda.ir in Chrome, and every tool was then checked in Chrome against the real rendered pages (channel lists, live pages, schedules, program and episode pages, and the library sub-sites) on 18 Nov 2026. The server reads the same public pages through a Chrome-impersonating HTTP client, with a short cache and at most two requests at a time.
118
+
119
+ ## فارسی
120
+
121
+ <div dir="rtl">
122
+
123
+ **iranseda-mcp** یک سرور MCP غیررسمی و فقط‌خواندنی برای ایران‌صدا (iranseda.ir)، آرشیو صوتی سازمان صداوسیما است. با آن یک عامل هوش مصنوعی می‌تواند شبکه‌های رادیویی را فهرست کند، پخش زندهٔ هر شبکه و برنامهٔ در حال پخش را بگیرد، جدول پخش یک روز را ببیند، برنامه‌ها و قسمت‌ها را پیدا کند و به فایل صوتی هر قسمت برسد. کتاب‌های گویا، موسیقی، سخنرانی، نوا و تلاوت‌های قرآن هم قابل جست‌وجو هستند. بدون حساب کاربری و کلید API کار می‌کند. نصب در Claude Code:
124
+
125
+ </div>
126
+
127
+ ```bash
128
+ claude mcp add iranseda -- uvx iranseda-mcp
129
+ ```
130
+
131
+ ## Development
132
+
133
+ ```bash
134
+ uv sync
135
+ uv run ruff check . && uv run ruff format --check .
136
+ uv run python -m pytest -q # offline tests on recorded fixtures
137
+ uv run python -m pytest -m live -q # live calls to iranseda.ir
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 Iranseda or IRIB. It is read-only and uses the public pages of iranseda.ir, 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
+ <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>
153
+
154
+ **استفادهٔ شخصی و غیرتجاری رایگان است.** استفاده در شرکت، محصول پولی یا پروژهٔ مشتری به مجوز تجاری نیاز دارد؛ از راه [لینکدین](https://www.linkedin.com/in/sepehr-radmard) یا [گیت&zwnj;هاب](https://github.com/sepehr071) با سپهر رادمرد تماس بگیرید. متن کامل: [PolyForm Noncommercial 1.0.0](https://github.com/sepehr071/iranseda-mcp/blob/main/LICENSE).
155
+
156
+ Free for personal and non-commercial use under the [PolyForm Noncommercial License 1.0.0](https://github.com/sepehr071/iranseda-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).
@@ -0,0 +1,128 @@
1
+ <!-- mcp-name: io.github.sepehr071/iranseda-mcp -->
2
+
3
+ <div align="center">
4
+
5
+ <img src="https://raw.githubusercontent.com/sepehr071/iranseda-mcp/main/.github/banner.png" alt="iranseda-mcp: unofficial Iranseda (ایران‌صدا) MCP server that lists IRIB radio channels, gives live stream links and schedules, and finds audiobooks, music and Quran recitations for Claude, Cursor and Copilot" width="100%">
6
+
7
+ # iranseda-mcp: Iranseda (ایران‌صدا) IRIB radio and audio archive MCP server for AI agents
8
+
9
+ **iranseda-mcp is an unofficial, read-only MCP server that lets an AI agent list IRIB radio channels, open their live streams, read daily schedules and find programs, episodes, audiobooks, music and Quran recitations on Iranseda (ایران‌صدا, iranseda.ir), the audio archive of Iran's national broadcaster.**<br>
10
+ Its 9 tools list national, provincial and Nama radio channels with what is on now, give a channel's public live stream (HLS) with now and next, show a channel's schedule for a day, find a radio program by name, show its episodes and an episode's audio files, and search the audiobook, music, kids, speech, nava and Quran libraries down to mp3 and mp4 links.<br>
11
+ No API key or account is needed; it works in Claude, Cursor, Copilot and any other MCP client.
12
+
13
+ [![PyPI](https://img.shields.io/pypi/v/iranseda-mcp?color=2563eb)](https://pypi.org/project/iranseda-mcp/)
14
+ [![Python](https://img.shields.io/pypi/pyversions/iranseda-mcp)](https://pypi.org/project/iranseda-mcp/)
15
+ [![CI](https://github.com/sepehr071/iranseda-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/sepehr071/iranseda-mcp/actions/workflows/ci.yml)
16
+ [![License: PolyForm Noncommercial](https://img.shields.io/badge/license-PolyForm%20Noncommercial-c2410c)](https://github.com/sepehr071/iranseda-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 Iranseda: radio channels, live streams, schedules, programs, episodes, and the audiobook, music, kids, speech, nava and Quran libraries.
27
+ - **Install:** `uvx iranseda-mcp` or `claude mcp add iranseda -- uvx iranseda-mcp`. Transport: stdio. Needs [uv](https://docs.astral.sh/uv/getting-started/installation/) (Python 3.10+).
28
+ - **Auth:** none. Optional `IRANSEDA_MCP_PROXY` (HTTP proxy URL, or a comma-separated list); system proxy settings are ignored.
29
+ - **Access:** read-only. It cannot log in, play audio or download files; results give stream and file URLs.
30
+ - **Tools:** 9, all prefixed `sd_`. Typical sequences: `sd_channels` -> `sd_live_now` / `sd_schedule`; `sd_search_programs` -> `sd_program` -> `sd_episode`; `sd_library_search` -> `sd_library_item` -> `sd_library_file`.
31
+ - **Use when:** the user asks what is on a radio channel now, wants the live stream link of Radio Quran, Radio Iran or another IRIB channel, wants a program's recent episodes and their mp3 files, or wants an audiobook, a recitation or a sermon from Iranseda.
32
+ - **Output:** compact JSON. Dates are Gregorian (the site shows Jalali), times are Tehran time, durations are minutes. Titles are Persian.
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 iranseda -- uvx iranseda-mcp
42
+ ```
43
+
44
+ Claude Desktop, Cursor, VS Code and other clients:
45
+
46
+ ```json
47
+ {
48
+ "mcpServers": {
49
+ "iranseda": { "command": "uvx", "args": ["iranseda-mcp"] }
50
+ }
51
+ }
52
+ ```
53
+
54
+ Example prompts:
55
+
56
+ - "What is on Radio Quran right now, and what is its live stream?"
57
+ - "Show today's schedule of Radio Iran."
58
+ - "Find an audiobook about Islamic thought in the Quran on Iranseda."
59
+ - <span dir="rtl">الان در رادیو قرآن چه برنامه‌ای پخش می‌شود؟</span>
60
+ - <span dir="rtl">برنامهٔ «به افق آفتاب» را در رادیو ایران پیدا کن و آخرین قسمت‌هایش را بده.</span>
61
+
62
+ Real answer (18 Nov 2026): `sd_live_now(channel="15")` returned the Radio Quran (شبکه قرآن) HLS stream `https://s1cdn3.iranseda.ir/liveedge/radio-quran/playlist.m3u8`, now "تلاوت استاد احمد ابوالقاسمی" from 13:35 for 15 minutes, then a 5-minute interlude, "كلام ناب از خورشید انقلاب" at 13:55 and the national news at 14:00.
63
+
64
+ ## Tools
65
+
66
+ | Tool | What it returns |
67
+ |---|---|
68
+ | `sd_channels` | IRIB radio channels (national, provincial or Nama) with the program playing now and channel ids |
69
+ | `sd_live_now` | A channel's public HLS live stream URL, plus the program on now and the next ones |
70
+ | `sd_schedule` | A channel's programs for one day: start time, length, title, program and episode ids |
71
+ | `sd_search_programs` | Programs of one channel whose name contains a text (the site has no global search) |
72
+ | `sd_program` | A program's description, broadcast time and its latest episodes, about 20 per page |
73
+ | `sd_episode` | One episode's date, description and the audio file URL of each part |
74
+ | `sd_library_search` | Audiobooks, music, kids, speeches, nava and Quran recitations by text or category code |
75
+ | `sd_library_item` | One library item's details (narrator, singer, category) and its tracks |
76
+ | `sd_library_file` | The mp3 and mp4 download links and sizes of one library track |
77
+
78
+ ## Limits
79
+
80
+ - The site has no JSON API and no global search. `sd_search_programs` filters one channel's program list by name; library sub-sites have a real search, except the Quran site, whose search is broken upstream (use a category code such as `ga`).
81
+ - Results are parsed from the site's HTML, so a redesign can break a tool. The site sometimes answers a blank page; the server retries and then returns an error.
82
+ - Live streams were checked for 77 channels on 18 Nov 2026: 63 gave a playlist, 12 timed out on one CDN node and 2 provincial channels (Zabol, Marivan) answered 404. Whether a given player accepts a stream was not tested.
83
+ - The program list marks a program that is airing as ended; that field (`ended_jalali`) is exposed but not trusted.
84
+ - Audio files are never fetched or played; mp3 and mp4 links are returned as URLs only. The podcast sub-site is an empty stub and is not covered.
85
+ - It worked from an Iranian line and through a foreign proxy in testing; if your network is blocked, set `IRANSEDA_MCP_PROXY`. The server ignores system proxy variables on purpose.
86
+
87
+ ## How it works
88
+
89
+ Iranseda has no public API documentation. The pages were mapped by watching iranseda.ir in Chrome, and every tool was then checked in Chrome against the real rendered pages (channel lists, live pages, schedules, program and episode pages, and the library sub-sites) on 18 Nov 2026. The server reads the same public pages through a Chrome-impersonating HTTP client, with a short cache and at most two requests at a time.
90
+
91
+ ## فارسی
92
+
93
+ <div dir="rtl">
94
+
95
+ **iranseda-mcp** یک سرور MCP غیررسمی و فقط‌خواندنی برای ایران‌صدا (iranseda.ir)، آرشیو صوتی سازمان صداوسیما است. با آن یک عامل هوش مصنوعی می‌تواند شبکه‌های رادیویی را فهرست کند، پخش زندهٔ هر شبکه و برنامهٔ در حال پخش را بگیرد، جدول پخش یک روز را ببیند، برنامه‌ها و قسمت‌ها را پیدا کند و به فایل صوتی هر قسمت برسد. کتاب‌های گویا، موسیقی، سخنرانی، نوا و تلاوت‌های قرآن هم قابل جست‌وجو هستند. بدون حساب کاربری و کلید API کار می‌کند. نصب در Claude Code:
96
+
97
+ </div>
98
+
99
+ ```bash
100
+ claude mcp add iranseda -- uvx iranseda-mcp
101
+ ```
102
+
103
+ ## Development
104
+
105
+ ```bash
106
+ uv sync
107
+ uv run ruff check . && uv run ruff format --check .
108
+ uv run python -m pytest -q # offline tests on recorded fixtures
109
+ uv run python -m pytest -m live -q # live calls to iranseda.ir
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 Iranseda or IRIB. It is read-only and uses the public pages of iranseda.ir, 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
+ <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>
125
+
126
+ **استفادهٔ شخصی و غیرتجاری رایگان است.** استفاده در شرکت، محصول پولی یا پروژهٔ مشتری به مجوز تجاری نیاز دارد؛ از راه [لینکدین](https://www.linkedin.com/in/sepehr-radmard) یا [گیت&zwnj;هاب](https://github.com/sepehr071) با سپهر رادمرد تماس بگیرید. متن کامل: [PolyForm Noncommercial 1.0.0](https://github.com/sepehr071/iranseda-mcp/blob/main/LICENSE).
127
+
128
+ Free for personal and non-commercial use under the [PolyForm Noncommercial License 1.0.0](https://github.com/sepehr071/iranseda-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).
@@ -0,0 +1,56 @@
1
+ [project]
2
+ name = "iranseda-mcp"
3
+ version = "0.1.0"
4
+ description = "Unofficial read-only MCP server for Iranseda (ایران‌صدا, radio.iranseda.ir), the IRIB audio archive: radio channels, live streams, schedules, programs, audiobooks, music, Quran."
5
+ readme = "README.md"
6
+ license = "PolyForm-Noncommercial-1.0.0"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "Sepehr Radmard", email = "sepehrr80@gmail.com" }]
9
+ requires-python = ">=3.10"
10
+ keywords = ["mcp", "model-context-protocol", "iranseda", "iranseda-ir", "irib", "iranseda-mcp", "iran-sada", "iran", "radio", "live-radio", "radio-archive", "podcast", "audio", "epg", "claude", "persian", "farsi", "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/iranseda-mcp"
31
+ Repository = "https://github.com/sepehr071/iranseda-mcp"
32
+ Issues = "https://github.com/sepehr071/iranseda-mcp/issues"
33
+ Website = "https://mcpfarsi.ir/"
34
+
35
+ [project.scripts]
36
+ iranseda-mcp = "iranseda_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.pytest.ini_options]
46
+ testpaths = ["tests"]
47
+ addopts = "-m 'not live'"
48
+ markers = ["live: calls the real Iranseda site (run with -m live)"]
49
+
50
+ [tool.ruff]
51
+ line-length = 120
52
+ target-version = "py310"
53
+
54
+ [tool.ruff.lint]
55
+ select = ["E", "F", "I", "B", "UP"]
56
+ 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/iranseda-mcp",
4
+ "title": "Iranseda Radio Archive",
5
+ "description": "Read-only Iranseda (IRIB audio): radio channels, live streams, schedules, audiobooks, music, Quran.",
6
+ "repository": {
7
+ "url": "https://github.com/sepehr071/iranseda-mcp",
8
+ "source": "github"
9
+ },
10
+ "websiteUrl": "https://github.com/sepehr071/iranseda-mcp",
11
+ "version": "0.1.0",
12
+ "packages": [
13
+ {
14
+ "registryType": "pypi",
15
+ "registryBaseUrl": "https://pypi.org",
16
+ "identifier": "iranseda-mcp",
17
+ "version": "0.1.0",
18
+ "runtimeHint": "uvx",
19
+ "transport": {
20
+ "type": "stdio"
21
+ },
22
+ "environmentVariables": [
23
+ {
24
+ "name": "IRANSEDA_MCP_PROXY",
25
+ "description": "Optional HTTP proxy URL for the Iranseda 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
+ }
@@ -0,0 +1,5 @@
1
+ """Unofficial MCP server for Iranseda (radio.iranseda.ir), the IRIB radio archive."""
2
+
3
+ from importlib.metadata import version
4
+
5
+ __version__ = version("iranseda-mcp")