kleinanzeigen-mcp
Search Kleinanzeigen.de, Germany's largest classifieds site, via MCP tools without API keys.
README
kleinanzeigen-mcp
An MCP server that lets an LLM search Kleinanzeigen.de, Germany's largest classifieds site. Built for self-hosting: one container, no API keys, no per-query credits.
Scraping is done by DanielWTE/ebay-kleinanzeigen-api, which is baked into the image at a pinned commit. This project is the MCP layer on top.
Tools
| Tool | What it does |
|---|---|
search_listings |
Search by keyword, location, radius and price range. Returns listing summaries. |
get_listing |
Full detail page for one listing id. |
get_listings_batch |
Full details for several ids at once — the normal follow-up to a search. |
search_by_url |
Search from a pasted Kleinanzeigen URL, preserving filters that search_listings cannot express (vehicle make, model year, room count, …). |
parse_search_url |
Explain which filters a URL encodes. Makes no network request. |
The intended flow is search_listings → pick interesting ids →
get_listings_batch. Search results deliberately omit descriptions so a broad
search does not blow up the model's context window.
Running it
docker run --rm -p 8000:8000 ghcr.io/jnslmk/kleinanzeigen-mcp:latest
The server speaks streamable HTTP at http://localhost:8000/mcp, with a plain
GET /healthz for container healthchecks. Set MCP_TRANSPORT=stdio to run it
as a local stdio server instead.
Chromium needs room to work — give the container at least 1.5 GB of memory.
Configuration
| Variable | Default | Purpose |
|---|---|---|
MCP_TRANSPORT |
http |
http (streamable HTTP) or stdio |
MCP_HOST |
0.0.0.0 |
Bind address |
MCP_PORT |
8000 |
Bind port |
MCP_PATH |
/mcp |
MCP endpoint path |
KZ_MAX_CONTEXTS |
4 |
Chromium browser contexts to pool |
KZ_MAX_CONCURRENT |
2 |
Concurrent scrapes |
KZ_MAX_PAGE_COUNT |
5 |
Cap on pages per search (~25 listings each) |
KZ_MAX_BATCH_SIZE |
20 |
Cap on ids per get_listings_batch call |
LOG_LEVEL |
INFO |
Python log level |
The KZ_MAX_* defaults are tuned for a chat agent making one request at a time.
Raise them for throughput, at the cost of memory and a greater chance of
tripping Kleinanzeigen's bot detection.
LibreChat
mcpServers:
kleinanzeigen:
type: streamable-http
url: "http://kleinanzeigen-mcp:8000/mcp"
timeout: 120000
chatMenu: true
mcpSettings:
allowedAddresses:
- "kleinanzeigen-mcp:8000"
allowedAddresses is required: LibreChat's SSRF guard blocks MCP URLs that
resolve to private addresses, which a sibling container always does. The
timeout is generous on purpose — a cold search has to start a browser context
and load real pages.
Claude Code
claude mcp add --transport http kleinanzeigen http://localhost:8000/mcp
Development
uv venv && uv pip install -e .
# The scrapers are not on PyPI, so point PYTHONPATH at a checkout of upstream:
git clone https://github.com/DanielWTE/ebay-kleinanzeigen-api.git /tmp/kz-api
pip install -r /tmp/kz-api/requirements.txt && playwright install chromium
PYTHONPATH=/tmp/kz-api python -m kleinanzeigen_mcp
Upgrading the scraper
UPSTREAM_SHA in the Dockerfile pins the upstream commit. It is pinned rather
than tracking main because this server imports upstream's scraper functions
directly — ultra_optimized_scrape_inserate, get_inserate_details_optimized
and scrape_by_url — instead of going through its HTTP API. That avoids a
second process and an HTTP hop, but it means an upstream refactor can break this
image at runtime rather than at build time. Bump the SHA, rebuild, smoke-test
each tool, then ship.
Images
ghcr.io/jnslmk/kleinanzeigen-mcp — multi-arch (linux/amd64, linux/arm64),
built by GitHub Actions on native runners for each architecture.
| Tag | Meaning |
|---|---|
latest |
Newest build of main |
sha-<full-sha> |
A specific commit |
v1.2.3, v1.2 |
Release tags |
Caveats
Kleinanzeigen has no public API, so this scrapes the site with a headless browser. That means it can break whenever they change their markup, and heavy or parallel use may trip bot detection — particularly from a datacenter IP. Scraping is also at odds with Kleinanzeigen's terms of service. Keep it to personal-scale use.
License
MIT. Bundles DanielWTE/ebay-kleinanzeigen-api, also MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。