# Hashloom [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/davet47/hashloom  
**GitHub Stars:** 3  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hashloom

## Description
Content-addressed contracts and a verification cache that cut agent context by skipping proven code.

## Tools
Capabilities this server exposes over MCP:

- **get_contract** — the ~300-token context packet: contract + hash + one-line dep signatures + caller list
- **put_contract** — validate, write `contracts/<name>.yaml`, return new hash, a semantic diff of what changed, and every invalidated dependent
- **get_dependents** — blast-radius query, direct or transitive, names + hashes; inferred (unreviewed) contracts flagged
- **verify** — per-unit `cached-pass` / `pass` / `fail` plus a top-level `ok` gate bit; `radius=true` widens each name to its full blast radius; runs tests only on cache misses; failures come back as a ≤40-token assertion summary, never a traceback; inferred contracts in the closure flagged (refused under strict…
- **status** — dirty contracts, stale verifications, cache hit-rate, resolved verify interpreter, cumulative token counters

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "hashloom": {
    "command": "uvx",
    "args": ["hashloom","serve"]
  }
}
```

## Documentation

## What Hashloom MCP server does

Hashloom MCP server treats software units as YAML contracts rather than relying on source files as the primary durable description. Each contract can define a signature, dependencies, invariants, examples, pytest node IDs, and the implementation location. The implementation remains replaceable, while the contract provides a stable interface for agents and dependency analysis.

The server exposes four main areas of operation. `get_contract` returns a compact packet containing a contract, its hash, dependency signatures, and callers. `put_contract` validates and writes a contract, reports its new hash and semantic changes, and identifies dependent contracts invalidated by the update. `get_dependents` reports direct or transitive impact with names and hashes. `verify` checks units using cached results when possible and returns per-unit states such as `cached-pass`, `pass`, or `fail`, along with a top-level success flag. `status` reports dirty contracts, stale verification, cache statistics, the selected verification interpreter, and cumulative token counts.

## How it works

Contracts are stored under `contracts/`, with subdirectories acting as namespaces. Their canonical content is hashed with normalized keys and whitespace; comments and selected operational fields do not affect the contract hash. Implementations are hashed from normalized ASTs, so formatting, comments, and docstring changes do not invalidate that part of the cache.

A verification result is keyed by the contract, implementation, test-source, toolchain identity, and transitive dependency contract hashes. A changed contract, implementation, test source, declared dependency digest, or toolchain identity causes a verification miss. Tests run only for misses. Failure responses contain a short assertion summary rather than a traceback.

Dependency changes can be examined as a direct or transitive blast radius. Passing `radius=true` to verification expands each requested unit to that radius. Contracts marked `status: inferred` are surfaced in dependency and verification results. With strict provenance enabled, verification refuses units whose closure contains inferred contracts until those contracts are reviewed.

## Setup and configuration

Install the package with `pip install hashloom`, or install it from the Git repository. In a project directory, run `hashloom init` to create `.hashloom/` and `contracts/`, then run `hashloom index` to build the store. Start the MCP server with `hashloom serve` over stdio.

Claude Code can register it with `claude mcp add hashloom -- hashloom serve`. The process resolves its project by walking upward from the working directory until it finds `.hashloom/`. Strict provenance is configured in `.hashloom/config.json` with `{"strict_provenance": true}`; without that setting, inferred contracts are flagged but do not normally block reads, writes, or verification.

## Tools and capabilities

- Retrieve compact regeneration context with `get_contract`.
- Write validated contracts and inspect semantic changes with `put_contract`.
- Find direct or transitive dependents with `get_dependents`.
- Run or reuse verification with `verify`, including optional blast-radius expansion.
- Inspect dirty state, stale results, cache hit rate, interpreter selection, and token counters with `status`.
- Use namespaced contracts such as `billing/invoice` when matching files exist below `contracts/`.

## Limitations and notes

Contract invariants are documentation, while tests provide the actual verification check. A contract should represent a stable interface that other units depend on, and inferred contracts may require human review before strict verification is allowed.

The documented setup uses Python packaging and pytest node IDs, while toolchain identity can also account for Go, Node, Java, or .NET projects. The server uses stdio transport in the documented quickstart.

_Full upstream README: https://allmcps.com/mcp/hashloom/readme_

