Skip to main content
Glama
mcp-server-subito-scraper

mcp-server-subito-scraper

by pindaroli

Subito.it MCP 服务器(通过 Apify)

许可证: MIT Node.js 模型上下文协议

基于 TypeScript 的 MCP(模型上下文协议) 服务器,用于搜索和抓取 Subito.it 上的广告,利用 Apify Actor azzouzana/subito-scraper-pro-by-search-url。

可通过 npx 在任何兼容 MCP 的客户端(Claude Desktop、Cursor、Gemini Antigravity、Windsurf、VS Code 等)上即时运行。


🌟 主要功能

  • 🚀 使用 npx 运行,无需全局安装:通过 npx -y mcp-server-subito-scraper 即可使用。

  • 🇮🇹 完全支持所有 Subito.it 类别:汽车/摩托车、房地产(出售/出租)、电子/计算机、电话、家具、工作和通用市场。

  • 🔍 智能搜索(subito_search):自动生成带有查询、类别、地区、最低/最高价格和 TuttoSubito 配送(shp=true)过滤器的 URL。

  • 🔗 通过 URL 直接抓取(subito_scrape_by_url):粘贴任何包含直接从网站应用复杂过滤器的 URL。

  • 📦 获取数据集(subito_get_dataset_items):查看并提取先前创建的 Apify 数据集中的结果。

  • 🔑 灵活的令牌配置:通过环境变量(APIFY_TOKEN)、命令行参数(--token)或直接在提示/工具中设置。


Related MCP server: OLX MCP Server

🔑 获取 Apify 令牌

  1. 在 Apify.com 上创建一个免费账户。

  2. 前往 设置 > 集成 > API 令牌 或访问 console.apify.com/settings/integrations。

  3. 复制您的 个人 API 令牌(例如 apify_api_...)。


🛠️ 在 MCP 客户端中的配置

1. Claude Desktop

将配置添加到 claude_desktop_config.json 文件中:

  • macOS:~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows:%APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "subito-scraper": {
      "command": "npx",
      "args": ["-y", "mcp-server-subito-scraper"],
      "env": {
        "APIFY_TOKEN": "IL_TUO_TOKEN_APIFY_QUI"
      }
    }
  }
}

或者,将令牌作为 CLI 参数传递:

{
  "mcpServers": {
    "subito-scraper": {
      "command": "npx",
      "args": ["-y", "mcp-server-subito-scraper", "--token", "IL_TUO_TOKEN_APIFY_QUI"]
    }
  }
}

2. Cursor / Windsurf

在客户端的 MCP 设置中:

{
  "subito-scraper": {
    "command": "npx",
    "args": ["-y", "mcp-server-subito-scraper"],
    "env": {
      "APIFY_TOKEN": "IL_TUO_TOKEN_APIFY_QUI"
    }
  }
}

3. Gemini Antigravity / Agentic IDE

在 mcpServers 部分添加 MCP 配置块:

{
  "mcpServers": {
    "subito-scraper": {
      "command": "npx",
      "args": ["-y", "mcp-server-subito-scraper"],
      "env": {
        "APIFY_TOKEN": "IL_TUO_TOKEN_APIFY_QUI"
      }
    }
  }
}

🧰 可用工具

1. subito_search

自动构建 Subito URL 并执行抓取。

参数

类型

描述

默认值

query

string(必填)

要搜索的文本(例如 "MacBook Pro M3"、"Vespa 125")

-

category

string(可选)

类别(例如 "usato"、"auto"、"moto"、"case"、"informatica"、"telefonia"、"arredamento")

"usato"

region

string(可选)

意大利地区(例如 "italia"、"lombardia"、"lazio"、"piemonte"、"veneto")

"italia"

minPrice

number(可选)

最低价格(欧元)

-

maxPrice

number(可选)

最高价格(欧元)

-

shippingOnly

boolean(可选)

仅筛选支持 TuttoSubito 配送的广告

false

sortBy

string(可选)

排序方式:"datedesc"、"priceasc"、"pricedesc"

"datedesc"

maxItems

number(可选)

要提取的最大广告数量

30

timeoutSecs

number(可选)

最大执行超时时间(秒)

300

token

string(可选)

Apify 令牌(覆盖环境变量)

-


2. subito_scrape_by_url

根据已准备好的直接搜索 URL 执行抓取。

参数

类型

描述

默认值

searchUrl

string(必填)

Subito.it 的完整搜索 URL

-

maxItems

number(可选)

要提取的最大广告数量

30

timeoutSecs

number(可选)

超时时间(秒)

300

token

string(可选)

自定义 Apify 令牌

-


3. subito_get_dataset_items

从先前保存的 Apify 数据集中检索提取的数据。

参数

类型

描述

默认值

datasetId

string(必填)

Apify 数据集 ID

-

limit

number(可选)

要读取的元素数量

50

offset

number(可选)

分页偏移量

0

token

string(可选)

Apify 令牌

-


4. apify_check_status

验证 Apify 令牌是否有效并显示账户信息。


💻 本地开发与编译

如果您想克隆并在本地修改服务器:

# 1. Clona il repository
git clone https://github.com/pindaroli/mcp-server-subito-scraper.git
cd mcp-server-subito-scraper

# 2. Installa le dipendenze
npm install

# 3. Compila il codice TypeScript
npm run build

# 4. Esegui in modalità test
APIFY_TOKEN=tuo_token_qui npm start

或者使用快速重载的开发模式:

APIFY_TOKEN=tuo_token_qui npm run dev

🚀 发布到 NPM 和 GitHub

要发布包并使其可通过 npx mcp-server-subito-scraper 供所有人使用:

# Esegui il login a npm
npm login

# Pubblica il pacchetto
npm publish --access public

📄 许可证

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

免责声明:此 MCP 服务器未经 Subito.it S.r.l. 官方附属、赞助或支持。注册商标归其各自所有者所有。

Available Tools

4 tools
apify_check_statusB

Checks the status of the Apify account and validates the API token

Inputs: token.

subito_get_dataset_itemsC

Fetches scraped items from a previously generated Apify dataset ID

Inputs: datasetId (required), limit, token, offset.

subito_scrape_by_urlB

Scrapes classified ads directly from a Subito.it search URL using Apify Actor (azzouzana/subito-scraper-pro-by-search-url)

Inputs: searchUrl (required), token, maxItems, timeoutSecs.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool targets a distinct aspect: scraping by URL vs. by search parameters, checking account status, and retrieving dataset items. There is slight potential confusion between subito_scrape_by_url and subito_search, but their descriptions clarify the difference (URL vs. keyword-based).

    Naming Consistency4/5

    Tool names use a consistent verb_noun pattern with a domain prefix (subito_). Names are descriptive and follow a predictable structure, though subito_search could optionally be subito_search_by_keywords for perfect parallelism with subito_scrape_by_url.

    Tool Count5/5

    Four tools are appropriate for a focused scraping server: two scraping methods, one status check, and one data retrieval tool. Each tool has a clear purpose and no unnecessary bloat.

    Completeness3/5

    The tool surface covers scraping, search, status checking, and data retrieval, but lacks ability to list or manage datasets (e.g., delete old datasets). An agent scraping multiple times may accumulate datasets without cleanup, which is a notable gap.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers