Olx Mcp

Olx Mcp

🚀 OLX MCP Server

为什么要自己在所在地区搜索电子垃圾呢,Claude 可以帮你完成这项工作!这是一款 100% 由人工智能驱动的实用工具。

✨ 主要特性

  • 🌍 多领域支持:可在 5 个 OLX 域名(葡萄牙、波兰、保加利亚、罗马尼亚、乌克兰)上进行搜索。
  • 🔍 搜索列表:支持使用类别、位置、价格范围和排序等过滤器进行搜索。
  • 📋 列表详情:可获取特定列表的详细信息,包括卖家信息。
  • 🎭 浏览器自动化:使用 Playwright 进行可靠的网页数据抓取。

📦 安装指南

📋 Claude 桌面端配置

  1. 找到你的 Claude 桌面端配置文件
    • macOS~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows%APPDATA%\Claude\claude_desktop_config.json
    • Linux~/.config/Claude/claude_desktop_config.json
  2. 将 OLX MCP 服务器添加到你的配置中
{
"mcpServers": {
"olx-mcp": {
"command": "npx",
"args": ["olx-mcp"]
}
}
}
  1. 重启 Claude 桌面端,以加载新配置。

🔄 替代方案:全局安装

如果你想进行全局安装,请执行以下命令:

npm install -g olx-mcp

然后使用以下配置:

{
"mcpServers": {
"olx-mcp": {
"command": "olx-mcp"
}
}
}

📦 开发环境:从源代码安装

git clone https://github.com/l-margiela/olx-mcp.git
cd olx-mcp
npm install
npm run build

在开发环境中使用以下配置:

{
"mcpServers": {
"olx-mcp": {
"command": "node",
"args": ["/absolute/path/to/olx-mcp/dist/index.js"]
}
}
}

💻 使用示例

基础用法

配置完成后,你可以在 MCP 客户端中使用以下工具:

搜索列表

在任何支持的 OLX 域名上使用各种过滤器搜索列表:

Can you search for "apartments" in "Lisboa" on OLX Portugal with a maximum price of 1000 euros?
Search for "telefon" in "warszawa" on OLX Poland with prices between 100-500 PLN?

参数说明

  • domain(必需):OLX 域名('olx.pt', 'olx.pl', 'olx.bg', 'olx.ro', 'olx.ua')
  • query(可选):搜索词
  • category(可选):类别过滤器
  • location(可选):位置过滤器
  • minPrice(可选):最低价格
  • maxPrice(可选):最高价格
  • page(默认值:1):页码
  • limit(默认值:20):每页显示的项目数
  • sortBy(默认值:'relevance'):排序顺序('relevance', 'date', 'price-asc', 'price-desc')

列表详情

获取任何支持的域名上特定列表的详细信息:

Can you get the details for listing "ABC123" from OLX Portugal?
Show me details for listing "XYZ789" from OLX Poland including images?

参数说明

  • domain(必需):OLX 域名('olx.pt', 'olx.pl', 'olx.bg', 'olx.ro', 'olx.ua')
  • listingId(必需):列表的 ID
  • includeImages(默认值:false):是否包含图片 URL
  • includeSellerInfo(默认值:true):是否包含卖家信息

📚 详细文档

开发脚本

  • npm run build - 构建 TypeScript 项目
  • npm run dev - 在开发模式下运行,支持热重载
  • npm start - 运行已构建的服务器
  • npm test - 运行测试(如果有)
  • npm run clean - 清理构建产物

故障排除

MCP 检查器

若要调试 MCP 通信,你可以使用 MCP 检查器:

npx @modelcontextprotocol/inspector node dist/index.js

📄 许可证

本项目采用 MIT 许可证,详情请参阅 LICENSE 文件。

  • 0 关注
  • 0 收藏,8 浏览
  • system 提出于 2025-09-23 11:57

相似服务问题