fidibo-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.
- fidibo_mcp-0.1.0/.github/workflows/ci.yml +22 -0
- fidibo_mcp-0.1.0/.github/workflows/publish.yml +51 -0
- fidibo_mcp-0.1.0/.gitignore +6 -0
- fidibo_mcp-0.1.0/CLAUDE.md +70 -0
- fidibo_mcp-0.1.0/LICENSE +21 -0
- fidibo_mcp-0.1.0/PKG-INFO +113 -0
- fidibo_mcp-0.1.0/README.md +87 -0
- fidibo_mcp-0.1.0/pyproject.toml +54 -0
- fidibo_mcp-0.1.0/server.json +32 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/__init__.py +5 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/books.py +363 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/detail.py +147 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/http.py +118 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/people.py +99 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/registry.py +16 -0
- fidibo_mcp-0.1.0/src/fidibo_mcp/server.py +53 -0
- fidibo_mcp-0.1.0/tests/conftest.py +70 -0
- fidibo_mcp-0.1.0/tests/fixtures/base_levels.json +308 -0
- fidibo_mcp-0.1.0/tests/fixtures/book_item_audio.json +253 -0
- fidibo_mcp-0.1.0/tests/fixtures/book_item_ebook.json +216 -0
- fidibo_mcp-0.1.0/tests/fixtures/category_drama.json +56 -0
- fidibo_mcp-0.1.0/tests/fixtures/list_category.json +237 -0
- fidibo_mcp-0.1.0/tests/fixtures/list_free.json +224 -0
- fidibo_mcp-0.1.0/tests/fixtures/list_plus_audio.json +251 -0
- fidibo_mcp-0.1.0/tests/fixtures/overview_audio.json +199 -0
- fidibo_mcp-0.1.0/tests/fixtures/overview_ebook.json +178 -0
- fidibo_mcp-0.1.0/tests/fixtures/person.json +34 -0
- fidibo_mcp-0.1.0/tests/fixtures/publisher.json +32 -0
- fidibo_mcp-0.1.0/tests/fixtures/reviews.json +90 -0
- fidibo_mcp-0.1.0/tests/fixtures/search_list.json +380 -0
- fidibo_mcp-0.1.0/tests/fixtures/search_person.json +87 -0
- fidibo_mcp-0.1.0/tests/fixtures/search_publisher.json +45 -0
- fidibo_mcp-0.1.0/tests/test_books.py +144 -0
- fidibo_mcp-0.1.0/tests/test_detail.py +87 -0
- fidibo_mcp-0.1.0/tests/test_http.py +95 -0
- fidibo_mcp-0.1.0/tests/test_live_books.py +66 -0
- fidibo_mcp-0.1.0/tests/test_live_detail.py +45 -0
- fidibo_mcp-0.1.0/tests/test_live_people.py +23 -0
- fidibo_mcp-0.1.0/tests/test_people.py +50 -0
- fidibo_mcp-0.1.0/uv.lock +1173 -0
|
@@ -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/fidibo-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,70 @@
|
|
|
1
|
+
# fidibo-mcp
|
|
2
|
+
|
|
3
|
+
Unofficial, read-only MCP server for Fidibo (fidibo.com), an Iranian store for ebooks and audiobooks (Digikala group).
|
|
4
|
+
Not published yet: no git repo, PyPI or MCP Registry release (planned: GitHub `sepehr071/fidibo-mcp`, PyPI `fidibo-mcp`).
|
|
5
|
+
It is a sibling of `../shopino-mcp` and copies their layout and idioms; keep them in step.
|
|
6
|
+
|
|
7
|
+
API map this server is built on (endpoints, samples, quirks, test report): `../fidibo/`.
|
|
8
|
+
|
|
9
|
+
## Layout
|
|
10
|
+
|
|
11
|
+
- `src/fidibo_mcp/http.py`: the only HTTP code. One shared `httpx.AsyncClient` (`trust_env=False`, proxy only from
|
|
12
|
+
`FIDIBO_MCP_PROXY`), a concurrency semaphore, `api(path, params, body=None)` for the JSON gateway
|
|
13
|
+
`https://api.fidibo.com` (GET, or POST when `body` is given: the book list is a read-only POST query), `result()`
|
|
14
|
+
for `data.result`, one retry on dropped connections and on an empty 200 body, HTTP 204 returns `{}`,
|
|
15
|
+
`ApiError(ToolError)`, `set_transport()` for tests.
|
|
16
|
+
- `registry.py`: `@tool("Title")` collects tools. `server.py`: registers them with read-only annotations, holds `INSTRUCTIONS`.
|
|
17
|
+
- Tools: `books.py` (search, browse, bestsellers, new, free, categories; also `_card`, `_scan`, `book_list`),
|
|
18
|
+
`detail.py` (book, reviews, similar), `people.py` (author, publisher). 11 tools, all `fd_*`.
|
|
19
|
+
- `tests/`: `test_<module>.py` unit tests (MockTransport + trimmed real fixtures in `tests/fixtures/`),
|
|
20
|
+
`test_live_<module>.py` live tests (`@pytest.mark.live`), `test_http.py` for the client and the README tool tables.
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
uv needs the local proxy to download packages; the server and tests call Fidibo directly (env proxies are ignored).
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export HTTPS_PROXY=http://127.0.0.1:10898 HTTP_PROXY=http://127.0.0.1:10898
|
|
28
|
+
uv sync
|
|
29
|
+
uv run ruff check . && uv run ruff format --check .
|
|
30
|
+
uv run pytest -q # unit tests, offline
|
|
31
|
+
uv run pytest -m live -q # one live test per tool, about 10 s
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Rules for changes
|
|
35
|
+
|
|
36
|
+
- Read-only only. Never call login/OTP (`/identity/*`), basket / payment, library / shelves / favorites, review or
|
|
37
|
+
rating writes, `/flex/search/click`, the Fidibo Plus plans flow, or any analytics beacon.
|
|
38
|
+
- Output units: prices in **Toman** (the API is Toman; nothing to convert; the site's Rial view is x10). Card:
|
|
39
|
+
`final_price` = `campaign.discounted_price` or `price` (what the customer pays), `price` = before discount (set to
|
|
40
|
+
`final_price` when there is no discount), `discount_pct` int computed, `free` = no `price` key (price 0), `in_plus` =
|
|
41
|
+
`badges.subscription`, `rating` absent when nobody voted.
|
|
42
|
+
- New tool: `@tool("Title")` async function, every param `Annotated[..., Field(...)]` with constraints and an example,
|
|
43
|
+
docstring = what it returns + when to use + what to call next, compact dict output. Add a unit test with a real trimmed
|
|
44
|
+
fixture, a live test, a README tool-table row, and an `INSTRUCTIONS` mention.
|
|
45
|
+
- Keep `README.md` tool tables equal to `list_tools()` (a unit test checks it). Deps stay `mcp` + `httpx` only.
|
|
46
|
+
- Write ZWNJ as `\u200c` in code, never the invisible character.
|
|
47
|
+
|
|
48
|
+
## Fidibo quirks (keep them)
|
|
49
|
+
|
|
50
|
+
- No auth, token or header needed. `curl` gets an ArvanCloud 403 on fidibo.com pages (TLS fingerprint); httpx and
|
|
51
|
+
requests are fine, direct or through the proxy.
|
|
52
|
+
- Envelope `{data: {result, total, per_page}}`; many lists are UI components (`{component, items[]}`): search lists
|
|
53
|
+
wrap cards in `result[0].items`, `POST /flex/list/book` returns cards directly in `result`. Empty page = HTTP 204.
|
|
54
|
+
- `POST /flex/list/book?page&limit` body keys: `order` (BESTSELLER, WEEK_BESTSELLER, MONTH_BESTSELLER, POPULAR, RECENT,
|
|
55
|
+
LOWEST_PRICE, HIGHEST_PRICE), `contentType` [1,6] text / [2,7] audio, `categoryId` (numeric only; uuid or slug give an
|
|
56
|
+
empty reply), `authorId`, `publisherId`, `excludeBookId`, `free`, `subscription_only` (`subscription` is ignored),
|
|
57
|
+
`format`. No price-range filter anywhere: filter client-side (`_scan`, up to 3 pages). `total` is a constant 150.
|
|
58
|
+
- `GET /flex/search/list/content` takes `query, order, contentType "[1,6]", page, size`; ignores every price / Plus /
|
|
59
|
+
free filter. `total` is the real count.
|
|
60
|
+
- Category slug to numeric id: `GET /flex/{ebooks|audiobooks}/categories/{slug}` -> `action.inputs[categoryId]`
|
|
61
|
+
(same slug exists in both levels with different ids). Book `breadcrumb[].id` of `category_page` entries are the ids.
|
|
62
|
+
- `GET /flex/book/reviews/{slug}` needs the full slug; a bare id or `?bookId=` hangs until timeout. Same for
|
|
63
|
+
`/flex/book/editions`. Do not call them.
|
|
64
|
+
- Sorting by price (both APIs) follows the price to pay; free books come first in cheapest order.
|
|
65
|
+
- No similar-books endpoint: `fd_similar` = bestsellers of the leaf category (parents as fallback).
|
|
66
|
+
|
|
67
|
+
## Release (when it is time)
|
|
68
|
+
|
|
69
|
+
Bump `version` in `pyproject.toml` and both versions in `server.json`, `git init`, create the GitHub repo, tag `vX.Y.Z`.
|
|
70
|
+
`.github/workflows/publish.yml` (copied from shopino-mcp, untested here) publishes to PyPI and the MCP Registry.
|
fidibo_mcp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sepehr
|
|
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,113 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: fidibo-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unofficial read-only MCP server for Fidibo: search Persian ebooks and audiobooks, compare prices, find free and Fidibo Plus books, read reviews.
|
|
5
|
+
Project-URL: Homepage, https://github.com/sepehr071/fidibo-mcp
|
|
6
|
+
Project-URL: Source, https://github.com/sepehr071/fidibo-mcp
|
|
7
|
+
Project-URL: Changelog, https://github.com/sepehr071/fidibo-mcp/releases
|
|
8
|
+
Project-URL: Issues, https://github.com/sepehr071/fidibo-mcp/issues
|
|
9
|
+
Author-email: Sepehr <sepehr@nextofx.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: audiobook,books,ebook,fidibo,iran,mcp,model-context-protocol,persian
|
|
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: httpx>=0.27
|
|
24
|
+
Requires-Dist: mcp<3,>=2.2
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
<!-- mcp-name: io.github.sepehr071/fidibo-mcp -->
|
|
28
|
+
|
|
29
|
+
# fidibo-mcp
|
|
30
|
+
|
|
31
|
+
**Let your AI agent search Persian ebooks and audiobooks on Fidibo, compare prices, and find free and Fidibo Plus books.**
|
|
32
|
+
|
|
33
|
+
Unofficial, read-only [MCP](https://modelcontextprotocol.io) server for [Fidibo](https://fidibo.com), the Iranian store
|
|
34
|
+
for ebooks and audiobooks (Digikala group). Search by title or author, see the price in Toman with discount, check
|
|
35
|
+
whether a book is free or in the Fidibo Plus subscription, read reviews, and browse bestsellers, new releases,
|
|
36
|
+
categories, authors and publishers, all from Claude, Cursor or Copilot. No account, no API key, nothing is bought or
|
|
37
|
+
changed.
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/).
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
claude mcp add fidibo -- uvx fidibo-mcp
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Any other MCP client: command `uvx`, args `["fidibo-mcp"]`.
|
|
48
|
+
|
|
49
|
+
## What it can do
|
|
50
|
+
|
|
51
|
+
- Search books and audiobooks by title, author or keyword; sort by price or date; filter by price range, free, Fidibo Plus
|
|
52
|
+
- Full record of a book: price and discount in **Toman**, format, pages or duration, narrators, rating with star distribution, Plus flag, description, printed price
|
|
53
|
+
- Reader reviews, similar books, an author's or publisher's books
|
|
54
|
+
- Bestsellers (week, month, all time), new releases, free books, any category
|
|
55
|
+
|
|
56
|
+
## Tools
|
|
57
|
+
|
|
58
|
+
All tools are read-only and start with `fd_`. Every book in a result is a compact card: `id`, `title`, `type` (ebook /
|
|
59
|
+
audiobook / microbook ...), `authors`, `publisher`, `final_price` (what you pay) and `price` (before discount) in Toman,
|
|
60
|
+
`discount_pct`, `free`, `in_plus`, `rating`, `url`.
|
|
61
|
+
|
|
62
|
+
### Find books
|
|
63
|
+
|
|
64
|
+
| Tool | What it does |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `fd_search` | Search by title, author or keyword; `kind` ebook / audio; sort relevance, cheapest, most expensive, newest; price range, free and Plus filters |
|
|
67
|
+
| `fd_browse` | List books of a category (or everything) by bestseller, popular, newest or price; free / Plus / price filters |
|
|
68
|
+
| `fd_bestsellers` | Top sellers of the week, month or all time, per kind and category |
|
|
69
|
+
| `fd_new` | Newest books and audiobooks |
|
|
70
|
+
| `fd_free` | Free ebooks and audiobooks |
|
|
71
|
+
| `fd_categories` | Category and sub-category slugs of a top level (ebooks, audiobooks, education, magazines, podcasts) |
|
|
72
|
+
|
|
73
|
+
### One book, people
|
|
74
|
+
|
|
75
|
+
| Tool | What it does |
|
|
76
|
+
|---|---|
|
|
77
|
+
| `fd_book` | Full record: price, discount, pages or duration, size, narrators, rating distribution, Plus flag, description, printed price |
|
|
78
|
+
| `fd_reviews` | Reader reviews with stars, date and likes |
|
|
79
|
+
| `fd_similar` | Bestsellers of the book's category (Fidibo has no similar-books endpoint) |
|
|
80
|
+
| `fd_author` | An author's, translator's or narrator's profile and books (by id or name) |
|
|
81
|
+
| `fd_publisher` | A publisher's profile and books (by id or name) |
|
|
82
|
+
|
|
83
|
+
## Good to know
|
|
84
|
+
|
|
85
|
+
- **Prices are Toman.** The API returns Toman (checked against the site); `final_price` is the price to pay after a campaign discount, `price` is before it. Free books have price 0.
|
|
86
|
+
- `in_plus` means the book is in the Fidibo Plus subscription catalog; it still has a normal buy price.
|
|
87
|
+
- Price range, free and Plus filters of `fd_search` are applied after fetching (up to 3 pages per call); use `next_page` to continue. `fd_browse` filters free and Plus on the server and the price range after fetching.
|
|
88
|
+
- Fidibo lists are capped: the book list reports at most 150 matches, `fd_search` `total_matches` is the real count.
|
|
89
|
+
- Persian queries work best.
|
|
90
|
+
|
|
91
|
+
## Configuration
|
|
92
|
+
|
|
93
|
+
The server calls `api.fidibo.com` directly and ignores system proxy variables. To use a proxy set `FIDIBO_MCP_PROXY=http://host:port`.
|
|
94
|
+
|
|
95
|
+
## Development
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
export HTTPS_PROXY=http://127.0.0.1:10898 HTTP_PROXY=http://127.0.0.1:10898 # uv downloads only
|
|
99
|
+
uv sync
|
|
100
|
+
uv run ruff check . && uv run ruff format --check .
|
|
101
|
+
uv run pytest -q # offline, recorded fixtures
|
|
102
|
+
uv run pytest -m live -q # real API, one test per tool
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The API map this server is built on lives next to it in `../fidibo/`.
|
|
106
|
+
|
|
107
|
+
## Disclaimer
|
|
108
|
+
|
|
109
|
+
Unofficial; not affiliated with Fidibo or Digikala. Read-only access to the data of public pages. Keep request rates low.
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.sepehr071/fidibo-mcp -->
|
|
2
|
+
|
|
3
|
+
# fidibo-mcp
|
|
4
|
+
|
|
5
|
+
**Let your AI agent search Persian ebooks and audiobooks on Fidibo, compare prices, and find free and Fidibo Plus books.**
|
|
6
|
+
|
|
7
|
+
Unofficial, read-only [MCP](https://modelcontextprotocol.io) server for [Fidibo](https://fidibo.com), the Iranian store
|
|
8
|
+
for ebooks and audiobooks (Digikala group). Search by title or author, see the price in Toman with discount, check
|
|
9
|
+
whether a book is free or in the Fidibo Plus subscription, read reviews, and browse bestsellers, new releases,
|
|
10
|
+
categories, authors and publishers, all from Claude, Cursor or Copilot. No account, no API key, nothing is bought or
|
|
11
|
+
changed.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/).
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
claude mcp add fidibo -- uvx fidibo-mcp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Any other MCP client: command `uvx`, args `["fidibo-mcp"]`.
|
|
22
|
+
|
|
23
|
+
## What it can do
|
|
24
|
+
|
|
25
|
+
- Search books and audiobooks by title, author or keyword; sort by price or date; filter by price range, free, Fidibo Plus
|
|
26
|
+
- Full record of a book: price and discount in **Toman**, format, pages or duration, narrators, rating with star distribution, Plus flag, description, printed price
|
|
27
|
+
- Reader reviews, similar books, an author's or publisher's books
|
|
28
|
+
- Bestsellers (week, month, all time), new releases, free books, any category
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
All tools are read-only and start with `fd_`. Every book in a result is a compact card: `id`, `title`, `type` (ebook /
|
|
33
|
+
audiobook / microbook ...), `authors`, `publisher`, `final_price` (what you pay) and `price` (before discount) in Toman,
|
|
34
|
+
`discount_pct`, `free`, `in_plus`, `rating`, `url`.
|
|
35
|
+
|
|
36
|
+
### Find books
|
|
37
|
+
|
|
38
|
+
| Tool | What it does |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `fd_search` | Search by title, author or keyword; `kind` ebook / audio; sort relevance, cheapest, most expensive, newest; price range, free and Plus filters |
|
|
41
|
+
| `fd_browse` | List books of a category (or everything) by bestseller, popular, newest or price; free / Plus / price filters |
|
|
42
|
+
| `fd_bestsellers` | Top sellers of the week, month or all time, per kind and category |
|
|
43
|
+
| `fd_new` | Newest books and audiobooks |
|
|
44
|
+
| `fd_free` | Free ebooks and audiobooks |
|
|
45
|
+
| `fd_categories` | Category and sub-category slugs of a top level (ebooks, audiobooks, education, magazines, podcasts) |
|
|
46
|
+
|
|
47
|
+
### One book, people
|
|
48
|
+
|
|
49
|
+
| Tool | What it does |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `fd_book` | Full record: price, discount, pages or duration, size, narrators, rating distribution, Plus flag, description, printed price |
|
|
52
|
+
| `fd_reviews` | Reader reviews with stars, date and likes |
|
|
53
|
+
| `fd_similar` | Bestsellers of the book's category (Fidibo has no similar-books endpoint) |
|
|
54
|
+
| `fd_author` | An author's, translator's or narrator's profile and books (by id or name) |
|
|
55
|
+
| `fd_publisher` | A publisher's profile and books (by id or name) |
|
|
56
|
+
|
|
57
|
+
## Good to know
|
|
58
|
+
|
|
59
|
+
- **Prices are Toman.** The API returns Toman (checked against the site); `final_price` is the price to pay after a campaign discount, `price` is before it. Free books have price 0.
|
|
60
|
+
- `in_plus` means the book is in the Fidibo Plus subscription catalog; it still has a normal buy price.
|
|
61
|
+
- Price range, free and Plus filters of `fd_search` are applied after fetching (up to 3 pages per call); use `next_page` to continue. `fd_browse` filters free and Plus on the server and the price range after fetching.
|
|
62
|
+
- Fidibo lists are capped: the book list reports at most 150 matches, `fd_search` `total_matches` is the real count.
|
|
63
|
+
- Persian queries work best.
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
The server calls `api.fidibo.com` directly and ignores system proxy variables. To use a proxy set `FIDIBO_MCP_PROXY=http://host:port`.
|
|
68
|
+
|
|
69
|
+
## Development
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
export HTTPS_PROXY=http://127.0.0.1:10898 HTTP_PROXY=http://127.0.0.1:10898 # uv downloads only
|
|
73
|
+
uv sync
|
|
74
|
+
uv run ruff check . && uv run ruff format --check .
|
|
75
|
+
uv run pytest -q # offline, recorded fixtures
|
|
76
|
+
uv run pytest -m live -q # real API, one test per tool
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The API map this server is built on lives next to it in `../fidibo/`.
|
|
80
|
+
|
|
81
|
+
## Disclaimer
|
|
82
|
+
|
|
83
|
+
Unofficial; not affiliated with Fidibo or Digikala. Read-only access to the data of public pages. Keep request rates low.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fidibo-mcp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Unofficial read-only MCP server for Fidibo: search Persian ebooks and audiobooks, compare prices, find free and Fidibo Plus books, read reviews."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [{ name = "Sepehr", email = "sepehr@nextofx.com" }]
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
keywords = ["mcp", "model-context-protocol", "fidibo", "iran", "ebook", "audiobook", "books", "persian"]
|
|
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
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://github.com/sepehr071/fidibo-mcp"
|
|
29
|
+
Source = "https://github.com/sepehr071/fidibo-mcp"
|
|
30
|
+
Changelog = "https://github.com/sepehr071/fidibo-mcp/releases"
|
|
31
|
+
Issues = "https://github.com/sepehr071/fidibo-mcp/issues"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
fidibo-mcp = "fidibo_mcp.server:main"
|
|
35
|
+
|
|
36
|
+
[dependency-groups]
|
|
37
|
+
dev = ["pytest>=8", "ruff>=0.6"]
|
|
38
|
+
|
|
39
|
+
[build-system]
|
|
40
|
+
requires = ["hatchling"]
|
|
41
|
+
build-backend = "hatchling.build"
|
|
42
|
+
|
|
43
|
+
[tool.pytest.ini_options]
|
|
44
|
+
testpaths = ["tests"]
|
|
45
|
+
addopts = "-m 'not live'"
|
|
46
|
+
markers = ["live: calls the real Fidibo API (run with -m live)"]
|
|
47
|
+
|
|
48
|
+
[tool.ruff]
|
|
49
|
+
line-length = 120
|
|
50
|
+
target-version = "py310"
|
|
51
|
+
|
|
52
|
+
[tool.ruff.lint]
|
|
53
|
+
select = ["E", "F", "I", "B", "UP"]
|
|
54
|
+
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/fidibo-mcp",
|
|
4
|
+
"title": "Fidibo",
|
|
5
|
+
"description": "Unofficial read-only Fidibo: search Persian ebooks and audiobooks, compare prices, free and Plus books, reviews.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/sepehr071/fidibo-mcp",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"websiteUrl": "https://github.com/sepehr071/fidibo-mcp",
|
|
11
|
+
"version": "0.1.0",
|
|
12
|
+
"packages": [
|
|
13
|
+
{
|
|
14
|
+
"registryType": "pypi",
|
|
15
|
+
"registryBaseUrl": "https://pypi.org",
|
|
16
|
+
"identifier": "fidibo-mcp",
|
|
17
|
+
"version": "0.1.0",
|
|
18
|
+
"runtimeHint": "uvx",
|
|
19
|
+
"transport": {
|
|
20
|
+
"type": "stdio"
|
|
21
|
+
},
|
|
22
|
+
"environmentVariables": [
|
|
23
|
+
{
|
|
24
|
+
"name": "FIDIBO_MCP_PROXY",
|
|
25
|
+
"description": "Optional HTTP proxy URL for requests to fidibo.com; system proxy settings are ignored.",
|
|
26
|
+
"isRequired": false,
|
|
27
|
+
"isSecret": false
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|