repoflux
Click on "Deploy 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., "@repofluxpack this repo into a 32k-token snapshot for Claude"
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.
repoflux
Deterministic repository context bundler and Model Context Protocol (MCP) server for language model workflows.
repoflux packages entire codebases into structured, token-bounded context payloads for OpenAI Codex, ChatGPT, Cursor, and autonomous coding agents. It scans repositories, parses AST declarations, calculates exact BPE token weights, strips credentials, and hosts an stdio MCP server for agentic IDEs.
Installation & Quick Start
Execute directly via npx:
# Bundle repository into default XML context
npx repoflux
# Copy prompt context directly to clipboard
npx repoflux -c
# Extract symbol outlines (functions, classes, interfaces) without loading file bodies
npx repoflux -s
# Only pack files changed in uncommitted git diff
npx repoflux -d
# Generate interactive HTML report with token distributions
npx repoflux --html
# Inspect project dependencies across Node, Rust, Python, Go
npx repoflux --deps
# Run live watch mode to regenerate bundle on file save
npx repoflux -wOr install globally:
npm install -g repofluxRelated MCP server: agentless-mcp
Technical Capabilities
Zero-Dependency Architecture: Written in native TypeScript with no external runtime dependencies, providing sub-50ms execution.
Symbol Outline Extraction (
-s): Parses declarations and function signatures across TypeScript, JavaScript, Python, Go, and Rust without bloating context windows.Git Diff Scoping (
-d): Isolates uncommitted changes or recent commit deltas for pull request code reviews.Automated Credential Redaction: Scans files against regex patterns for OpenAI, Anthropic, AWS, GitHub, Stripe, and private keys, replacing them with redaction placeholders.
Deterministic Token Budgeting (
-m): Estimates BPE subword tokens using cl100k/o200k calibrated heuristics and enforces hard budget ceilings.Model Context Protocol (MCP): Connects to OpenAI Codex, Cursor, and developer agents as an stdio server with tools for repo mapping, symbol inspection, and diff analysis.
HTML Visualizer (
--html): Compiles an offline, single-file HTML report with token distribution statistics and code trees.Exclusion Engine: Parses
.gitignoreand.repofluxignorealongside standard build and binary file exclusions.
Command-Line Interface
Option | Flag | Description | Default |
|
| Output file path |
|
|
| Serialization format ( |
|
|
| Hard token budget limit | Unlimited |
|
| Copy output bundle directly to system clipboard |
|
|
| Extract function and class signatures only |
|
|
| Filter bundle to modified files from git diff |
|
| Print dependency graph across package manifests |
| |
| Generate self-contained HTML inspection report |
| |
|
| Watch filesystem and re-bundle on save |
|
|
| Prepend custom instructions or system prompt | None |
|
| Print directory tree with token distribution |
|
| Launch MCP JSON-RPC server over stdio |
| |
| Disable automatic credential sanitization |
|
OpenAI Codex & ChatGPT Integration
repoflux compiles structured codebase context optimized for OpenAI models (GPT-4o, o1, o3, Codex):
Web & CLI Pair Programming
Generate a sanitized, token-budgeted prompt bundle directly to clipboard and paste into ChatGPT Pro / Codex:
# Bundle whole repo and copy to clipboard
npx repoflux -c
# Pass symbol outlines for fast architectural review
npx repoflux -s -cGitHub Actions PR Review Bot with OpenAI
Automate incoming pull request reviews in CI using repoflux and the OpenAI API:
- name: Bundle Changed Files
run: npx repoflux -d -f markdown -o pr_context.md
- name: Run Codex Review
run: |
curl https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer ${{ secrets.OPENAI_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"model\": \"gpt-4o\", \"messages\": [{\"role\": \"user\", \"content\": \"Review this pull request diff: $(cat pr_context.md)\"}]}"Model Context Protocol (MCP) Configuration
For agentic IDEs and OpenAI coding assistants (such as Cursor or MCP-enabled agents), add repoflux to your MCP configuration file:
{
"mcpServers": {
"repoflux": {
"command": "npx",
"args": ["-y", "repoflux", "--mcp"]
}
}
}Available MCP Tools
get_repo_map: Returns ASCII directory tree with per-file token allocations.pack_codebase: Returns full sanitized repository context bounded by token limits.get_symbol_outline: Returns AST function and class outlines.get_git_diff: Extracts current diff for review workflows.get_dependencies: Returns dependency manifest details.audit_secrets: Audits repository files for leaked credentials.
Test Suite & Verification
# Build TypeScript
npm run build
# Run native test runner
npm testLicense
MIT License (c) 2026 apple sauce
This server cannot be deployed
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceLocal-first code intelligence MCP server that enables coding agents to search code, inspect structure, read exact ranges, and explore Git history with explicit token budgets.33Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to perform deterministic, model-free repository analysis and patch operations—tree-sitter repo maps, symbol/reference lookup, and SEARCH/REPLACE parsing/validation—via a CLI or MCP stdio server, without ever calling a language model.1MIT
- AlicenseAqualityAmaintenanceRead-only MCP server that gives Claude Code and Codex clean, token-efficient codebase context, with API keys and passwords masked automatically.828Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to retrieve repository context through stdio-based MCP tools, including ranked repo maps, context packs, and live symbol search.4 npmMIT