Tools & AI 6 July 2026 · 4 min read

lens-mcp, and the Family of Agent-Hardened MCP Servers

We just shipped lens-mcp — deterministic navigation maps over code and markdown. Here's what it does, why we merged two servers to build it, and the three-server family it joins.

We just released lens-mcp — a Model Context Protocol server that gives an AI agent deterministic navigation maps over code and markdown docs. It's the third open-source MCP server from Segentic Lab, and a good moment to talk about all three — because they're built on one idea.

What lens does

An agent dropped into an unfamiliar repo burns tokens the same way every time: ls, grep, then Read whole files to find the one function or the right doc. lens hands over the map instead of the territory.

  • map returns a whole project's surface — every code file's structure and every doc's outline — in one call.
  • function_body returns one function's source, often ~99% less context than reading the file it lives in. heading does the same for one doc section.
  • 12 tools in total, over TypeScript / JavaScript / Python (tree-sitter) and markdown.

Two things make it more than a convenience. First, it's deterministic — real parsing, not a model summarizing, so the map is identical every run. Second, it's honest: syntax errors surface instead of vanishing, every list is capped with the true total, and the contract is stated in the tool descriptions themselves — lens is a navigation map; locate with it, then Read the real source before judging or modifying. A signature is not the body.

Why we merged two servers to build it

lens didn't start as one server. We had codelens (code) and docslens (docs) — two servers, same era, same shape over different file types. That's a tax: two release pipelines, two directory listings, two sets of issues, for what is really one job. So we merged them. Same battle-tested parsing engines, now one server with a unified map that spans both, and a single pipeline. Fewer, sharper tools instead of two near-duplicates. codelens is archived with a redirect; lens carries everything it did, plus docs.

The family it joins

lens is one of three MCP servers we build and maintain, each for a different slice of what an agent needs:

  • periscope-mcp — web-app QA. 74 Playwright tools that test websites and web apps behind a login and return hard verdicts — assert_condition gives passed: true/false, not a screenshot to squint at. It measures real Interaction-to-Next-Paint, audits accessibility / SEO / agentic-search readiness, and flags silent no-ops instead of faking success.
  • lens-mcp — code & docs navigation. The map above.
  • glovebox-mcp — sandboxed computer-use. It gives an agent a real desktop to drive — mouse, keyboard, vision — sealed inside a nested X11 window so it can never touch your real screen. 18 tools, multiple app windows in parallel.

Two of them (periscope, lens) share the same instinct: give the agent a map, not the territory — a page's interactive surface, a project's code-and-docs surface. glovebox is the complement — when there's no map to be had, hand the agent a safe pair of gloves instead.

One method behind all three

The servers look different; the way they're made is identical. Each one is built with AI agents and hardened by pointing another agent at it against real work. Every bit of friction that agent hits becomes an issue, and every issue becomes a fix with a regression test. periscope has closed 20 that way and now runs a full authenticated site scan without a hitch; lens ships with 138 tests; every server returns errors that name the fix, caps every output, and keeps its docs equal to its behavior.

That's the through-line, and we wrote about it here: a prompt describes behavior; software guarantees it. The knowledge these tools encode — how to parse a TSX file's class-field arrows, why a headed browser session must inherit auth, that a popup's first-millisecond request is un-capturable — doesn't evaporate at the end of a session. It's in the code, enforced, every run.

Get them

All three are open-source and work with any MCP client — Claude Code, Cursor, Codex, or your own agent. Each installs in one line and ships an AGENTS.md you paste into your agent's system prompt:

git clone https://github.com/segentic-lab/lens-mcp && cd lens-mcp && ./install.sh

More at lab.segentic.dev. If any of them is useful, a ⭐ on the repo genuinely helps.

Ready for a fast, secure, low-cost site?

Send an enquiry and get a free, no-obligation quote within 48 hours.

Free quote in 48 hours Reply the same business day