Skip to content
MCP server

Lens MCP

MCP server giving AI agents deterministic maps of code and markdown projects

Pricing
Open source
Platforms
CLI, self-hosted, Linux
Version
0.1.2
Listing updated
today

Similar MCP servers

About Lens MCP

Lens MCP is an open-source MCP server for developer tools. It is available on CLI, self-hosted, Linux, macOS and Windows.

The README says lens-mcp answers where things live in a project and what its overall shape is, in a single call, so an agent can navigate before it reads. It pairs tree-sitter parsing for TypeScript, JavaScript and Python source with a markdown lens for docs, plus Prisma schema support. Output comes from real parsing rather than a model summary, and every list is capped with a truncated flag when results are cut short.

The server exposes 13 tools grouped into orientation, code and docs. Code tools cover file outlines, single function bodies, comments and TODO markers, definition lookup and reference finding. Docs tools cover heading outlines, reading one section, links and full-text search. Reads are restricted to the server's working directory, and errors return a message with a suggested fix.

Installation is via git clone and a provided script that checks Node 18+, builds the project and writes an MCP client config. The README lists setup steps for Claude Code, Cursor, Windsurf and Codex CLI. It is licensed AGPL-3.0 and built by Segentic Lab.

Tools this server provides (13)

Taken from the project documentation; the running server may differ.

map
Whole-tree surface in one call: per code file a structure, per doc a title and outline.
info
Version, sandbox root, supported languages, tool list, output caps and the lens contract.
lens_system
Install status, self-update, and fetching the current AGENTS.md.
overview
One file's imports, exports, classes, methods and top-level functions with line ranges.
functions
Every function including nested ones, with signatures, parameters, parent scope and kind.
function_body
Verbatim source of one function.
comments
Comments and TODO/FIXME/BUG/HACK markers, optionally markers only.
find
Locate a definition by name across a directory.
references
Find call sites, imports and type references for a symbol.
outline
Full markdown heading hierarchy with line numbers.
heading
Read one markdown section by heading text, slug or line number.
links
Extract inline, image, wikilink, autolink and reference links from markdown.
search
Case-insensitive full-text search across markdown docs.

What it does

One-call project map
Returns the structure of every code file and the outline of every doc in a single response.
Single function reads
Fetches the verbatim source of one named function instead of the whole file.
Symbol definition and references
Finds where a symbol is defined and which call sites, imports and type references use it.
Section-level doc reads
Reads one markdown section by heading, slug or line number, with its subsections.
Path sandbox and honest caps
Limits reads to the working directory and reports output caps and parse errors explicitly.

Good for

  • Orienting an agent in an unfamiliar TypeScript, JavaScript or Python repository
  • Pulling one function body into context without reading the whole file
  • Finding every call site of a symbol before changing it
  • Locating the right markdown section in a large docs folder
  • Listing TODO, FIXME and similar markers across a codebase

Pricing

Open source

Free and open source under AGPL-3.0, self-hosted.

Lens MCP FAQ

Which languages does it parse?

The README lists TypeScript, JavaScript and Python for source code, markdown files for docs, and Prisma schemas. JSON config and i18n files are not structurally mapped.

Which MCP clients does it work with?

The README says it works with any MCP client and gives setup steps for Claude Code, Cursor, Windsurf and Codex CLI.

What does it need to run?

Node 18 or later. The README says tree-sitter runs as WebAssembly so no native build or system packages are required.

Can it read files outside the project?

No. The README says only files under the server's working directory are readable and escaping symlinks are rejected.

Is Lens MCP free?

Yes. Lens MCP is open source, so you can use and self-host it for free.

What are the best alternatives to Lens MCP?

The closest alternatives to Lens MCP are Codelens MCP, Lsp MCP, Llmmcp, Ai Architect MCP Codebase and MCPProxy.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers