Repository Analyzer Server
БесплатноНе проверенProvides tools for analyzing code repositories, including structure, dependencies, and git history, with special support for Nostr-related projects.
Описание
Provides tools for analyzing code repositories, including structure, dependencies, and git history, with special support for Nostr-related projects.
README
A Model Context Protocol (MCP) server that provides tools for analyzing code repositories, with a special focus on Nostr-related projects.
Features
- Analyze code structure, components, dependencies, and recent changes
- Search through repository code with pattern matching
- View git history for the entire repository or specific files
- Access file content and directory listings
- Special tools for analyzing NDK (Nostr Development Kit) repositories
- Analyze Nostr Protocol implementations and NIPs (Nostr Implementation Possibilities)
Installation
Clone this repository
Install dependencies:
npm install
- Build the project:
npm run build
Usage
Setting the Repository Path
The MCP server handles file paths in the following ways:
Default Access Behavior
Default access: By default, the server will access the current working directory (cwd) if no path is specified.
Configure specific directories: To specify what directories Claude can access, set the
DEFAULT_REPO_PATHenvironment variable in the Claude config.Per-command overrides: Users can override the default path with the
repoPathparameter in their commands, like:analyze-code --focus=structure --repoPath=/another/directoryClient permissions: Remember that Claude for Desktop will ask for permission before executing tools that access your filesystem.
Analyzing Multiple Repositories
You can analyze multiple repositories without restarting the server by specifying the repository path directly in your commands:
# Analyze structure of a specific repository
analyze-repo --focus=overview --repoType=generic --repoPath=/path/to/specific/repo
# Analyze code in a different repository
analyze-code --focus=structure --path=src/index.js --repoPath=/path/to/another/repo
# Search for patterns in yet another repository
search-code --query="addEventListener" --filePattern="*.js" --repoPath=/path/to/third/repo
All analysis tools (analyze-repo, analyze-code, search-code, git-history, analyze-ndk, analyze-ndk-files, and analyze-nostr-protocol) accept a repoPath parameter which overrides the default path.
Connecting to Claude Desktop
To connect this MCP server to Claude Desktop:
- Edit your Claude Desktop config file:
# On macOS
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
# On Windows
# Edit %AppData%\Claude\claude_desktop_config.json
- Add the server configuration:
{
"mcpServers": {
"repo-analyzer": {
"command": "node",
"args": [
"/absolute/path/to/repo-analyzer-mcp/dist/index.js"
],
"transport": "stdio",
"env": {
"NODE_ENV": "production",
"DEFAULT_REPO_PATH": "/path/to/default/repository"
}
}
}
}
Replace /absolute/path/to/repo-analyzer-mcp with the actual full path to where you installed this tool, and /path/to/default/repository with the path to the repository you want to analyze by default.
- Save the file and restart Claude Desktop.
Troubleshooting
If Claude Desktop fails to start or the MCP servers don't appear:
- Check your configuration file for JSON syntax errors
- Ensure all paths are absolute (full) paths and are correct
- Make sure there are no trailing commas after the last entry in each object
- Check Claude Desktop logs for errors:
~/Library/Logs/Claude/mcp*.log - For additional debugging, you can add
"DEBUG": "mcp:*"to theenvsection of your configuration - Restart Claude Desktop
Available Tools
analyze-code
Analyzes code files with different focus options:
structure: Examines the file structure, including line counts, functions, classes, etc.components: Identifies React components, hooks usage, etc.dependencies: Lists imports and dependencieschanges: Shows recent git history and changes to the file
Example:
Analyze the code structure of src/index.ts
search-code
Searches the repository for specific patterns, with optional file pattern filtering.
Example:
Search the code for "addEventListener" in .js files
git-history
Retrieves git commit history for the repository or a specific file.
Example:
Show me the git history for README.md, limit to 5 commits
analyze-ndk
Analyzes Nostr Development Kit (NDK) repositories with focus on:
implementation: Core implementation detailsmigrations: Version changes and migration guidesall: Both implementation and migrations
Example with explicit repository path:
Analyze NDK implementation at /path/to/ndk-repo
analyze-ndk-files
Explores the NDK file structure with focus on:
overview: General overview of the repositorycomponents: Component architectureapi: API structure and designarchitecture: Overall architecture and patternsall: Comprehensive analysis
Example with explicit repository path:
Analyze NDK files with focus on components at /path/to/ndk-repo
analyze-nostr-protocol
Analyzes Nostr protocol repositories with focus on:
events: Event types and structures defined in NIPsimplementations: Implementation details across different languages
Example with explicit repository path:
Analyze Nostr Protocol events at /path/to/nips-repo with focus on social context
analyze-repo
Provides a general repository analysis with various focus options:
overview: High-level repository informationcomponents: Component structure and organizationapi: API definitions and structurearchitecture: Overall architectural patternsimplementation: Implementation detailsall: Comprehensive analysis of all aspects
Example:
Analyze the repo with focus on architecture
Resources
The server also provides access to:
file://{filePath}: Read file contents from the repositorydir://{dirPath}: List directory contents from the repository
Example:
Show me the content of the package.json file
Directory Structure for Specialized Analysis
For the specialized analysis tools to work correctly, repositories should follow certain structures:
NDK Repository Structure
The analyzer looks for one of these structures:
- A repository with a root
package.jsonthat has the name@nostr-dev-kit/ndk - A repository with an
ndkdirectory containing apackage.jsonwith the name@nostr-dev-kit/ndk
Nostr Protocol Repository Structure
The analyzer looks for one of these structures:
- A repository with a
nipsdirectory containing Markdown files for NIPs - A repository with a README mentioning "NIP" and "Nostr Implementation Possibilities"
- A repository with a
package.jsonthat references "nostr" in its name, description, or keywords
Development
To run in development mode:
npm run dev
License
MIT
Установка Repository Analyzer Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/DocNR/repo-analyzer-mcpFAQ
Repository Analyzer Server MCP бесплатный?
Да, Repository Analyzer Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Repository Analyzer Server?
Нет, Repository Analyzer Server работает без API-ключей и переменных окружения.
Repository Analyzer Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Repository Analyzer Server в Claude Desktop, Claude Code или Cursor?
Открой Repository Analyzer Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Repository Analyzer Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
