YaCy peer-to-peer search

io.github.pad01g由 GitHub 帳號 pad01g 發布v1.0.0更新於 Oct 24, 2026

Web search, crawling and ranking evaluation on your own YaCy peer: no API key, no central service.

概覽

AI 產生的概覽

把助手連接到自架的 YaCy 節點,用來網頁搜尋、爬取、調整排序設定與評估搜尋品質,不需要搜尋 API 金鑰。

可以做什麼
  • 在節點索引中搜尋,可選擇同時查詢點對點網路並等待各節點回覆
  • 啟動、暫停、恢復與停止網站爬取,並列出爬取工作及其代號
  • 查看索引狀態、已連線節點與信任委派資訊
  • 讀取並修改排序與過濾設定,再用精確率、召回率與 R 精確率評估排序品質
  • 從節點自有索引中刪除單一頁面
適用情境
適合自己運行 YaCy 節點、希望助手在其中搜尋、把網站爬進索引、調整排序設定並衡量搜尋品質的情況,不必依賴商業搜尋 API。
執行需求
需要一個可透過 HTTP 存取的執行中 YaCy 節點,由 YACY_URL 指定。伺服器以本機 stdio 程序執行,通常是與節點同一個網路的 Docker 容器,或從原始碼執行時使用 Node 24。管理操作需要 YACY_ADMIN_USER 與 YACY_ADMIN_PASSWORD;另有選用的 YACY_CRAWL_ALLOW_PRIVATE、YACY_ALLOW_TRUST_SETTINGS 與 YACY_TIMEOUT_MS。
安裝前請注意
YACY_ADMIN_PASSWORD 是以環境變數傳入的機密,具備爬取、設定與刪除權限。爬取、爬取控制、刪除文件與修改排序都標示為破壞性操作,會改變節點索引或設定。YACY_CRAWL_ALLOW_PRIVATE=1 會讓爬取觸及回送位址與私有位址。標題與摘要來自網頁作者與其他節點,應視為資料而非指令。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 YaCy peer-to-peer search,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

yacy-search MCP server

An MCP server for one YaCy peer: web search without a search API or API key, crawling, ranking settings and search quality evaluation. It runs next to the agent (stdio) and talks to the agent's own peer over HTTP. There is no central service: the peer is yours, and it searches the peer-to-peer network it belongs to. Registry name: io.github.pad01g/yacy-search.

It is written for the improved-search fork (results carry author signature verdicts and tags). Search, crawl, status and settings also work with upstream YaCy.

Run

Start a peer and the MCP server on one Docker network:

sh
docker network create yacy 2>/dev/null || truedocker run -d --name yacy --network yacy -p 127.0.0.1:8090:8090 \  -v yacy_data:/opt/yacy_search_server/DATA ghcr.io/pad01g/yacy-improved-search:latest
# Claude Codeclaude mcp add yacy -- docker run -i --rm --network yacy \  -e YACY_URL=http://yacy:8090 -e YACY_ADMIN_PASSWORD='<your password>' ghcr.io/pad01g/yacy-search-mcp:1.0.0

The fork's image starts with the administrator account admin / yacy: change the password at http://127.0.0.1:8090/ConfigAccounts_p.html before connecting the MCP server, and pass the new one.

Other clients (mcp.json style):

json
{  "mcpServers": {    "yacy": {      "command": "docker",      "args": ["run", "-i", "--rm", "--network", "yacy", "-e", "YACY_URL=http://yacy:8090", "-e", "YACY_ADMIN_PASSWORD=<your password>", "ghcr.io/pad01g/yacy-search-mcp:1.0.0"]    }  }}

For a peer outside Docker use -e YACY_URL=http://host.docker.internal:8090 (Linux: add --add-host=host.docker.internal:host-gateway). Without Docker: npm ci && node src/server.ts in this directory (Node 24).

VariableDefaultMeaning
YACY_URLhttp://localhost:8090base URL of the peer
YACY_ADMIN_USERadminadministrator account (crawl, status counts, settings)
YACY_ADMIN_PASSWORDunsetadministrator password; without it crawl_site, control_crawl, delete_document and set_ranking_setting are refused (even if the peer accepts local requests without a password), and the reading admin tools work only where the peer allows them without one
YACY_CRAWL_ALLOW_PRIVATEunset1: crawl_site may reach loopback and private addresses (an intranet). Otherwise only http(s) URLs of public hosts. This checks the start URL only; the links and redirects YaCy follows are limited by YaCy's own network.unit.domain (global on public peers refuses local addresses)
YACY_TIMEOUT_MS30000timeout of one request to the peer
YACY_ALLOW_TRUST_SETTINGSunset1: set_ranking_setting may also change trust.search.acceptUnverified and trust.policy.excludeTags

On the improved-search fork, the vector search (short questions find pages without the exact words) is used only for searches of the peer's administrator or from its host. When the MCP server runs in another container, set search.vector.public=true on the peer (it then embeds every new query of its search page).

Tools

ToolWhat it does
search_webfull-text search; resource: "global" also asks connected peers and waits waitMs before ranking all answers
crawl_sitestart a crawl (url, depth, range: domain / subpath / wide, maxPages per host, default 200)
get_index_statusindexed documents, crawl queues, peer type and connections; explains a paused crawler (load average) and a peer without a public address
list_peersconnected peers: signed seed, reach (direct / relay), tags
get_ranking_settingsthe ranking and filtering settings with their meaning
set_ranking_settingchange one of them (allow-list only: minimum match, coverage and thin page weights, title phrase boost, wait time; unverified results and excluded tags only with YACY_ALLOW_TRUST_SETTINGS=1)
evaluate_rankingqueries with known relevant URLs: precision@k, recall@k, R-precision, the rank of each relevant URL; finishes within about 50 s (queries that do not fit are reported as skipped)
get_trust_statusthe signed delegations and peer lists the peer holds
list_crawlsthe crawls started on the peer, with the handle control_crawl needs
control_crawlpause or resume the local crawler, or stop one crawl (indexed pages stay)
delete_documentremove one page from the peer's own index (stop a running crawl of that site first)

1.0.0 renamed the tools to a consistent verb_noun form (no aliases): search → search_web, crawl → crawl_site, crawls → list_crawls, crawl_control → control_crawl, index_status → get_index_status, peers → list_peers, trust_status → get_trust_status. Clients that call tools by name need the new names.

A typical loop for improving results: evaluate_ranking → set_ranking_setting → evaluate_ranking.

Titles and snippets come from page authors and other peers: the tool descriptions tell the model to treat them as data, not instructions. crawl_site, control_crawl, delete_document and set_ranking_setting are marked destructive so that clients ask before calling them. Values of settings are checked per key, and a value YaCy stores differently is rolled back.

Test

sh
npm ci && npm run typecheck && npm test                      # unit testsYACY_URL=http://localhost:8090 YACY_ADMIN_PASSWORD=yacy npm test   # also calls every tool on a live peer

License

This directory (the MCP server) is under the MIT license. It talks to YaCy only over HTTP and contains no YaCy code; the rest of this repository, YaCy itself, stays under the GPL.

來源:mcp/README.md,提交 2fa4cc2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

5
  1. v1.0.0最新Oct 1, 2026
  2. v0.3.0Oct 1, 2026
  3. v0.2.1Sep 30, 2026
  4. v0.2.0Sep 29, 2026
  5. v0.1.0Sep 28, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分