Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Fetched from the repository for this visit.
🌐 English | 한국어 | 日本語 | हिन्दी | Deutsch
Package your codebase for AI comprehension.
50 tokens → 8 tokens— Same information, fewer tokens.
A CLI tool and MCP server that extracts function signatures, type definitions, and documentation from your codebase using Tree-sitter — producing compact XML/Markdown context for LLMs like Claude, GPT, and Gemini. Supports 19 languages including Go, TypeScript, Python, Rust, Java, C/C++, and more.
Installation · Quick Start · Supported Languages
Instead of feeding raw code to AI assistants:
| Before (50+ tokens) | After with brfit (8 tokens) |
|---|---|
|
|
brfit is a five-stage pipeline. One orchestrator — Packager.Package() in internal/context — runs your files through each stage:
flowchart LR
Files --> Scanner --> Extractor --> Security --> Formatter --> Tokenizer --> Output["XML / MD / JSON"]
Extractor -. uses .-> Parser["Parser × 19 languages"]
| Stage | Package | Responsibility |
|---|---|---|
| Scanner | pkg/scanner | Selects which files to read (.gitignore, glob, size filters) |
| Extractor | pkg/extractor | Runs files through the right parser concurrently (worker pool) |
| Parser | pkg/parser | Parses one file via Tree-sitter, extracts signatures (19 languages) |
| Security | pkg/security | Detects and redacts secrets |
| Formatter | pkg/formatter | Renders output as XML / Markdown / JSON |
| Tokenizer | pkg/tokenizer | Counts output tokens |
Design principles
Scanner, Extractor, Parser, and Formatter are interfaces. Adding a language, format, or CLI flag means filling a slot — not rewiring the core.cmd/brfit (CLI) and cmd/brfit-mcp (MCP server) share the same pkg/ packages.macOS (Homebrew)
brew install indigo-net/tap/brfit
Linux / macOS (Script)
curl -fsSL https://raw.githubusercontent.com/indigo-net/Brf.it/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/indigo-net/Brf.it/main/install.ps1 | iex
From Source
git clone https://github.com/indigo-net/Brf.it.git
cd Brf.it
go build -o brfit ./cmd/brfit
brfit . # Analyze current directory
brfit . -f md # Output in Markdown
brfit . -o briefing.xml # Save to file
This project, packaged by brfit itself. Auto-generated on every commit.
| Feature | Description |
|---|---|
| Tree-sitter Based | Accurate AST parsing for language structure analysis |
| Multiple Formats | XML and Markdown output support |
| Token Counting | Automatic output token calculation |
| Gitignore Aware | Automatically excludes unnecessary files |
| Cross-Platform | Linux, macOS, and Windows support |
| Security Check | Detects and redacts secrets (AWS keys, GitHub tokens, API keys, etc.) in extracted code |
| Call Graph | Extracts function/method call relationships using Tree-sitter queries (Go, TS, Python, Java, Rust, C) |
| Language | Extensions | Documentation |
|---|---|---|
| Go | .go | Go Guide |
| TypeScript | .ts, .tsx | TypeScript Guide |
| JavaScript | .js, .jsx | TypeScript Guide |
| Python | .py | Python Guide |
| C | .c | C Guide |
| C++ | .cpp, .hpp, .h | C++ Guide |
| Java | .java | Java Guide |
| Rust | .rs | Rust Guide |
| Swift | .swift | Swift Guide |
| Kotlin | .kt, .kts | Kotlin Guide |
| C# | .cs | C# Guide |
| Lua | .lua | Lua Guide |
| PHP | .php | PHP Guide |
| Ruby | .rb | Ruby Guide |
| Scala | .scala, .sc | Scala Guide |
| Elixir | .ex, .exs | Elixir Guide |
| SQL | .sql | SQL Guide |
| YAML | .yaml, .yml | YAML Guide |
| TOML | .toml | TOML Guide |
brfit [path] [options]
| Option | Short | Description | Default |
|---|---|---|---|
--format | -f | Output format (xml, md) | xml |
--output | -o | Output file path | stdout |
--include-body | Include function bodies | false | |
--include-imports | Include import statements | false | |
--include-private | Include non-exported/private symbols | false | |
--ignore | -i | Ignore file path (can be specified multiple times) | .gitignore |
--include | Glob pattern(s) to include (can be specified multiple times) | ||
--exclude | Glob pattern(s) to exclude (can be specified multiple times) | ||
--include-hidden | Include hidden files | false | |
--no-tree | Skip directory tree | false | |
--no-tokens | Disable token counting | false | |
--max-size | Max file size (bytes) | 512000 | |
--changed | Only scan git-modified files | false | |
--since | Only scan files changed since commit/tag | ||
--token-tree | Show per-file token count tree | false | |
--security-check / --no-security-check | Detect and redact secrets (API keys, tokens, etc.) | true | |
--call-graph | Extract function call relationships per file | false | |
--version | -v | Show version |
# Copy to clipboard for AI assistants
brfit . | pbcopy # macOS
brfit . | xclip # Linux
brfit . | clip # Windows
# Analyze project and save
brfit ./my-project -o briefing.xml
# Include function bodies (full code)
brfit . --include-body
# Skip directory tree output
brfit . --no-tree
# Only scan git-modified files
brfit . --changed
# Only scan files changed since a tag
brfit . --since v1.0.0
# Include imports (verbatim)
brfit . --include-imports
brfit-mcp is a standalone Model Context Protocol server that exposes brfit's code analysis as tools for AI agents. It communicates over stdio (JSON-RPC).
| Tool | Description |
|---|---|
summarize_project | Extract signatures from a project directory. Options: path, format, include_body, include_imports, call_graph |
summarize_file | Extract signatures from files matching a glob pattern. Options: path, include, format |
brfit-mcp --root /path/to/project
{
"mcpServers": {
"brfit": {
"command": "brfit-mcp",
"args": ["--root", "/path/to/project"]
}
}
}
MIT License — Use freely in personal and commercial projects.
See LICENSE for details.
GitHub checked 15h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.