Skip to main content
Glama
homestead-mcp
by Cmarl

Homestead

An offline library of practical knowledge — first aid, water, food preservation, power, repair, livestock — that stays searchable when the internet does not.

Everything runs locally: the documents sit on your disk, the embedding model runs on your machine, and no query ever leaves it. It ships with an MCP server, so Claude or any other MCP-speaking assistant can search the library and file new documents into it.

$ homestead search "how do I treat a deep cut"

Wilderness First Aid Curriculum and Doctrine Guidelines  [first-aid]
    Control bleeding with direct pressure. Apply a gloved hand and firm,
    steady pressure directly over the wound for at least ten minutes...

Install

pip install 'homestead-library[all]'   # the machine that hosts the library
homestead install                 # choose your shelves, pull the documents in

homestead install asks what you want on your shelves, downloads it from the original publishers, and builds the search index:

What would you like on your shelves?
  1) Essentials  --  9 documents, ~66 MB
     Keeping people alive and fed when the power is out: first aid, water,
     food preservation, emergency preparedness.
  2) Growing & keeping food  --  8 documents, ~90 MB
  3) Building & fixing  --  5 documents, ~75 MB
  4) Everything  --  22 documents, ~200 MB
  5) Choose shelf by shelf

Then start it:

homestead serve                   # http://127.0.0.1:8021

Where the documents come from

This project ships a catalog, not a corpus. Nothing is redistributed here. Every entry in shelves.toml points at the publisher's own copy — mostly US federal agencies (FEMA, CDC, NOAA, USDA, the armed services), university extension services, and open-licence publishers like Hesperian and the FAO. The catalog records the licence for each one.

That keeps the repo small, keeps sources current, and keeps the licensing honest. It also means links rot: if a download fails, the installer says so, and a catalog fix is a welcome pull request.

Related MCP server: diamond

Using it from an AI assistant

The MCP server is dependency-free and starts instantly, so it can live on a different machine from the library if you like.

Claude Code

claude mcp add homestead -- homestead-mcp

Hermes

hermes mcp add homestead --command "$(command -v homestead-mcp)"

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "homestead": {
      "command": "homestead-mcp",
      "env": { "HOMESTEAD_URL": "http://127.0.0.1:8021" }
    }
  }
}

Query tools — talk to a running library:

Tool

What it does

homestead_search

Semantic search; returns documents with verbatim passages

homestead_add

Import a file, wait for indexing, report the result

homestead_categories

List shelves, with counts and safety cautions

homestead_docs

List documents, optionally by shelf

homestead_health

Is the library up, and how much is in it

Lifecycle tools — set a library up from nothing, no shell required:

Tool

What it does

homestead_status

Is this machine ready? Returns a check per component and a next field naming the one thing to fix

homestead_catalog

What can be installed: packs, shelves, sources, licences, sizes

homestead_install

Download and index chosen shelves. Returns a job id immediately

homestead_index_build

Rebuild the index from documents already present

homestead_job

Poll an install or index job to completion

MCP tools are read at client start-up, so restart your assistant's session after adding the server.

For agents

This is built to be installed and driven by agents, not just people.

Nothing blocks. Installing takes minutes and the first index build downloads a ~2 GB model, so homestead_install returns a job id straight away and you poll homestead_job until status is done or error.

Start with homestead_status. It works with nothing running and no corpus on disk, and every failing check carries its own remedy. The top-level next field is the single command to run:

{
  "ready": false,
  "checks": {
    "corpus":     {"ok": false, "documents": 0, "remedy": "homestead install --pack essentials --yes"},
    "index":      {"ok": false, "remedy": "homestead index"},
    "embeddings": {"ok": true,  "remedy": null},
    "server":     {"ok": false, "remedy": "homestead serve"}
  },
  "next": "homestead install --pack essentials --yes"
}

From a shell, every command takes --json, and errors carry the fix:

homestead doctor --json            # same object as homestead_status
homestead install --list --json    # the whole catalog, with licences
homestead bootstrap --pack essentials --json    # install + index, one step
homestead search "water purification" --json
homestead --url http://other-host:8021 search "..."   # target another library

homestead install never prompts when stdin is not a terminal. Without a selection it exits 2 and tells you which flags would have worked, rather than guessing or hanging:

{
  "ok": false,
  "error": "no shelves selected and stdin is not a terminal",
  "remedy": "homestead install --pack essentials --yes --json",
  "valid_packs": ["essentials", "growing", "fixing", "everything"]
}

Downloads are idempotent — a finished file is never re-fetched, so re-running an install is safe and cheap.

Commands

homestead install          choose shelves and download them
homestead install --list   show the catalog and its licences
homestead index            (re)build the search index
homestead serve            run the library server (loopback only)
homestead serve --host 0.0.0.0   share it on your network
homestead search QUERY     search from the terminal
homestead add FILE -c soil add a document of your own
homestead bootstrap        install + index in one step (unattended)
homestead paths            where everything lives
homestead doctor           check the installation (--json for agents)

Where things live

Defaults follow the XDG spec; every path is overridable.

Path

Holds

Override

~/.local/share/homestead/corpus

downloaded documents

HOMESTEAD_CORPUS

~/.local/share/homestead/index

the vector index

HOMESTEAD_INDEX

~/.local/share/homestead/library

documents you added

HOMESTEAD_LIBRARY

~/.local/share/homestead/models

the embedding model

HOMESTEAD_MODEL

Set HOMESTEAD_HOME to move all of it at once.

Local shelves

A library grows shelves the packaged catalog knows nothing about. Declare them in site.toml (in HOMESTEAD_HOME, or set HOMESTEAD_SITE_CONFIG) rather than forking:

[[category]]
slug  = "boatbuilding"
label = "Boatbuilding"
icon  = "~"
match = "boats"        # any corpus path containing this lands on this shelf

How it works

Documents are split into overlapping ~1200-character passages and embedded with BAAI/bge-m3 locally. Search embeds the query and takes a cosine top-k, grouped by document. For PDFs the server keeps a chunk → page map, so an answer can tell you the page to turn to.

The corpus index is read-only. Anything you add later goes into a separate overlay that is searched alongside it, so adding documents can never corrupt the base index — and deleting the overlay loses only your additions.

A word on trust

This is reference material, gathered for the situation where better help is not available. It is not medical, legal, or engineering advice. Two shelves carry explicit cautions the software will show you — foraging (misidentification kills) and food preservation (follow current USDA process times, not the ones in century-old cookbooks). Semantic search has no idea a 1918 canning time has since been proven dangerous. Read accordingly.

Security

The server binds 127.0.0.1 by default and has no authentication. That combination is safe: nothing off your machine can reach it.

To use the library from a phone or another computer, bind wider:

homestead serve --host 0.0.0.0        # or set HOMESTEAD_HOST

Now anyone who can reach that port can read your whole library and add documents to it, so do this only on a network you trust — a home LAN, or better, a private network like Tailscale. Loopback and Tailscale peers are always trusted; other clients are challenged with Basic Auth if you set credentials (.auth.env, or HOMESTEAD_AUTH_USER / HOMESTEAD_AUTH_PASS). With none set there is no challenge at all. The server warns you on startup when it is bound beyond loopback without credentials.

Contributing

Adding a source to the catalog is the most useful contribution. It must be free to download from the publisher, correctly licensed, and recorded with its real licence in shelves.toml. See the notes at the top of that file.

Installing

pip install homestead-library              # CLI + MCP server, no dependencies
pip install 'homestead-library[server]'    # + embeddings, to host a library
pip install 'homestead-library[all]'       # + Stack Exchange dump support

The command is homestead; the MCP server is homestead-mcp.

Licence

MIT. The documents the installer downloads carry their own licences, recorded per-entry in the catalog. The Stack Exchange corpora are CC BY-SA 4.0 — attribution belongs to Stack Exchange and the individual authors.

Available Tools

10 tools
homestead_addA

Import a document into the Homestead Library. Reads the file from disk, uploads it, waits for the library to chunk and index it, and reports the result. PDFs and text both work. The document becomes searchable via homestead_search.

Inputs: category (required), file_path (required), title.

homestead_catalogA

List what can be installed: packs, shelves, and every source with its publisher, licence and download size. Call this before homestead_install to choose shelves.

Inputs: no named parameters.

homestead_categoriesA

List the library's categories -- slug, label, document and chunk counts, and any safety caution attached to the shelf. Call this to pick a valid slug for homestead_search or homestead_add.

Inputs: no named parameters.

homestead_docsB

List the documents in the library, optionally limited to one category slug.

Inputs: category.

homestead_healthA

Check that the library server is up, and how much it is holding (passages, documents, categories, uptime).

Inputs: no named parameters.

homestead_index_buildA

Rebuild the search index from the documents already downloaded. Returns a job id; poll homestead_job.

Inputs: no named parameters.

homestead_installA

Download documents into the library and index them, so it can be searched. Use this to set a library up from nothing. Returns immediately with a job id -- the work takes minutes, so poll homestead_job until status is 'done'. The first index build also downloads a ~2 GB embedding model.

Inputs: pack, index, shelves.

homestead_jobA

Progress of a homestead_install or homestead_index_build job. Poll until status is 'done' or 'error'.

Inputs: job_id (required).

homestead_statusA

Check whether this machine's library is set up and ready to search. Unlike homestead_health this works with nothing running, so call it FIRST when a search fails or when setting a library up. Returns a check per component (corpus, index, embeddings, server) and a 'next' field naming the single command or tool that will fix the first problem.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 10 tools

    Disambiguation4/5

    Each tool has a largely distinct role: search, add, install, index, job polling, and state checks are separable. The only mild ambiguity is between health/status and add/install, but the descriptions explicitly clarify when each should be used.

    Naming Consistency5/5

    All tools share the homestead_ prefix with consistent lowercase snake_case. Action tools use verbs (search, add, install, index_build) while informational tools use nouns (categories, docs, health, status, catalog, job), creating a predictable pattern.

    Tool Count5/5

    Ten tools is well within the ideal range and each maps to a distinct part of the library lifecycle: browsing, searching, ingesting documents, installing packs, rebuilding indexes, and monitoring jobs. Nothing feels redundant or unnecessary.

    Completeness4/5

    The set covers the core workflows well: setup, install, add, search, list, health/status, and async job tracking. There are minor gaps such as no delete/remove or document metadata update tools, but those can be worked around and are not central to the stated purpose.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search and read offline documentation from synced libraries via MCP tools, providing hybrid keyword and semantic search without network calls.
      12 npm
      1
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to search and retrieve clean, structured content from local offline ZIM archives such as Wikipedia, medical docs, DevDocs, and Stack Exchange through a unified MCP interface.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to search, install, read, and navigate DevDocs documentation offline via MCP, with token-efficient search/read/toc tools and local caching.
      6
      27 npm
      1
      MIT