mcpField
Y
YaCy peer-to-peer search

YaCy peer-to-peer search

Local
pad01g.github.ioSearch1Updated 3w ago

About YaCy peer-to-peer search

An MCP server for operating and evaluating search on a user's own YaCy peer, for teams or individuals running a peer-to-peer search index. It supports web search, crawling, peer status, ranking controls, and relevance evaluation without a search API or central service.

Key features

  1. 01Search local or connected YaCy peers
  2. 02Crawl public websites into the index
  3. 03Inspect peer and crawl status
  4. 04Read and change ranking settings
  5. 05Evaluate ranking with known relevant URLs

Use cases

  1. 01Search the peer-to-peer network without a search API
  2. 02Crawl a site into a YaCy peer's index
  3. 03Tune ranking and compare evaluation metrics
  4. 04Check peer connections and manage crawls

MCP support

Runs alongside an agent over stdio and communicates with the configured YaCy peer over HTTP. It exposes search, crawling, status, ranking, and evaluation tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"pad01g-yacy-search": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"YACY_URL",
"-e",
"YACY_ADMIN_USER",
"-e",
"YACY_ADMIN_PASSWORD",
"-e",
"YACY_CRAWL_ALLOW_PRIVATE",
"-e",
"YACY_ALLOW_TRUST_SETTINGS",
"ghcr.io/pad01g/yacy-search-mcp:1.0.0"
],
"env": {
"YACY_URL": "<YACY_URL>",
"YACY_ADMIN_USER": "<YACY_ADMIN_USER>",
"YACY_ADMIN_PASSWORD": "<YACY_ADMIN_PASSWORD>",
"YACY_CRAWL_ALLOW_PRIVATE": "<YACY_CRAWL_ALLOW_PRIVATE>",
"YACY_ALLOW_TRUST_SETTINGS": "<YACY_ALLOW_TRUST_SETTINGS>"
}
}
}
}
Run commanddocker run -i --rm -e YACY_URL -e YACY_ADMIN_USER -e YACY_ADMIN_PASSWORD -e YACY_CRAWL_ALLOW_PRIVATE -e YACY_ALLOW_TRUST_SETTINGS ghcr.io/pad01g/yacy-search-mcp:1.0.0
Environment variables to set
YACY_URLBase URL of your YaCy peer as seen from the MCP server container, e.g. http://yacy:8090 on a shared Docker network (docker run --network ...), or http://host.docker.internal:8090
YACY_ADMIN_USERYaCy administrator account, needed for crawling and settings
YACY_ADMIN_PASSWORDSecretYaCy administrator password; without it crawl, settings and the index counts of index_status are not available
YACY_CRAWL_ALLOW_PRIVATE1 lets crawl reach loopback and private addresses (intranets); off by default
YACY_ALLOW_TRUST_SETTINGS1 lets set_ranking_setting change the trust filter settings (acceptUnverified, excludeTags); off by default

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocighcr.io/pad01g/yacy-search-mcp:1.0.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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:

docker network create yacy 2>/dev/null || true
docker 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 Code
claude 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):

{
  "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

npm ci && npm run typecheck && npm test                      # unit tests
YACY_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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.