# redcon

Filters and packs repository context and terminal output to match token limits. Useful when hitting weekly subscription caps in coding assistants.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: natiixnt
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/natiixnt/redcon
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/redcon

## What it does

Redcon scores repository files for the current task and trims them down before the agent reads them. The pipeline checks import trees, keyword matches, and Git commit logs. Everything runs locally without vector databases or embedding APIs. Every run yields predictable output.

Instead of dumping a huge context block at once, Redcon gives the assistant nine MCP tools. These include structural code matching with ast-grep, compressed directory views, and log squashing for commands like `pytest` or `git diff`.

Execution requires Python 3.10 or newer on your machine. Without it, running the server via `uvx redcon` fails immediately.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add redcon -- uvx redcon
```
uvx runs the command named after the package; if the README names another one, use uvx --from redcon <command>

### Codex

**Platform CLI**
```bash
codex mcp add redcon -- uvx redcon
```
uvx runs the command named after the package; if the README names another one, use uvx --from redcon <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "redcon": {
            "command": "uvx",
            "args": [
                "redcon"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from redcon <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "redcon": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "redcon"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from redcon <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add redcon uvx redcon
```
uvx runs the command named after the package; if the README names another one, use uvx --from redcon <command>

## When to use it
- fit project context into a strict token budget
- compress terminal logs from `git diff` and test suites
- locate task-relevant code with AST-based structural queries
- prevent early usage cap lockouts on flat-rate AI subscriptions

## Example prompts
- Generate a trimmed project layout using `redcon_repo_map` within a 20000 token limit.
- Find the files most relevant to adding rate limits by invoking `redcon_rank`.
- Run the test suite through `redcon_run` and return only the trimmed failure details.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
