kleinanzeigen-mcp-v2 1.0.1 → 1.0.2

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/README.en.md ADDED
@@ -0,0 +1,62 @@
1
+ # Kleinanzeigen MCP Server (English summary)
2
+
3
+ 🇩🇪 The main documentation is in German: [README.md](./README.md). This page is a short English summary.
4
+
5
+ An MCP server (spec 2026-07-28) for [kleinanzeigen.de](https://www.kleinanzeigen.de), Germany's largest classifieds
6
+ site:
7
+
8
+ - **Search** reads the public search and listing pages directly. No account or extra software needed.
9
+ - **Your own ads** are files in a local workspace (`~/Kleinanzeigen`). Publishing, updating, deleting, reserving,
10
+ extending and importing are done by [kleinanzeigen-bot](https://github.com/Second-Hand-Friends/kleinanzeigen-bot),
11
+ which drives a browser signed in to your account.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ claude mcp add kleinanzeigen \
17
+ --env KLEINANZEIGEN_BOT_USERNAME=you@example.com \
18
+ --env KLEINANZEIGEN_BOT_PASSWORD=your-password \
19
+ --env KLEINANZEIGEN_UPLOAD_DIRS=$HOME/Pictures/sell \
20
+ -- npx -y kleinanzeigen-mcp-v2
21
+ ```
22
+
23
+ For search only, leave out the `KLEINANZEIGEN_BOT_*` variables. For your own ads:
24
+
25
+ 1. Install the [kleinanzeigen-bot](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases) binary and put
26
+ it on `PATH` (or set `KLEINANZEIGEN_BOT_PATH`). Drafts and category fields need the `preview` release.
27
+ 2. Sign in once in a terminal (SMS code or CAPTCHA may be required):
28
+ `npx -y kleinanzeigen-mcp-v2 login`
29
+ 3. Ask your assistant to run `kleinanzeigen_check_setup`.
30
+
31
+ ## Tools
32
+
33
+ - **Search:** `kleinanzeigen_search`, `kleinanzeigen_get_listing`
34
+ - **Local ads:** `kleinanzeigen_list_local_ads`, `kleinanzeigen_verify_ads`, `kleinanzeigen_create_ad`,
35
+ `kleinanzeigen_update_ad`, `kleinanzeigen_delete_local_ad`
36
+ - **Your account:** `kleinanzeigen_list_my_ads`, `kleinanzeigen_get_category_fields`, `kleinanzeigen_publish_ads`,
37
+ `kleinanzeigen_save_drafts`, `kleinanzeigen_update_online_ads`, `kleinanzeigen_set_ads_reserved`,
38
+ `kleinanzeigen_extend_ads`, `kleinanzeigen_delete_online_ads`, `kleinanzeigen_import_online_ads`
39
+ - **Setup:** `kleinanzeigen_check_setup`
40
+
41
+ Publishing, updating and deleting ask for confirmation first. If your client declines the confirmation dialog
42
+ automatically, set `KLEINANZEIGEN_CONFIRMATION=tool`.
43
+
44
+ ## Configuration
45
+
46
+ | Variable | Default | Meaning |
47
+ |---|---|---|
48
+ | `KLEINANZEIGEN_BOT_USERNAME` / `_PASSWORD` | – | Your Kleinanzeigen login |
49
+ | `KLEINANZEIGEN_WORKSPACE` | `~/Kleinanzeigen` | `config.yaml`, `ads/`, browser profile |
50
+ | `KLEINANZEIGEN_BOT_PATH` | `kleinanzeigen-bot` on `PATH` | The bot executable |
51
+ | `KLEINANZEIGEN_UPLOAD_DIRS` | – | Folders whose images may be used in ads |
52
+ | `KLEINANZEIGEN_READ_ONLY` | `false` | Register only read tools |
53
+ | `KLEINANZEIGEN_HEADLESS` | `true` | `false` shows the bot's browser |
54
+ | `KLEINANZEIGEN_CONFIRMATION` | `elicitation` | `tool`: no dialog, `confirm: true` required |
55
+
56
+ ## Disclaimer
57
+
58
+ Independent community project, not affiliated with Kleinanzeigen or the kleinanzeigen-bot project. Automated access
59
+ may conflict with the Kleinanzeigen terms of use; use it in moderation, for your own account only, at your own risk.
60
+ kleinanzeigen-bot (AGPL-3.0) is installed separately and only started as an external program.
61
+
62
+ License: [MIT](./LICENSE)
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Kleinanzeigen MCP Server — Search and Sell on Kleinanzeigen.de with AI Assistants
1
+ # Kleinanzeigen MCP Server – Suchen und Verkaufen auf Kleinanzeigen.de mit KI-Assistenten
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/kleinanzeigen-mcp-v2?color=CB3837&logo=npm)](https://www.npmjs.com/package/kleinanzeigen-mcp-v2)
4
4
  [![MCP 2026-07-28](https://img.shields.io/badge/MCP-2026--07--28-1C1917)](https://modelcontextprotocol.io/specification/2026-07-28)
@@ -7,55 +7,59 @@
7
7
  [![CI](https://github.com/JohnnyTheTank/kleinanzeigen-mcp-v2/actions/workflows/ci.yml/badge.svg)](https://github.com/JohnnyTheTank/kleinanzeigen-mcp-v2/actions/workflows/ci.yml)
8
8
  [![MIT licensed](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
9
9
 
10
- ## ❌ Without Kleinanzeigen MCP
10
+ 🇬🇧 English version: [README.en.md](./README.en.md)
11
11
 
12
- - ❌ The assistant cannot see what is offered near you right now, or what comparable items really sell for
13
- - ❌ You open listing after listing to compare condition, shipping and seller
14
- - ❌ You type every ad into the Kleinanzeigen form by hand, then do it again to republish or extend it
12
+ ## ❌ Ohne Kleinanzeigen MCP
15
13
 
16
- ## ✅ With Kleinanzeigen MCP
14
+ - ❌ Der Assistent sieht nicht, was gerade in deiner Nähe angeboten wird oder was Vergleichbares wirklich kostet
15
+ - ❌ Du öffnest Anzeige um Anzeige, um Zustand, Versand und Verkäufer zu vergleichen
16
+ - ❌ Du tippst jede Anzeige von Hand ins Kleinanzeigen-Formular und wiederholst das zum Neueinstellen oder Verlängern
17
17
 
18
- The assistant searches Kleinanzeigen live and manages the ads in your own account.
18
+ ## ✅ Mit Kleinanzeigen MCP
19
+
20
+ Der Assistent durchsucht Kleinanzeigen live und verwaltet die Anzeigen in deinem eigenen Konto.
19
21
 
20
22
  ```txt
21
- Find a 28" Gazelle women's bike within 20 km of 10115 for at most 300 €, compare the 5 best offers.
23
+ Finde ein Gazelle-Damenrad 28 Zoll im Umkreis von 20 km um 10115 für höchstens 300 € und vergleiche die 5 besten Angebote.
22
24
  ```
23
25
 
24
26
  ```txt
25
- I want to sell my Bosch PSR 18 drill (2 batteries, case, used twice). Check prices nearby, write the ad
26
- from the photos in ~/Pictures/verkaufen and publish it after I approve.
27
+ Ich möchte meinen Bosch PSR 18 verkaufen (2 Akkus, Koffer, zweimal benutzt). Prüf die Preise in der Nähe, schreib
28
+ die Anzeige mit den Fotos aus ~/Pictures/verkaufen und veröffentliche sie, nachdem ich zugestimmt habe.
27
29
  ```
28
30
 
29
31
  ```txt
30
- Which of my ads expire this week? Extend them and mark the sofa as reserved.
32
+ Welche meiner Anzeigen laufen diese Woche ab? Verlängere sie und markiere das Sofa als reserviert.
31
33
  ```
32
34
 
33
- Two parts work together:
35
+ Zwei Teile arbeiten zusammen:
34
36
 
35
- - **Search** reads the public search and listing pages of kleinanzeigen.de directly. No account, no extra software.
36
- - **Your ads** are files in a local workspace. Publishing, updating, deleting, reserving, extending and importing
37
- are done by [kleinanzeigen-bot](https://github.com/Second-Hand-Friends/kleinanzeigen-bot), which drives a
38
- browser signed in to your account. This server writes the ad files, starts the bot and reports the result.
37
+ - **Die Suche** liest die öffentlichen Such- und Anzeigenseiten von kleinanzeigen.de direkt. Kein Konto, keine
38
+ zusätzliche Software.
39
+ - **Deine Anzeigen** sind Dateien in einem lokalen Arbeitsordner. Veröffentlichen, Aktualisieren, Löschen,
40
+ Reservieren, Verlängern und Importieren übernimmt
41
+ [kleinanzeigen-bot](https://github.com/Second-Hand-Friends/kleinanzeigen-bot). Er steuert einen Browser, der in
42
+ deinem Konto angemeldet ist. Dieser Server schreibt die Anzeigendateien, startet den Bot und meldet das Ergebnis.
39
43
 
40
44
  ## 🚀 Installation
41
45
 
42
46
  > [!NOTE]
43
- > **Searching works right away.** For your own ads you also need
44
- > [kleinanzeigen-bot](https://github.com/Second-Hand-Friends/kleinanzeigen-bot#installation) and a Chromium
45
- > based browser (Chrome, Chromium or Edge).
47
+ > **Die Suche funktioniert sofort.** Für eigene Anzeigen brauchst du zusätzlich
48
+ > [kleinanzeigen-bot](https://github.com/Second-Hand-Friends/kleinanzeigen-bot#installation) und einen
49
+ > Chromium-basierten Browser (Chrome, Chromium oder Edge).
46
50
 
47
- ### 1. Add the server to your client
51
+ ### 1. Server im Client eintragen
48
52
 
49
- The server is published on npm as [`kleinanzeigen-mcp-v2`](https://www.npmjs.com/package/kleinanzeigen-mcp-v2)
50
- and runs with `npx` (Node.js 22 or later).
53
+ Der Server ist auf npm als [`kleinanzeigen-mcp-v2`](https://www.npmjs.com/package/kleinanzeigen-mcp-v2)
54
+ veröffentlicht und läuft mit `npx` (Node.js 22 oder neuer).
51
55
 
52
56
  <details>
53
57
  <summary><b>Claude Code</b></summary>
54
58
 
55
59
  ```bash
56
60
  claude mcp add kleinanzeigen \
57
- --env KLEINANZEIGEN_BOT_USERNAME=you@example.com \
58
- --env KLEINANZEIGEN_BOT_PASSWORD=your-password \
61
+ --env KLEINANZEIGEN_BOT_USERNAME=du@example.com \
62
+ --env KLEINANZEIGEN_BOT_PASSWORD=dein-passwort \
59
63
  --env KLEINANZEIGEN_UPLOAD_DIRS=$HOME/Pictures/verkaufen \
60
64
  -- npx -y kleinanzeigen-mcp-v2
61
65
  ```
@@ -65,7 +69,7 @@ claude mcp add kleinanzeigen \
65
69
  <details>
66
70
  <summary><b>Claude Desktop</b></summary>
67
71
 
68
- Add this to `claude_desktop_config.json` (Settings → Developer → Edit Config):
72
+ Trag das in `claude_desktop_config.json` ein (Einstellungen → Entwickler → Konfiguration bearbeiten):
69
73
 
70
74
  ```json
71
75
  {
@@ -74,34 +78,36 @@ Add this to `claude_desktop_config.json` (Settings → Developer → Edit Config
74
78
  "command": "npx",
75
79
  "args": ["-y", "kleinanzeigen-mcp-v2"],
76
80
  "env": {
77
- "KLEINANZEIGEN_BOT_USERNAME": "you@example.com",
78
- "KLEINANZEIGEN_BOT_PASSWORD": "your-password",
79
- "KLEINANZEIGEN_UPLOAD_DIRS": "/Users/you/Pictures/verkaufen"
81
+ "KLEINANZEIGEN_BOT_USERNAME": "du@example.com",
82
+ "KLEINANZEIGEN_BOT_PASSWORD": "dein-passwort",
83
+ "KLEINANZEIGEN_UPLOAD_DIRS": "/Users/du/Pictures/verkaufen"
80
84
  }
81
85
  }
82
86
  }
83
87
  }
84
88
  ```
85
89
 
86
- As an alternative, `npm run pack:mcpb` builds a one-click `.mcpb` bundle that asks for these values on install.
90
+ Alternativ baut `npm run pack:mcpb` ein `.mcpb`-Paket zur Ein-Klick-Installation, das diese Werte bei der
91
+ Installation abfragt.
87
92
 
88
93
  </details>
89
94
 
90
95
  <details>
91
- <summary><b>Cursor / VS Code / others</b></summary>
96
+ <summary><b>Cursor / VS Code / andere</b></summary>
92
97
 
93
- Any client that starts stdio servers works: command `npx`, arguments `-y kleinanzeigen-mcp-v2`, and the
94
- environment variables from [Configuration](#️-configuration).
98
+ Jeder Client, der stdio-Server startet, funktioniert: Befehl `npx`, Argumente `-y kleinanzeigen-mcp-v2` und die
99
+ Umgebungsvariablen aus der [Konfiguration](#️-konfiguration).
95
100
 
96
101
  </details>
97
102
 
98
- For search only, leave out the `KLEINANZEIGEN_BOT_*` variables, or set `KLEINANZEIGEN_READ_ONLY=true`.
103
+ Nur zum Suchen lässt du die `KLEINANZEIGEN_BOT_*`-Variablen weg oder setzt `KLEINANZEIGEN_READ_ONLY=true`.
99
104
 
100
- ### 2. Install kleinanzeigen-bot (for your own ads)
105
+ ### 2. kleinanzeigen-bot installieren (für eigene Anzeigen)
101
106
 
102
- Download the release binary for your system from the
103
- [kleinanzeigen-bot releases](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/tag/latest)
104
- and put it on your `PATH`, or point `KLEINANZEIGEN_BOT_PATH` to it. Example for macOS on Apple silicon:
107
+ Lade die fertige Programmdatei für dein System von den
108
+ [kleinanzeigen-bot-Releases](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/tag/latest) herunter
109
+ und leg sie in einen Ordner in deinem `PATH`, oder setz `KLEINANZEIGEN_BOT_PATH` auf sie. Beispiel für macOS mit
110
+ Apple-Chip:
105
111
 
106
112
  ```bash
107
113
  curl -L -o ~/.local/bin/kleinanzeigen-bot https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/download/latest/kleinanzeigen-bot-darwin-arm64
@@ -111,193 +117,205 @@ curl -L -o ~/.local/bin/kleinanzeigen-bot https://github.com/Second-Hand-Friends
111
117
  chmod 755 ~/.local/bin/kleinanzeigen-bot
112
118
  ```
113
119
 
114
- Check the asset names on the release page; they follow `kleinanzeigen-bot-<os>-<arch>`.
120
+ Die Dateinamen auf der Release-Seite folgen dem Muster `kleinanzeigen-bot-<os>-<arch>`.
115
121
 
116
122
  > [!IMPORTANT]
117
- > The `latest` release of 2026-11-15 has no `draft` and `fields` commands, so `kleinanzeigen_save_drafts` and
118
- > `kleinanzeigen_get_category_fields` need the
119
- > [`preview` release](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/tag/preview) (same asset
120
- > names, replace `latest` with `preview` in the URL). All other tools work with `latest`.
121
- > `kleinanzeigen_check_setup` lists the tools your installed bot cannot run.
123
+ > Das Release `latest` vom 15.11.2026 hat die Befehle `draft` und `fields` noch nicht. Für
124
+ > `kleinanzeigen_save_drafts` und `kleinanzeigen_get_category_fields` brauchst du das Release
125
+ > [`preview`](https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/tag/preview) (gleiche Dateinamen,
126
+ > in der URL `latest` durch `preview` ersetzen). Alle anderen Tools funktionieren mit `latest`.
127
+ > `kleinanzeigen_check_setup` zeigt, welche Tools dein installierter Bot nicht ausführen kann.
122
128
 
123
- ### 3. Sign in once
129
+ ### 3. Einmal anmelden
124
130
 
125
- Kleinanzeigen asks for an SMS or e-mail code, and sometimes a CAPTCHA, the first time a browser signs in. Do
126
- that once in a terminal, with the same environment as your MCP server:
131
+ Wenn sich ein Browser zum ersten Mal anmeldet, verlangt Kleinanzeigen einen Code per SMS oder E-Mail, manchmal auch
132
+ ein CAPTCHA. Das erledigst du einmal im Terminal, mit denselben Umgebungsvariablen wie dein MCP-Server:
127
133
 
128
134
  ```bash
129
- KLEINANZEIGEN_BOT_USERNAME=you@example.com KLEINANZEIGEN_BOT_PASSWORD=your-password npx -y kleinanzeigen-mcp-v2 login
135
+ KLEINANZEIGEN_BOT_USERNAME=du@example.com KLEINANZEIGEN_BOT_PASSWORD=dein-passwort npx -y kleinanzeigen-mcp-v2 login
130
136
  ```
131
137
 
132
- A browser window opens. Finish the sign-in there, then press ENTER in the terminal. The session is stored in the
133
- workspace's browser profile (`~/Kleinanzeigen/.browser-profile`), so later runs work in the background
134
- (headless). If Kleinanzeigen asks again later, the tools say so and you run `login` again.
138
+ Es öffnet sich ein Browserfenster. Schließ dort die Anmeldung ab und drück dann im Terminal ENTER. Die Sitzung wird
139
+ im Browserprofil des Arbeitsordners gespeichert (`~/Kleinanzeigen/.browser-profile`), spätere Läufe arbeiten deshalb
140
+ im Hintergrund (headless). Fragt Kleinanzeigen später erneut nach, sagen die Tools das, und du führst `login`
141
+ noch einmal aus.
135
142
 
136
- Ask your assistant to run `kleinanzeigen_check_setup` to confirm everything is in place.
143
+ Lass deinen Assistenten `kleinanzeigen_check_setup` aufrufen, um zu prüfen, ob alles eingerichtet ist.
137
144
 
138
- ## 💡 Important Tips
145
+ ## 💡 Wichtige Tipps
139
146
 
140
- ### Set your contact data once
147
+ ### Kontaktdaten einmal hinterlegen
141
148
 
142
- The postcode decides where your ads are shown. Fill in `ad_defaults.contact` in `~/Kleinanzeigen/config.yaml`
143
- (created on first use, or with `npx -y kleinanzeigen-mcp-v2 init`), or pass `contact` with every ad.
149
+ Die Postleitzahl bestimmt, wo deine Anzeigen erscheinen. Trag `ad_defaults.contact` in `~/Kleinanzeigen/config.yaml`
150
+ ein (die Datei entsteht beim ersten Aufruf oder mit `npx -y kleinanzeigen-mcp-v2 init`), oder gib `contact` bei
151
+ jeder Anzeige mit.
144
152
 
145
- ### Public actions ask first
153
+ ### Öffentliche Aktionen fragen vorher
146
154
 
147
- Publishing, updating and deleting online ads, and deleting local ad files, always need your confirmation:
155
+ Veröffentlichen, Aktualisieren und Löschen von Online-Anzeigen sowie das Löschen lokaler Anzeigendateien brauchen
156
+ immer deine Bestätigung:
148
157
 
149
- - If your client supports elicitation, it shows a confirmation dialog.
150
- - Otherwise the tool refuses until the model passes `confirm: true`, which it should do only after you approve.
158
+ - Unterstützt dein Client Bestätigungsdialoge (Elicitation), zeigt er einen Dialog.
159
+ - Sonst verweigert das Tool die Aktion, bis das Modell `confirm: true` mitgibt. Das soll es erst tun, nachdem du
160
+ zugestimmt hast.
151
161
 
152
- Some clients advertise confirmation dialogs but answer them with an automatic "decline", so the action never
153
- runs. If a publish fails with "The confirmation dialog was declined" although you saw no dialog, set
154
- `KLEINANZEIGEN_CONFIRMATION=tool`. The server then shows no dialog and requires `confirm: true`; your client's
155
- own tool approval (for example Claude Code's permission prompt for `kleinanzeigen_publish_ads`) is the checkpoint.
162
+ Manche Clients geben an, Bestätigungsdialoge zu unterstützen, lehnen sie aber automatisch ab, sodass die Aktion nie
163
+ läuft. Scheitert das Veröffentlichen mit „The confirmation dialog was declined“, obwohl du keinen Dialog gesehen
164
+ hast, setz `KLEINANZEIGEN_CONFIRMATION=tool`. Dann zeigt der Server keinen Dialog und verlangt `confirm: true`. Die
165
+ Kontrolle übernimmt die Tool-Freigabe deines Clients, zum Beispiel die Berechtigungsabfrage von Claude Code für
166
+ `kleinanzeigen_publish_ads`.
156
167
 
157
- Drafts (`kleinanzeigen_save_drafts`) are private, so you can review an ad in your account before it goes live.
168
+ Entwürfe (`kleinanzeigen_save_drafts`) sind privat. So kannst du eine Anzeige in deinem Konto prüfen, bevor sie
169
+ online geht.
158
170
 
159
- ### Search politely
171
+ ### Rücksichtsvoll suchen
160
172
 
161
- The server waits at least one second between requests to kleinanzeigen.de and identifies itself with an honest
162
- User-Agent. Too many requests lead to blocks; the tools then return a clear error. Prefer one well-filtered
163
- search over many broad ones.
173
+ Der Server wartet zwischen zwei Anfragen an kleinanzeigen.de mindestens eine Sekunde und meldet sich mit einem
174
+ ehrlichen User-Agent. Zu viele Anfragen führen zu Sperren, die Tools melden das dann klar. Eine gut gefilterte Suche
175
+ ist besser als viele breite.
164
176
 
165
- ### Add a rule
177
+ ### Regel hinzufügen
166
178
 
167
179
  ```txt
168
- When I ask about buying or selling second-hand items in Germany, use the kleinanzeigen tools.
169
- Before publishing anything, show me title, description, price and photos.
180
+ Wenn ich nach Kaufen oder Verkaufen von Gebrauchtem in Deutschland frage, nutze die kleinanzeigen-Tools.
181
+ Zeig mir Titel, Beschreibung, Preis und Fotos, bevor du etwas veröffentlichst.
170
182
  ```
171
183
 
172
- ## 🛠️ Available Tools
184
+ ## 🛠️ Verfügbare Tools
173
185
 
174
- ### Search (no account needed)
186
+ ### Suche (ohne Konto)
175
187
 
176
- | Tool | What it does |
188
+ | Tool | Was es macht |
177
189
  |---|---|
178
- | `kleinanzeigen_search` | Keywords, place + radius, price range, category, offer/wanted, private/commercial, sorting, pages of 25 |
179
- | `kleinanzeigen_get_listing` | Full listing by id or URL: description, attributes, all images, shipping, location, public seller info |
190
+ | `kleinanzeigen_search` | Stichwörter, Ort + Umkreis, Preisspanne, Kategorie, Angebot/Gesuch, privat/gewerblich, Sortierung, Seiten mit 25 Treffern. Vorschläge außerhalb der Suche kommen getrennt als `nearby_items`. |
191
+ | `kleinanzeigen_get_listing` | Vollständige Anzeige per ID oder URL: Beschreibung, Merkmale, alle Bilder, Versand, Ort, öffentliche Verkäuferinfos |
180
192
 
181
- ### Your ads
193
+ ### Deine Anzeigen
182
194
 
183
- | Tool | What it does |
195
+ | Tool | Was es macht |
184
196
  |---|---|
185
- | `kleinanzeigen_list_local_ads` | Ads in the workspace, with online id and the bot's status (draft, changed, due, …) |
186
- | `kleinanzeigen_verify_ads` | Offline check of `config.yaml` and the ad files |
187
- | `kleinanzeigen_list_my_ads` | Ads in your Kleinanzeigen account: id, title, status, expiry |
188
- | `kleinanzeigen_get_category_fields` | Form fields of a category, including `special_attributes` keys and values |
189
- | `kleinanzeigen_create_ad` | Writes a new ad file and copies its images (local only) |
190
- | `kleinanzeigen_update_ad` | Changes fields of a local ad file |
191
- | `kleinanzeigen_delete_local_ad` | Removes an ad folder from the workspace (asks first) |
192
- | `kleinanzeigen_publish_ads` | Publishes ads, or re-posts them with `republish: true` (asks first) |
193
- | `kleinanzeigen_save_drafts` | Saves new ads as private drafts in your account |
194
- | `kleinanzeigen_update_online_ads` | Applies local changes to online ads in place (asks first) |
195
- | `kleinanzeigen_set_ads_reserved` | Marks ads as reserved, or active again |
196
- | `kleinanzeigen_extend_ads` | Extends ads that expire within 8 days |
197
- | `kleinanzeigen_delete_online_ads` | Deletes ads from your account (asks first) |
198
- | `kleinanzeigen_import_online_ads` | Downloads ads from your account into the workspace |
199
- | `kleinanzeigen_check_setup` | Bot found? Workspace, credentials, browser session, next steps |
200
-
201
- With `KLEINANZEIGEN_READ_ONLY=true` only the read tools are registered.
202
-
203
- ### Resources & prompts
204
-
205
- - `kleinanzeigen://guide/ad-fields`: how to fill in every ad field, with allowed values
206
- - `kleinanzeigen://local-ad/{name}`: a local ad as JSON (listable)
207
- - Prompts `find_deal` (search and compare) and `create_ad` (price research, write, publish)
208
-
209
- ## ⚙️ Configuration
210
-
211
- | Variable | Default | Meaning |
197
+ | `kleinanzeigen_list_local_ads` | Anzeigen im Arbeitsordner, mit Online-ID und Status laut Bot (draft, changed, due, …) |
198
+ | `kleinanzeigen_verify_ads` | Offline-Prüfung von `config.yaml` und den Anzeigendateien |
199
+ | `kleinanzeigen_list_my_ads` | Anzeigen in deinem Kleinanzeigen-Konto: ID, Titel, Status, Ablaufdatum |
200
+ | `kleinanzeigen_get_category_fields` | Formularfelder einer Kategorie, inklusive Schlüssel und Werte für `special_attributes` |
201
+ | `kleinanzeigen_create_ad` | Legt eine neue Anzeigendatei an und kopiert die Bilder (nur lokal) |
202
+ | `kleinanzeigen_update_ad` | Ändert Felder einer lokalen Anzeigendatei |
203
+ | `kleinanzeigen_delete_local_ad` | Entfernt einen Anzeigenordner aus dem Arbeitsordner (fragt vorher) |
204
+ | `kleinanzeigen_publish_ads` | Veröffentlicht Anzeigen oder stellt sie mit `republish: true` neu ein (fragt vorher) |
205
+ | `kleinanzeigen_save_drafts` | Speichert neue Anzeigen als private Entwürfe in deinem Konto |
206
+ | `kleinanzeigen_update_online_ads` | Überträgt lokale Änderungen auf die Online-Anzeigen, ohne sie neu einzustellen (fragt vorher) |
207
+ | `kleinanzeigen_set_ads_reserved` | Markiert Anzeigen als reserviert oder wieder als aktiv |
208
+ | `kleinanzeigen_extend_ads` | Verlängert Anzeigen, die innerhalb von 8 Tagen ablaufen |
209
+ | `kleinanzeigen_delete_online_ads` | Löscht Anzeigen aus deinem Konto (fragt vorher) |
210
+ | `kleinanzeigen_import_online_ads` | Lädt Anzeigen aus deinem Konto in den Arbeitsordner |
211
+ | `kleinanzeigen_check_setup` | Bot gefunden? Arbeitsordner, Zugangsdaten, Browser-Sitzung, nächste Schritte |
212
+
213
+ Mit `KLEINANZEIGEN_READ_ONLY=true` werden nur die lesenden Tools registriert.
214
+
215
+ ### Ressourcen und Prompts
216
+
217
+ - `kleinanzeigen://guide/ad-fields`: wie jedes Anzeigenfeld ausgefüllt wird, mit erlaubten Werten
218
+ - `kleinanzeigen://local-ad/{name}`: eine lokale Anzeige als JSON (auflistbar)
219
+ - Prompts `find_deal` (suchen und vergleichen) und `create_ad` (Preise recherchieren, schreiben, veröffentlichen)
220
+
221
+ Die Texte, die das Modell liest (Tool-Beschreibungen, Hinweise, Fehlermeldungen), sind englisch. Das ändert nichts
222
+ daran, dass der Assistent mit dir Deutsch spricht und deutsche Anzeigen schreibt.
223
+
224
+ ## ⚙️ Konfiguration
225
+
226
+ | Variable | Standard | Bedeutung |
212
227
  |---|---|---|
213
- | `KLEINANZEIGEN_BOT_USERNAME` / `KLEINANZEIGEN_BOT_PASSWORD` | – | Your Kleinanzeigen login, read by the bot through `config.yaml` |
214
- | `KLEINANZEIGEN_WORKSPACE` | `~/Kleinanzeigen` | `config.yaml`, `ads/` and the browser profile |
215
- | `KLEINANZEIGEN_BOT_PATH` | `kleinanzeigen-bot` on `PATH` | The bot executable |
216
- | `KLEINANZEIGEN_UPLOAD_DIRS` | – | Comma-separated folders whose images may be used in ads |
217
- | `KLEINANZEIGEN_READ_ONLY` | `false` | Register only read tools |
218
- | `KLEINANZEIGEN_HEADLESS` | `true` | `false` shows the bot's browser window |
219
- | `KLEINANZEIGEN_CONFIRMATION` | `elicitation` | `tool` skips the server's confirmation dialog and requires `confirm: true` |
220
- | `KLEINANZEIGEN_BOT_TIMEOUT_MS` | `600000` | Limit for one bot run |
221
- | `KLEINANZEIGEN_TIMEOUT_MS` | `20000` | Limit for one kleinanzeigen.de page request |
222
- | `KLEINANZEIGEN_MIN_INTERVAL_MS` | `1000` | Minimum pause between page requests |
223
- | `LOG_LEVEL` | `info` | Logs go to stderr |
224
-
225
- The workspace layout:
228
+ | `KLEINANZEIGEN_BOT_USERNAME` / `KLEINANZEIGEN_BOT_PASSWORD` | – | Dein Kleinanzeigen-Login, liest der Bot über `config.yaml` |
229
+ | `KLEINANZEIGEN_WORKSPACE` | `~/Kleinanzeigen` | `config.yaml`, `ads/` und das Browserprofil |
230
+ | `KLEINANZEIGEN_BOT_PATH` | `kleinanzeigen-bot` im `PATH` | Die Programmdatei des Bots |
231
+ | `KLEINANZEIGEN_UPLOAD_DIRS` | – | Kommagetrennte Ordner, deren Bilder in Anzeigen verwendet werden dürfen |
232
+ | `KLEINANZEIGEN_READ_ONLY` | `false` | Nur lesende Tools registrieren |
233
+ | `KLEINANZEIGEN_HEADLESS` | `true` | `false` zeigt das Browserfenster des Bots |
234
+ | `KLEINANZEIGEN_CONFIRMATION` | `elicitation` | `tool` lässt den Bestätigungsdialog des Servers weg und verlangt `confirm: true` |
235
+ | `KLEINANZEIGEN_BOT_TIMEOUT_MS` | `600000` | Zeitlimit für einen Bot-Lauf |
236
+ | `KLEINANZEIGEN_TIMEOUT_MS` | `20000` | Zeitlimit für eine Seitenanfrage an kleinanzeigen.de |
237
+ | `KLEINANZEIGEN_MIN_INTERVAL_MS` | `1000` | Mindestpause zwischen zwei Seitenanfragen |
238
+ | `LOG_LEVEL` | `info` | Logs gehen nach stderr |
239
+
240
+ Aufbau des Arbeitsordners:
226
241
 
227
242
  ```txt
228
243
  ~/Kleinanzeigen/
229
- ├── config.yaml kleinanzeigen-bot configuration (yours to edit, never overwritten)
230
- ├── .kleinanzeigen-mcp-run.yaml derived per run (scope and headless switch)
231
- ├── .browser-profile/ signed-in browser session
244
+ ├── config.yaml Konfiguration von kleinanzeigen-bot (darfst du bearbeiten, wird nie überschrieben)
245
+ ├── .kleinanzeigen-mcp-run.yaml pro Lauf abgeleitet (Auswahl der Anzeigen, headless)
246
+ ├── .browser-profile/ angemeldete Browser-Sitzung
232
247
  └── ads/
233
248
  └── damenrad-28-zoll/
234
249
  ├── ad_damenrad-28-zoll.yaml
235
250
  └── images/01-front.jpg
236
251
  ```
237
252
 
238
- The ad files are plain kleinanzeigen-bot files, so you can also run the bot yourself in that folder.
253
+ Die Anzeigendateien sind normale kleinanzeigen-bot-Dateien. Du kannst den Bot in diesem Ordner also auch selbst
254
+ ausführen.
239
255
 
240
- ## 📐 MCP 2026-07-28 Compliance
256
+ ## 📐 MCP-2026-07-28-Konformität
241
257
 
242
- - **Protocol negotiation:** `server/discover` and the per-request `_meta` envelope are handled by the SDK
243
- (`@modelcontextprotocol/server` v2). 2025-era clients fall back to `initialize` and are served from the same code.
244
- - **Multi-round-trip requests (MRTR):** confirmations return `input_required` with an embedded elicitation. On
245
- 2025-era connections the SDK turns that into an `elicitation/create` request.
246
- - **Structured output:** every tool has an `outputSchema` and returns matching `structuredContent`.
247
- - **Progress:** long bot runs send `notifications/progress` when the client passes a progress token.
248
- - **Cache hints** on `tools/list`, `prompts/list`, resource templates, `server/discover` and resource reads.
249
- - **Deterministic tool order** and **no deprecated features** (logs go to stderr, no sampling or roots).
258
+ - **Protokoll-Aushandlung:** `server/discover` und der `_meta`-Umschlag pro Anfrage laufen über das SDK
259
+ (`@modelcontextprotocol/server` v2). Clients aus 2025 fallen auf `initialize` zurück und werden vom selben Code
260
+ bedient.
261
+ - **Mehrstufige Anfragen (MRTR):** Bestätigungen liefern `input_required` mit eingebetteter Elicitation. Bei
262
+ Verbindungen nach 2025er-Spezifikation macht das SDK daraus eine `elicitation/create`-Anfrage.
263
+ - **Strukturierte Ausgabe:** Jedes Tool hat ein `outputSchema` und liefert passenden `structuredContent`.
264
+ - **Fortschritt:** Lange Bot-Läufe senden `notifications/progress`, wenn der Client ein Progress-Token mitschickt.
265
+ - **Cache-Hinweise** für `tools/list`, `prompts/list`, Ressourcen-Vorlagen, `server/discover` und Ressourcen-Abrufe.
266
+ - **Feste Reihenfolge der Tools** und **keine veralteten Funktionen** (Logs nach stderr, kein Sampling, keine Roots).
250
267
 
251
- ## 🔒 Security
268
+ ## 🔒 Sicherheit
252
269
 
253
- - **Credentials** stay in your MCP configuration and the bot's environment. The model never sees or types them,
254
- and the server never logs them. The sign-in itself happens in the bot's browser.
255
- - **Confirmation** for public and destructive actions (see [Important Tips](#public-actions-ask-first)).
256
- - **Local files:** images are only read from `KLEINANZEIGEN_UPLOAD_DIRS`, never from hidden folders, symlinks are
257
- resolved first, and only JPG/PNG/WebP up to 20 MB are accepted.
258
- - **Page requests** go to kleinanzeigen.de only, never carry cookies, and are rate limited.
259
- - **Bot runs** are serialized, time limited, cancellable, get no stdin and run with the workspace as working
260
- directory. The workspace is created with mode `0700`.
261
- - **stdio only:** the server needs your local browser profile and files, so there is no HTTP mode.
270
+ - **Zugangsdaten** bleiben in deiner MCP-Konfiguration und der Umgebung des Bots. Das Modell sieht oder tippt sie
271
+ nie, und der Server schreibt sie nie ins Log. Die Anmeldung selbst passiert im Browser des Bots.
272
+ - **Bestätigung** für öffentliche und zerstörende Aktionen (siehe [Wichtige Tipps](#öffentliche-aktionen-fragen-vorher)).
273
+ - **Lokale Dateien:** Bilder werden nur aus `KLEINANZEIGEN_UPLOAD_DIRS` gelesen, nie aus versteckten Ordnern.
274
+ Symlinks werden vorher aufgelöst, und nur JPG, PNG und WebP bis 20 MB werden angenommen.
275
+ - **Seitenanfragen** gehen nur an kleinanzeigen.de, senden nie Cookies mit und sind gedrosselt.
276
+ - **Bot-Läufe** laufen nacheinander, mit Zeitlimit, abbrechbar, ohne Eingabe (stdin) und mit dem Arbeitsordner als
277
+ Arbeitsverzeichnis. Der Arbeitsordner wird mit den Rechten `0700` angelegt.
278
+ - **Nur stdio:** Der Server braucht dein lokales Browserprofil und deine Dateien, deshalb gibt es keinen HTTP-Modus.
262
279
 
263
- ## 🧑‍💻 Development
280
+ ## 🧑‍💻 Entwicklung
264
281
 
265
282
  ```bash
266
- npm run dev # stdio via tsx
267
- npm test # vitest: parsers, all tools against a fake bot, both protocol eras
283
+ npm run dev # stdio über tsx
284
+ npm test # vitest: Parser, alle Tools gegen einen Fake-Bot, beide Protokoll-Generationen
268
285
  npm run lint # biome
269
286
  npm run typecheck
270
- npm run inspect # MCP Inspector against dist/index.js
287
+ npm run inspect # MCP Inspector gegen dist/index.js
271
288
  ```
272
289
 
273
- The tests use synthetic HTML fixtures that mirror the live pages, and `test/helpers/fake-bot.mjs` in place of
274
- kleinanzeigen-bot.
290
+ Die Tests nutzen synthetische HTML-Fixtures, die den echten Seiten nachgebaut sind, und `test/helpers/fake-bot.mjs`
291
+ anstelle von kleinanzeigen-bot.
275
292
 
276
- ## ⚠️ Known Limitations
293
+ ## ⚠️ Bekannte Einschränkungen
277
294
 
278
- - **No official API:** search reads the HTML of kleinanzeigen.de. When Kleinanzeigen changes its pages, results
279
- can be incomplete until the parser is updated. Please open an issue.
280
- - **Bot protection:** Kleinanzeigen may block too many requests (HTTP 429/403), or sign-ins from an IP range
281
- ("IP-Bereich vorübergehend gesperrt"). The tools report this; wait instead of retrying.
282
- - **Manual sign-in steps** (SMS or e-mail code, CAPTCHA) cannot be done through MCP. Run
283
- `npx -y kleinanzeigen-mcp-v2 login` in a terminal.
284
- - **Output parsing:** results of bot runs are read from the bot's console output. The server always returns the
285
- bot's `DONE:` line, warnings and the end of its log, so nothing is lost if a message format changes.
286
- - **Bot versions differ:** the server reads `kleinanzeigen-bot help` once and answers tools whose command the
287
- installed bot lacks with a clear "needs a newer kleinanzeigen-bot" error instead of running it.
288
- - **Online actions by id** (`delete`, `reserve`, `extend`) are carried out by the bot, which matches ids against
289
- your account; ads created elsewhere can be imported first with `kleinanzeigen_import_online_ads`.
295
+ - **Keine offizielle API:** Die Suche liest das HTML von kleinanzeigen.de. Ändert Kleinanzeigen seine Seiten, können
296
+ Ergebnisse unvollständig sein, bis der Parser angepasst ist. Bitte eröffne dann ein Issue.
297
+ - **Bot-Schutz:** Kleinanzeigen kann zu viele Anfragen sperren (HTTP 429/403) oder Anmeldungen aus einem IP-Bereich
298
+ („IP-Bereich vorübergehend gesperrt“). Die Tools melden das; warte, statt es gleich erneut zu versuchen.
299
+ - **Manuelle Anmeldeschritte** (Code per SMS oder E-Mail, CAPTCHA) gehen nicht über MCP. Führ dafür
300
+ `npx -y kleinanzeigen-mcp-v2 login` im Terminal aus.
301
+ - **Auswertung der Bot-Ausgabe:** Ergebnisse von Bot-Läufen werden aus der Konsolenausgabe des Bots gelesen. Der
302
+ Server liefert immer die `DONE:`-Zeile des Bots, Warnungen und das Ende des Logs mit. So geht nichts verloren, wenn
303
+ sich ein Meldungsformat ändert.
304
+ - **Bot-Versionen unterscheiden sich:** Der Server liest einmal `kleinanzeigen-bot help`. Tools, deren Befehl dem
305
+ installierten Bot fehlt, melden klar, dass eine neuere Version nötig ist, statt ihn auszuführen.
306
+ - **Online-Aktionen per ID** (`delete`, `reserve`, `extend`) führt der Bot aus und gleicht die IDs mit deinem Konto
307
+ ab. Anzeigen, die anderswo erstellt wurden, kannst du vorher mit `kleinanzeigen_import_online_ads` importieren.
290
308
 
291
- ## Disclaimer
309
+ ## Haftungsausschluss
292
310
 
293
- This is an independent community project. It is not affiliated with, endorsed by or supported by Kleinanzeigen
294
- (Kleinanzeigen GmbH / Adevinta) or the kleinanzeigen-bot project. Automated access may conflict with the
295
- Kleinanzeigen terms of use and can lead to restrictions of your account. Use it in moderation, for your own
296
- account only, and at your own risk.
311
+ Dies ist ein unabhängiges Community-Projekt. Es steht in keiner Verbindung zu Kleinanzeigen (Kleinanzeigen GmbH /
312
+ Adevinta) oder dem Projekt kleinanzeigen-bot und wird von ihnen weder unterstützt noch empfohlen. Automatisierter
313
+ Zugriff kann gegen die Nutzungsbedingungen von Kleinanzeigen verstoßen und zu Einschränkungen deines Kontos führen.
314
+ Nutze ihn maßvoll, nur für dein eigenes Konto und auf eigenes Risiko.
297
315
 
298
- kleinanzeigen-bot is licensed under AGPL-3.0 and is installed and run separately; this server only starts it as
299
- an external program.
316
+ kleinanzeigen-bot steht unter der AGPL-3.0 und wird separat installiert und ausgeführt; dieser Server startet ihn nur
317
+ als externes Programm.
300
318
 
301
- ## 📄 License
319
+ ## 📄 Lizenz
302
320
 
303
321
  [MIT](./LICENSE)