Files
ely-eye/ely-eye-mcp
ZacharyZhang-NY 674c88e84e Rank memory search in SQL instead of rebuilding BM25 in Python
The product path pulled every atom into Python and rebuilt a BM25Okapi
index per query: p50 20.16s over 165,973 atoms. It now runs one SQLite
statement with LIMIT/OFFSET.

- text_index.py: one normalizer for both sides of the index. CJK runs are
  split per character (unicode61 cannot segment them), camelCase and
  separators are split so "search atoms" finds SearchAtoms, latin tokens
  get a prefix match. Rows written before this existed hold raw text in
  atom_fts, so schema v3 rebuilds the index on upgrade.
- retrieval.py: filters (holder / scenario / source / modality / since /
  until / min_trust), a base64 cursor, and reciprocal rank fusion in place
  of the 0.55/0.35/0.10 blend whose graph term was always zero.
- An empty result is {status: "no_match"}, not a bare array.
- Go: search_atoms and compile_context rank through POST /api/search. The
  second Go tokenizer is deleted; two implementations could drift, which
  is what the MCP/HTTP parity requirement forbids.
- db.py passed 500 lines, so the row codec moved to row_codec.py.
- Tooling: installed the repo's own pyright. pyrightconfig.json had no
  exclude and swept the downloaded corpus (1171 errors); with excludes the
  count is 62, all pre-existing (evals 48, profiles 4, training 4,
  ingestion 3, runtime 2, cartridge_assets 1). backend/pyproject.toml
  carried a second [tool.pyright] that shadowed the root config; deleted.
- bench/scale_check.py measures the product search at corpus size. The
  100k-atom p50 number is not written until it is measured on an idle
  machine.

Verification: 112 pytest passed; go build/vet/test clean, gofmt clean;
ruff clean on every touched file; mypy clean on the 14 touched Python
files; repo pyright 62 errors, unchanged per-file ledger.
2026-10-07 16:02:40 -04:00
..
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00
2026-05-30 23:51:45 -04:00

Ely-Eye MCP

Ely-Eye MCP exposes a local Context Cartridge memory store as a stdio Model Context Protocol server for coding agents such as Codex and Claude Code.

The server is local-first and read-only against <ely-eye-home>/data/ely_eye.sqlite. It reads Evidence Atoms, cartridge manifests, Memory DNA, proof-suite artifacts, HashHop proofs, and compiled evidence packs. The production database is never modified.

It can be deployed for any .ely_eye store. Identity is anchored on the database file, not on the Ely-Eye repository layout, so the server walks up from the working directory to find .ely_eye/data/ely_eye.sqlite, or takes an explicit --ely-eye-home.

One-command setup

The installer downloads a checksum-verified prebuilt binary for the platform when a tagged release is available, otherwise it builds from source with Go from a repository checkout. Either way it installs the binary into <ely-eye-home>/bin and registers the server with Codex and Claude Code. No Docker.

Windows:

powershell -ExecutionPolicy Bypass -File .\ely-eye-mcp\install.ps1 -Client both

Linux and macOS:

bash ./ely-eye-mcp/install.sh --client both

Force a source build (requires Go 1.25 or newer):

bash ./ely-eye-mcp/install.sh --method source

Codex registration uses codex mcp add. Claude Code project registration writes .mcp.json at the project root; --scope user registers through the Claude CLI instead.

Manual run

From inside a project that owns an .ely_eye store:

go run ./cmd/ely-eye-mcp server

Or point at an explicit store:

go run ./cmd/ely-eye-mcp server --ely-eye-home /path/to/.ely_eye

Tools

ely_eye_status returns atom, source, cartridge, token, and cache-layer counts.

list_cartridges lists local Context Cartridges with manifest JSON and Memory DNA.

get_cartridge reads one cartridge plus artifact metadata, memory capsule index, and asset report.

search_atoms queries the local SQLite FTS index and returns ranked Evidence Atoms.

fetch_atom reads one Evidence Atom by exact id.

compile_context compiles a question into a local evidence pack with the same profile names used by the app (live_demo, extreme_context, library_100m, research_theater).

list_proof_suites lists PRD proof suites under <ely-eye-home>/data/eval_proofs.

list_hashhop_proofs aggregates HashHop and Visual HashHop long-context addressing proofs by kind, hop count, and token budget, with pass counts and example proofs. Proofs are deduplicated by content-derived id.

get_proof_suite reads one PRD proof suite by id, including all checks and a summary of its HashHop proofs.

Resources

ely-eye://project/prd, ely-eye://project/readme, and ely-eye://project/mcp-research expose PRD.md, the project README, and these research notes when those files are present next to the store.

Releases

Pushing a mcp-v* tag runs .github/workflows/mcp-release.yml, which cross-compiles the pure-Go server (CGO disabled) for Linux, macOS, and Windows on amd64 and arm64, then publishes the archives with a SHA256SUMS manifest to a GitHub Release. The installers consume those assets.

Security posture

The server opens SQLite read-only with mode=ro and PRAGMA query_only(1), and uses busy_timeout so reads tolerate concurrent writes by the Ely-Eye app. Tools expose structured outputs and return tool-level errors for invalid inputs so agents self-correct through normal tool calls. Proof ids are validated as single path elements before any filesystem read. The server uses stdio transport for local clients and takes credentials only from the local environment.