Labsco
YohannHommet logo

MCP Repo Search Server

from YohannHommet

MCP server that gives LLMs structural code intelligence across multiple repos

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

Repo Lens MCP Server

Cross-repository code intelligence for developers.

NPM Version Build Status License: AGPL v3 TypeScript MCP Ready

Search functions, classes, and API routes across all your local JS/TS and PHP repositories without switching context.


Why Use This?

The problem: You're working in your frontend repo and need to find a backend API endpoint. Or you're debugging and need to find where a function is defined across your monorepo. With Claude Code, you can search the current repository, but what about your other local projects?

The solution: Repo Lens lets you declare your repositories once in a YAML config file โ€” or search any directory ad-hoc โ€” and search across all of them simultaneously using AST-based structural search. Find the exact function signature, class definition, or API route you need without leaving your current context.

Use Cases

  • Frontend + Backend development: Search backend API routes while working in your frontend repo
  • PHP + JS/TS projects: Find PHP classes, traits, and interfaces alongside TypeScript types
  • Microservices architecture: Find function definitions across multiple services
  • Monorepo navigation: Search across packages without switching directories
  • Code exploration: Understand how different projects in your ecosystem connect

Key Features

AST-Based Intelligence

Unlike grep-style text search, Repo Lens uses ast-grep (written in Rust) to parse code into Abstract Syntax Trees:

  • Structural accuracy: Distinguish between class User and const User
  • Export awareness: Find only exported functions, or include private ones
  • Signature extraction: Get full function signatures, not just names

Search any directory instantly with the paths parameter โ€” no configuration required:

  • Pass directory paths directly to any search tool
  • Declare persistent repos in repolens.yaml with aliases for repeated use
  • Mix both: registered repos + ad-hoc paths in the same query

Declare your repositories once and search them all at once:

  • Static YAML config โ€” declare once, search always
  • Filter by repository alias or search all
  • Results include repository context

API Route Discovery

Map all API endpoints across Express, NestJS, Fastify, and Laravel projects. Find that /users/:id endpoint in seconds.


Capabilities

Repository Listing (1 tool)

ToolDescription
repolens_list_repositoriesList all configured repositories (read-only)

Symbol Search (3 tools)

AST-based structural search powered by ast-grep. Supports JavaScript/TypeScript and PHP (classes, traits, interfaces, enums, functions, methods, constants):

ToolDescription
repolens_find_functionsFind function/method definitions in JS/TS and PHP (supports wildcards like handle*)
repolens_find_classesFind class definitions (also finds PHP traits)
repolens_find_typesFind interfaces and type aliases (PHP: interfaces only)

All search tools accept:

  • paths โ€” Ad-hoc directory paths to search (comma-separated, no registration needed)
  • repoFilter โ€” Filter registered repositories by alias

API Route Discovery (1 tool)

ToolDescription
repolens_find_api_routesMap API endpoints across Express, NestJS, Fastify, Laravel

What About Text Search / File Operations?

Repo Lens focuses on multi-repository AST-based search. For text search and file operations within your current repository, use Claude Code's built-in tools (Grep, Read, Glob) which are optimized for single-repo use.

This separation keeps Repo Lens fast and focused on what it does best: cross-repository structural code intelligence.