auchan-mcp 0.0.0-stage → 0.2.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 +55 -2
- package/dist/index.js +20359 -0
- package/package.json +42 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vasco Branco
|
|
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
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Auchan MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deixa o teu assistente pesquisar produtos no Auchan.pt e encher o carrinho por ti.
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
Feito à imagem do [continente-mcp](https://github.com/davidmarqu3s/continente-mcp) de David Marques.
|
|
8
|
+
|
|
9
|
+
## O que faz
|
|
10
|
+
|
|
11
|
+
- **Pesquisa sem conta**: nome, marca, preço, preço e preço por litro, quilo ou unidade.
|
|
12
|
+
- **Carrinho**: ver, juntar e mudar quantidades; cada alteração é confirmada no carrinho a seguir.
|
|
13
|
+
- **Respeita o site**: no máximo um pedido por segundo, resultados guardados durante 6 horas e um user-agent que diz quem é.
|
|
14
|
+
- **Tu decides**: a finalização da encomenda e o pagamento fazem-se sempre no Auchan.pt. O servidor não tem nenhuma ferramenta para isso.
|
|
15
|
+
|
|
16
|
+
As promoções e a disponibilidade não aparecem na pesquisa: o Auchan carrega-as em pedidos à parte que esta versão não faz, por isso `promo` e `available` vêm sempre `null`.
|
|
17
|
+
|
|
18
|
+
## Aviso
|
|
19
|
+
|
|
20
|
+
O `robots.txt` do Auchan pede que a pesquisa não seja usada de forma automática. Este servidor usa-a na mesma, com os limites acima, por decisão do dono do projeto, que assume o risco de bloqueio. Se o site bloquear ou pedir um CAPTCHA, o servidor pára e devolve um erro; nunca tenta contornar.
|
|
21
|
+
|
|
22
|
+
## Instalar
|
|
23
|
+
|
|
24
|
+
Precisas do Node.js 20.18.1 ou mais recente e de um cliente MCP, por exemplo o Claude Code. Junta o servidor e reinicia o cliente:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"auchan": { "command": "npx", "args": ["-y", "auchan-mcp"] }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
A pesquisa funciona logo, sem conta. Para o carrinho não crias nada: quando o assistente precisar dele, abre-se uma janela do Edge ou do Chrome na página de login do Auchan. Entras tu, a janela fecha e ficas ligado. A palavra-passe nunca passa pelo servidor nem fica guardada: só a sessão, no teu computador (`%USERPROFILE%\.auchan-mcp\cookies.json`). Se aparecer um CAPTCHA, resolves tu na janela.
|
|
35
|
+
|
|
36
|
+
## Usar
|
|
37
|
+
|
|
38
|
+
Pede coisas como "procura leite meio-gordo no Auchan" ou "junta 2 pacotes ao carrinho do Auchan".
|
|
39
|
+
|
|
40
|
+
| Ferramenta | Para quê |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `search_products` | Pesquisar o catálogo (devolve JSON) |
|
|
43
|
+
| `get_cart` | Ver o carrinho |
|
|
44
|
+
| `add_to_cart` / `update_cart_item` | Juntar um produto / mudar a quantidade (0 tira-o) |
|
|
45
|
+
| `login` | Ligar a tua conta: abre a janela de login (as ferramentas do carrinho fazem-no sozinhas se for preciso) |
|
|
46
|
+
| `logout` | Desligar a conta: apaga a sessão guardada neste computador |
|
|
47
|
+
| `close_session` | Libertar recursos |
|
|
48
|
+
|
|
49
|
+
## Mais
|
|
50
|
+
|
|
51
|
+
- **Problemas:** [docs/troubleshooting.md](docs/troubleshooting.md).
|
|
52
|
+
- **Testes:** `npm test` corre sem internet. `LIVE=1` liga um teste que faz um pedido real ao Auchan.pt (no PowerShell: `$env:LIVE=1; npm test`).
|
|
53
|
+
|
|
54
|
+
## Licença
|
|
55
|
+
|
|
56
|
+
[MIT](LICENSE)
|