carsales-mcp
carsales-mcp
一个 MCP 服务器,让 AI 助手能够搜索 carsales.com.au —— 澳大利亚最大的汽车市场 —— 查找二手车和新车。
专为 Claude Desktop、Claude Code、Cursor 以及任何兼容 MCP 的客户端而构建。
[!NOTE] carsales.com.au 受 DataDome 机器人保护。此服务器驱动真实的 Chromium 浏览器(而非普通 HTTP 客户端)以通过挑战。搜索结果 可靠。完整的每一条列表的详情页可能在某些网络/数据中心 IP 上被阻止 —— 此时服务器会优雅地回退到它已从搜索中提取的 丰富摘要卡片数据(价格、年份、里程、变速箱、燃油、车身、位置)。 在正常的住宅连接上,详情页通常可以正常加载。
工具
search_cars
搜索汽车。过滤器在支持的地方作为 carsales URL 方面应用,而价格 / 年份 / 里程则在内存中从列表卡片中过滤(这些没有简单的 URL 参数)。
参数 | 类型 | 说明 |
| string (必填) | 例如 |
| string | 例如 |
| string |
|
| string |
|
| string |
|
| string |
|
| enum |
|
| string | 装饰/徽章,例如 |
| string | 外观颜色,例如 |
| string | 自由文本搜索 |
| number | 澳元 |
| number | 制造年份 |
| number | 公里 |
| enum |
|
| number | 结果页(从 1 开始) |
| number | 要返回的最大结果数(默认 25) |
get_listing_details
通过 listingId(例如 OAG-AD-26099426)或完整 url 获取单个列表的完整详情。
如果详情页被机器人阻止,则回退到摘要卡片数据。
整体视图。 这些工具为模型呈现完整的列表信息:
get_listing_details/fetch返回价格(含上路费 和 不含政府费用)、价格 指示器(FAIR/GOOD/GOOD/ GREAT PRICE)、年份、里程、变速箱、燃油、车身、发动机、 卖家 + 州、功能/规格项目符号列表、描述以及照片画廊。设置
includeImages: true(get_listing_details/fetch的默认值)后,实际照片会被 下载并作为 MCP 图像块 返回,因此多模态模型可以真正看到汽车。search也有includeImages(默认关闭)以附加每个结果的缩略图。search在 JSON 中返回每个结果的imageURL,即使未嵌入图像。
设置
1. 安装 Playwright 的浏览器
npm install -g carsales-mcp # OR clone + npm install
npx playwright install chromium # downloads the full Chromium build (needed!)需要完整的 Chromium 构建(
channel: 'chromium')—— 无头 shell 会被 DataDome 指纹识别并阻止。在 Linux 上,您可能还需要系统库:npx playwright install-deps chromium(或您的发行版对应的libnss3、libnspr4、libasound2)。
2. 添加到您的 MCP 客户端
Claude Desktop — ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"carsales": {
"command": "npx",
"args": ["-y", "carsales-mcp"]
}
}
}Claude Code — ~/.claude/.mcp.json:
{
"mcpServers": {
"carsales": {
"command": "npx",
"args": ["-y", "carsales-mcp"]
}
}
}3. (可选)代理 / 反机器人调优
carsales.com.au 位于 DataDome 之后。服务器旨在应对这一点:
Camoufox 是默认引擎。 Camoufox 是一款基于 Firefox 的反检测浏览器,其
指纹比 Chromium 更难识别。Camoufox 二进制文件会在首次启动时自动下载
(它会为您运行 npx camoufox-js fetch —— 无需手动步骤),并且
如果 Camoufox 启动失败,服务器会透明地回退到 Chromium。强制使用
Chromium 请设置 CARS_ENGINE=chromium。
API + 抓取平衡(镜像 secondhand-mcp)。 如果您有
Carapis API 密钥,请设置 CARAPIS_API_KEY,search_cars 将
从其 carsales.com.au 端点拉取干净的结构化 JSON(无机器人挑战)。如果密钥
缺失或调用失败,则回退到浏览器抓取器。这与
secondhand-mcp 对 eBay 与 Depad/Poshmark 使用的官方 API 优先 / 否则抓取策略相同。
代理。 DataDome 主要根据 IP 信誉 进行阻止,因此(住宅)代理是最
可靠的解决方案。将 CARS_PROXY 设置为单个代理,或使用逗号分隔的列表以在每次请求时轮换
代理(结合下面的重试逻辑):
"env": {
"CARS_PROXY": "http://user:pass@proxy1:8000,http://user:pass@proxy2:8000",
"CARAPIS_API_KEY": "your-key"
}其他调优环境变量:
变量 | 默认值 | 用途 |
|
|
|
| – | 使用 Carapis REST API 进行搜索(不抓取) |
| – | 单个代理或逗号分隔的轮换列表 |
|
| 导航之间的最小毫秒数(保持礼貌) |
|
| 遇到 DataDome 挑战时的重试次数 |
|
| 重试之间的退避毫秒数(每次尝试翻倍) |
"env": { "CARS_PROXY": "http://127.0.0.1:8899" }注意事项与限制
DataDome 可能偶尔发起挑战;如果搜索无结果,只需重试。
尊重 carsales 的服务条款,避免使用非常高的页码进行频繁请求。
未使用官方 carsales API —— 这是通过真实浏览器抓取公共网站。
许可证
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Shopping MCP for AI agents: search, compare, Amazon buy links. Auto-register.
Live Google Maps business search, review, and photo data for AI agents over MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/masked8knights/carsales-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server