wallapop-mcp 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/index.js +39878 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jaime Berdejo
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# wallapop-mcp
|
|
2
|
+
|
|
3
|
+
An MCP server that wraps Wallapop's public, unofficial `api/v3/search` and `api/v3/categories`
|
|
4
|
+
endpoints, exposing product search over Wallapop's marketplace as MCP tools an LLM client (e.g.
|
|
5
|
+
Claude Desktop/Code) can call directly.
|
|
6
|
+
|
|
7
|
+
> **Unofficial and unaffiliated.** This project is not affiliated with, endorsed by, or
|
|
8
|
+
> connected to Wallapop in any way. It talks to Wallapop's undocumented, reverse-engineered
|
|
9
|
+
> public API, which may change or block traffic without notice — use at your own risk.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx wallapop-mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or add it to your MCP client's config (e.g. Claude Desktop's `claude_desktop_config.json`):
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"wallapop": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "wallapop-mcp"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
### `search`
|
|
33
|
+
|
|
34
|
+
Searches Wallapop's marketplace. Defaults to a Barcelona-center location when `latitude`/
|
|
35
|
+
`longitude` are omitted, and auto-paginates up to `maxResults` (default 40, capped at 200).
|
|
36
|
+
|
|
37
|
+
| Param | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `keywords` | string | Free-text search query. |
|
|
40
|
+
| `categoryId` | number | Restrict to a category (see `list_categories`). |
|
|
41
|
+
| `minPrice` / `maxPrice` | number | Price range. |
|
|
42
|
+
| `distanceInKm` | number | Search radius. |
|
|
43
|
+
| `orderBy` | string | Sort order. |
|
|
44
|
+
| `latitude` / `longitude` | number | Search origin; defaults to Barcelona center. |
|
|
45
|
+
| `nextPage` | string | Opaque pagination cursor from a previous response. |
|
|
46
|
+
| `maxResults` | number | Default 40, capped at 200. |
|
|
47
|
+
|
|
48
|
+
Returns `{ listings: Listing[], nextPage?: string }`, where each `Listing` has: `id`, `title`,
|
|
49
|
+
`description`, `price`, `currency`, `imageUrl`, `url`, `location`, `condition` (often absent —
|
|
50
|
+
not present on every raw item), `createdAt`.
|
|
51
|
+
|
|
52
|
+
### `list_categories`
|
|
53
|
+
|
|
54
|
+
Free-text search over Wallapop's category tree (`query`, optional). With no query, returns the
|
|
55
|
+
18 top-level categories.
|
|
56
|
+
|
|
57
|
+
## Development
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pnpm install
|
|
61
|
+
pnpm test # mocked-HTTP unit tests only
|
|
62
|
+
pnpm typecheck
|
|
63
|
+
pnpm lint
|
|
64
|
+
pnpm build
|
|
65
|
+
pnpm start # run the built stdio server
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Opt-in live integration tests (real calls to Wallapop's API, not part of CI):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
WALLAPOP_LIVE_TESTS=1 pnpm test
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Regenerate the static category tree (fetches Wallapop's live `api/v3/categories` once):
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pnpm codegen:categories
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT
|