Repo Lens MCP Server
Allows discovery of API routes in Express.js projects, extracting route patterns and HTTP methods.
Allows discovery of API routes in Fastify projects, extracting route patterns and HTTP methods.
Allows discovery of API routes in Laravel projects, extracting route patterns and HTTP methods.
Allows discovery of API routes in NestJS projects, extracting route patterns and HTTP methods.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Repo Lens MCP Serverfind the createUser function in all repos"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Repo Lens MCP Server
Cross-repository code intelligence for developers.
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
Related MCP server: CodeGraph MCP Server
Quickstart
npx repo-lens-mcpKey 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 Userandconst UserExport awareness: Find only exported functions, or include private ones
Signature extraction: Get full function signatures, not just names
Zero-Friction Search
Search any directory instantly with the paths parameter — no configuration required:
Pass directory paths directly to any search tool
Declare persistent repos in
repolens.yamlwith aliases for repeated useMix both: registered repos + ad-hoc paths in the same query
Multi-Repository Search
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.
Installation
Claude Desktop / VS Code (Recommended)
Add this to your claude_desktop_config.json (or VS Code MCP settings):
{
"mcpServers": {
"repo-lens": {
"command": "npx",
"args": ["-y", "repo-lens-mcp", "--config", "/home/user/repolens.yaml"]
}
}
}Restart Claude, and you're ready to go.
Local Development
git clone https://github.com/YohannHommet/repo-lens-mcp.git
cd repo-lens-mcp
pnpm install
pnpm build
pnpm devConfiguration
Config File (repolens.yaml)
Create a YAML config file declaring your repositories:
# repolens.yaml
repositories:
- path: ~/projects/backend-api
alias: backend
- path: ~/projects/frontend-app
alias: frontend
- path: ~/projects/shared-lib~ is expanded to your home directory automatically.
Config Path Resolution
--config <path>CLI argument (explicit — fails if file not found)Default:
~/.config/repo-lens-mcp/repolens.yaml(graceful — returns empty if not found, ad-hoc paths still work)
Environment Variables
Variable | Default | Description |
|
| Log level: |
Example:
{
"env": {
"MCP_LOG_LEVEL": "debug"
}
}Capabilities
Repository Listing (1 tool)
Tool | Description |
| List 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):
Tool | Description |
| Find function/method definitions in JS/TS and PHP (supports wildcards like |
| Find class definitions (also finds PHP traits) |
| Find 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)
Tool | Description |
| Map API endpoints across Express, NestJS, Fastify, Laravel |
Usage Examples
1. Search Any Directory (No Configuration)
"Find all functions starting with 'handle' in my backend"
repolens_find_functions(paths: "/home/user/projects/backend", name: "handle*")2. List Configured Repos
"What repos are available?"
repolens_list_repositories()3. Find an API Endpoint
"Find the Express route that handles POST requests to /login"
repolens_find_api_routes(repoFilter: "backend", method: "POST", pathPattern: "/login")4. Find a Specific Class
"Where is the UserService class defined?"
repolens_find_classes(name: "UserService")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.
License
AGPL-3.0
This software is free to use. If you modify and distribute it (or run it as a network service), you must share your source code under the same license.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA local server that provides powerful code analysis and search capabilities for software projects, helping AI assistants and development tools understand codebases for tasks like code generation and refactoring.4
- Flicense-qualityDmaintenanceEnables querying and analyzing code relationships by building a lightweight graph of TypeScript and Python symbols. Supports symbol lookup, reference tracking, impact analysis from diffs, and code snippet retrieval through natural language.
- Alicense-qualityDmaintenanceProvides knowledge extraction and cross-repo analysis tools for multi-repository organizations. It enables users to query type definitions, service dependencies, and infrastructure configurations across an entire organization's codebase.MIT
- Alicense-qualityCmaintenanceA graph-powered code intelligence engine that indexes codebases into a structural knowledge graph to provide AI agents with deep context on function calls, types, and execution flows. It offers local, zero-dependency tools for hybrid search, impact analysis, and dead code detection across Python, JavaScript, and TypeScript projects.728MIT
Related MCP Connectors
Enterprise code intelligence for M&A, security audits, and tech debt. Hosted server with 200k free.
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Software component catalog: search your org's services, docs, APIs, dependencies, and ownership.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/YohannHommet/repo-lens-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server