Skip to content

Releases: segentic-lab/lens-mcp

v0.1.2 — references, richer find, Prisma lens

Choose a tag to compare

@segentic-lab segentic-lab released this 06 Jul 18:46

Three feature requests from the dogfooding agent (against a real TS / NestJS / Prisma monorepo) — all shipped. 13 tools now.

Added

  • references — the inverse of find: 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 lensoverview/find/map now cover schema.prisma: models, enums, composite types, fields, and relations (each field classified scalar / relation / enum). map gains a schemas section.

Changed

  • find locates non-callable symbolsconst/let/var, type aliases, interfaces, enums, not just functions/classes. A codebase's source-of-truth often lives in export const …; now findable, with kind to 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 compares node.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

Choose a tag to compare

@segentic-lab segentic-lab released this 06 Jul 16:36

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 CURRENT AGENTS.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=true runs update.sh (git pull + npm ci + build + self-test). Honest semantics: restartRequired (a Node stdio server can't hot-reload), force=true stashes 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-machine mcp-config.json. git clone … && ./install.sh and 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

Choose a tag to compare

@segentic-lab segentic-lab released this 06 Jul 14:39

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.