Releases: segentic-lab/lens-mcp
Release list
v0.1.2 — references, richer find, Prisma lens
Three feature requests from the dogfooding agent (against a real TS / NestJS / Prisma monorepo) — all shipped. 13 tools now.
Added
references— the inverse offind: who uses a symbol (call sites, imports, type references), with the definition labelled. tree-sitter-backed, so a same-named string or comment is never a false positive — the reference workflow that used to force a fallback to grep.- Prisma schema lens —
overview/find/mapnow coverschema.prisma: models, enums, composite types, fields, and relations (each field classified scalar / relation / enum).mapgains aschemassection.
Changed
findlocates non-callable symbols —const/let/var,typealiases,interfaces,enums, not just functions/classes. A codebase's source-of-truth often lives inexport const …; now findable, withkindto distinguish.- JSON files get an honest "not structurally mapped — read it or grep for a key" note.
Fixed
- Reference classification compared node object identity (
===), which silently fails under web-tree-sitter (nodes are recreated per access) — now comparesnode.id. Caught while live-testing; every reference was mislabelled otherwise.
143 tests. Full changelog: v0.1.1...v0.1.2
v0.1.1 — self-maintenance (lens_system) + one-line install
Adds the self-maintenance layer and a one-line install, bringing lens to the periscope family standard.
Added
lens_system— one tool, three actions:status— running vs on-disk version, git commit, install type, Node version, and an update-availability check.agents_md— returns the CURRENTAGENTS.md, so an agent can refresh a stale pasted copy of its operating guide (and persist it into CLAUDE.md).update— dry-run by default;apply=truerunsupdate.sh(git pull + npm ci + build + self-test). Honest semantics:restartRequired(a Node stdio server can't hot-reload),force=truestashes local edits, managed (no-.git) installs refuse.- It operates on the lens install directory (resolved from the module URL) — not
process.cwd(), which is the user's project (the code tools' sandbox). Two separate roots, by design.
- One-line
install.sh+update.sh— no system packages, no native build (tree-sitter is WebAssembly): checks Node 18+,npm ci, build, self-test, writes a per-machinemcp-config.json.git clone … && ./install.shand you're registered.
138 tests (unit + stdio e2e, incl. driving the server from a foreign cwd to prove the install-dir/sandbox separation). 12 tools total.
Full changelog: v0.1.0...v0.1.1
v0.1.0 — one lens over code + markdown
First release of lens-mcp — the merge of codelens-mcp and docslens-mcp into one navigation-lens server. Sibling of periscope-mcp; same standard: honest errors, caps + truncated flags everywhere, docs == behavior.
Give the agent a map, not the territory — deterministic (real parsing, no model summarizing), so an agent spends context on thinking, not browsing files.
11 tools, one contract
Orientation
map— whole-project surface in ONE call: per code file → structure, per doc → outline. Both families, one response.info— version, sandbox root, languages/extensions, caps, contract.
Code (tree-sitter: .ts .tsx .mts .cts .js .jsx .mjs .cjs .py)
overview,functions,function_body(one function's source — ~99% less context than the file),comments,find
Docs (markdown: .md .markdown .mdx)
outline,heading(one section by text/slug/line),links,search
Call the wrong family on a file and the error names the right tool. Syntax errors surface (hasErrors/parseErrors) instead of vanishing. Every list is capped with the true total.
The contract: lens is a navigation map — locate with it, then Read the real source/section before judging or modifying. A signature is not the body; an outline is not the section.
135 tests (unit + stdio e2e), CI on Node 18/20/22. Supersedes codelens-mcp 0.2.0 and the unreleased docslens-mcp. AGPL-3.0.