# janreges/ai-distiller-mcp [Health: Active]

**Category:** 🔒 Security  
**Repository:** https://github.com/janreges/ai-distiller  
**GitHub Stars:** 172  
**npm Downloads (last month):** 176  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/janreges-ai-distiller-mcp

## Description
Extracts essential code structure from large codebases into AI-digestible format, helping AI agents write code that correctly uses existing APIs on the first attempt.

## Tools
Capabilities this server exposes over MCP:

- **distill_file** — Extracts essential code structure from a single file - the core functionality of AI Distiller. Returns clean, structured code signatures optimized for AI context windows.

USAGE: Essential for providing accurate code context to AI assistants. Automatically detects language and extracts API signatures, types, and structure while removing unnecessary implementation details.
- **distill_directory** — Extracts essential code structure from entire directories - the core functionality of AI Distiller. Processes all supported programming languages and returns structured API/code signatures optimized for AI context windows.

USAGE: Perfect for understanding codebases, API discovery, and providing accurate code context to AI assistants. Supports filtering by visibility levels, file patterns, and content types.
- **distill_with_dependencies** — Analyzes call dependencies and returns distilled code of only relevant methods/classes up to specified depth. This advanced feature traces function/method calls across files and includes only the code that is actually called from the target file, creating focused distillations for deep code analysis.

USAGE: Perfect for understanding code execution flows, impact analysis, and creating focused context for AI assistants. Particularly useful for large codebases where you need to understand how specific functionality works across multiple files.
- **aid_hunt_bugs** — Generates a bug hunting prompt with distilled code for AI agents to systematically identify potential bugs, logical errors, race conditions, and quality issues. Use when you need AI to analyze code for hidden bugs or perform a comprehensive code health check.

OUTPUT: Generates a markdown file with bug hunting prompt and distilled code. The response includes the file path - AI agents should read this file and follow instructions to perform the actual bug analysis.
- **aid_suggest_refactoring** — Generates a refactoring analysis prompt with distilled code for AI agents to identify specific refactoring opportunities. Use when you need AI to suggest improvements for code quality, readability, maintainability, or performance.

OUTPUT: Generates a markdown file with refactoring prompt and distilled code. The response includes the file path - AI agents should read this file and follow instructions to provide refactoring suggestions with before/after examples.
- **aid_generate_diagram** — Generates a diagram creation prompt with distilled code for AI agents to create architectural diagrams in Mermaid format. Use when you need AI to generate flowcharts, sequence diagrams, class diagrams, and architecture overviews.

OUTPUT: Generates a markdown file with diagram generation prompt and distilled code. The response includes the file path - AI agents should read this file and follow instructions to create 10+ Mermaid diagrams.
- **aid_analyze_security** — Generates a security analysis prompt with distilled code for AI agents to perform comprehensive security audits with OWASP Top 10 focus. Use when you need AI to identify vulnerabilities, security anti-patterns, and weak points.

OUTPUT: Generates a markdown file with security audit prompt and distilled code. The response includes the file path - AI agents should read this file and follow instructions to analyze security vulnerabilities and suggest remediation.
- **aid_generate_docs** — Generates documentation creation prompts with distilled code for AI agents to create comprehensive documentation including API references, usage examples, and developer guides. Use when you need AI to generate technical documentation from code.

OUTPUT: Generates markdown files with documentation prompts and distilled code. The response includes file paths - AI agents should read these files and follow instructions to create the actual documentation.
- **aid_deep_file_analysis** — Generates task lists and prompts for systematic file-by-file analysis. Creates a structured workflow where AI agents analyze each file across multiple dimensions (Security, Performance, Maintainability, Readability). Perfect for comprehensive codebase reviews.

OUTPUT: Generates task list, summary template, and directory structure for organizing analysis results. AI agents should read the task list and follow instructions systematically.
- **aid_multi_file_docs** — Creates documentation workflow prompts with file relationships. Generates structured prompts that guide AI agents to create interconnected documentation covering multiple files, their relationships, and overall system architecture.

OUTPUT: Generates workflow files that AI agents can follow to create comprehensive documentation with proper cross-references.
- **aid_complex_analysis** — Enterprise-grade analysis prompt with full codebase context. Generates comprehensive prompts for architecture analysis, compliance checks, and detailed findings. Best suited for large codebases requiring deep architectural insights.

OUTPUT: Generates analysis prompt with distilled code that AI agents can use to create architecture diagrams, identify patterns, and provide strategic recommendations.
- **aid_performance_analysis** — Performance optimization prompt with complexity focus. Generates analysis prompts that guide AI agents to identify performance bottlenecks, analyze algorithmic complexity, and suggest optimization strategies.

OUTPUT: Generates performance analysis prompt focusing on scalability issues, resource usage, and optimization opportunities.
- **aid_best_practices** — Code quality prompt with industry standards. Generates analysis prompts that guide AI agents to assess code against best practices, design patterns, and clean code principles.

OUTPUT: Generates best practices analysis prompt covering code quality metrics, pattern usage, and improvement suggestions.
- **aid_analyze** — Core AI Distiller prompt generation engine. Generates pre-configured prompts with distilled code for AI-driven analysis. Use specialized tools when available. This tool directly maps to aid --ai-action.

IMPORTANT: This tool DOES NOT perform analysis - it generates prompt files that AI agents can then execute. The output includes file paths to the generated prompts. AI agents should read these files and follow the instructions within to perform the actual analysis.
- **list_files** — Lists project files with language detection and statistics. Useful for exploring project structure before distillation.
- **get_capabilities** — Returns comprehensive information about AI Distiller capabilities, supported languages, and available tools.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ai-distiller-mcp": {
    "command": "npx",
    "args": ["-y","@janreges/ai-distiller-mcp"]
  }
}
```

## Documentation

## What janreges/ai-distiller-mcp MCP server does

janreges/ai-distiller-mcp MCP server makes the AI Distiller code-structure extractor available to MCP-compatible clients. It is intended for projects where sending the entire source tree to an AI model would exceed practical context limits or make API relationships difficult to identify.

The core operation reduces source code to a compact representation of the information an agent usually needs to use existing code: public methods, properties, types, imports, and basic documentation. The default output excludes method bodies and protected, internal, or private members. Filtering options can include those members, implementation details, comments, or other content when a broader view is required.

The repository describes support for more than 12 programming languages and provides text, Markdown, structured JSON, JSONL, and XML output formats. Distillation can target one file or a directory, and the tool can report compression and processing statistics.

## How it works

The MCP interface separates browsing, extraction, and analysis-prompt generation. `list_files` helps an agent inspect directories and view file statistics. `distill_file` and `distill_directory` then produce reduced code context for a file or directory. `get_capabilities` reports available AI Distiller capabilities.

The analysis tools do not perform the underlying review themselves. Instead, they prepare prompts containing distilled code for an AI agent to process. Available workflows cover bug hunting, refactoring, Mermaid diagram generation, OWASP Top 10 security analysis, documentation, systematic file-by-file analysis, multi-file documentation, complex analysis, performance, and coding best practices. `aid_analyze` provides direct access to the AI actions for custom workflows.

## Setup and configuration

Install the MCP package published as `@janreges/ai-distiller-mcp` from npm, then configure it in an MCP-compatible client. The README explicitly names Claude, Cursor, VS Code, and Windsurf as supported integration targets, and includes a Claude Desktop usage guide in its documentation structure.

The generated prompts are saved to a `.aid/` directory by default for workflows that create files; small codebases can instead use standard output according to the CLI behavior described by the project.

Configuration follows AI Distiller's filtering model. Public members, documentation, and imports are included by default, while implementation bodies and non-public visibility levels are excluded. Worker count, output format, comments, docstrings, and summary style can be adjusted through the underlying Distiller options.

## Tools and capabilities

The MCP tool set includes:

- File and directory distillation
- Directory browsing with file statistics
- Capability discovery
- Bug-hunting and refactoring prompt generation
- Mermaid diagram prompt generation
- OWASP Top 10 security-analysis prompts
- Documentation and multi-file documentation workflows
- Deep file analysis and complex analysis workflows
- Performance and best-practice analysis prompts
- A general analysis entry point for custom actions

## Limitations and notes

AI Distiller prepares context and prompts; it does not carry out the requested security review, refactoring, documentation task, or other analysis itself. An AI agent must read or execute the generated prompt content.

The project identifies this MCP release as an early version and requests feedback through GitHub discussions or issues.

_Full upstream README: https://allmcps.com/mcp/janreges-ai-distiller-mcp/readme_

