Skip to content
MCP server

Codelens MCP

Read-only MCP server that maps TS/JS/Python code structure for AI coding agents

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

Similar MCP servers

About Codelens MCP

Codelens MCP is an open-source MCP server for developer tools. It is available on CLI and self-hosted.

Codelens gives an AI agent a structural picture of a codebase: imports, exports, classes, functions, signatures and comments, without loading whole files into context. The README says it is built on tree-sitter WASM grammars, so it needs no native build step and runs wherever Node 18 or newer is available.

The server runs over stdio and is launched from the project directory it should analyse. It only reads files under that working directory; symlinks that escape it are rejected. Its seven read-only tools cover directory-wide overviews, single-file outlines, addressable function listings, verbatim function bodies by name, definition lookup and TODO-style comment markers.

The README is explicit that the output is a navigation map. The intended workflow is to locate code with these tools and then read the actual source before judging or changing it. It is aimed at developers who run coding agents against TypeScript, JavaScript or Python projects.

The repository notice says codelens has been merged into lens-mcp and is no longer developed, so new users are directed there.

Tools this server provides (7)

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

map
Per-file structural overview of a whole directory tree in one call.
overview
One file's top-level structure: imports, exports, classes and functions with line ranges.
functions
Lists addressable functions in a file with signatures, flags and parent scope.
comments
Lists comments with line ranges, kinds and TODO-style marker detection.
function_body
Returns verbatim source of one function by bare or dotted name.
find
Locates function, method and class definitions by name across a directory.
info
Reports server version, working directory sandbox root, languages and caps.

What it does

Whole-project structure map
A single call returns a per-file structural overview of a directory tree, skipping folders like node_modules and dist.
Verbatim function bodies
Retrieves the source of one function by bare or dotted name, and lists candidates instead of guessing when a name is ambiguous.
Definition lookup
Finds where functions, methods and classes are defined across a directory, excluding call sites.
Comment and marker scan
Lists comments with line ranges and detects TODO, FIXME, BUG, HACK, NOTE and XXX markers, with an option to return only those.
Explicit truncation and error reporting
Caps on lists are flagged as truncated, and files with syntax errors are reported with error line ranges rather than as clean results.

Good for

  • Orienting an AI coding agent in an unfamiliar TypeScript or Python repository
  • Pulling a single function's source into an agent's context without reading whole files
  • Finding where a class or function is defined before editing it
  • Listing outstanding TODO and FIXME markers across a codebase

Pricing

Open source

Free open-source server; self-hosted via Node.js

Codelens MCP FAQ

Which languages does it support?

The README lists .ts, .mts, .cts, .tsx, .js, .jsx, .mjs, .cjs and .py files, using tree-sitter grammars for each.

Is the server still maintained?

The repository notice says codelens has merged into lens-mcp and is no longer developed; the README directs users to lens-mcp instead.

Can it read files outside the project it is launched from?

No. The README says it only reads files under its working directory, rejects escaping symlinks, and reports that root in its error messages.

What license does it use?

The README states AGPL-3.0, with the full text in the repository's LICENSE file.

Is Codelens MCP free?

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

What are the best alternatives to Codelens MCP?

The closest alternatives to Codelens MCP are Lens MCP, ILens, Codebase Memory, Lsp MCP and Ai Architect MCP Codebase.

Where this comes from

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

How AIPoweredBot checks servers