/ 디렉터리 / 플레이그라운드 / lean-ctx
● 커뮤니티 yvgude ⚡ 바로 사용

lean-ctx

제작: yvgude · yvgude/lean-ctx

컨텍스트를 공격적으로 정리하는 Rust 도구 — 불필요한 import 제거, 주석 단축, 로그 압축 후 에이전트로 전송.

lean-ctx는 비용에 민감한 사용자를 위한 도구입니다: 에이전트 하네스와 사용자 사이에 위치하여 나가는 컨텍스트에 token 절감 변환을 적용합니다. Claude Code, Codex, Cursor에서 동작합니다.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

준비됨

설치

클라이언트 선택

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "lean-ctx-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/yvgude/lean-ctx"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop → Settings → Developer → Edit Config 열기. 저장 후 앱 재시작.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "lean-ctx-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/yvgude/lean-ctx"
      ],
      "_inferred": true
    }
  }
}

Cursor는 Claude Desktop과 동일한 mcpServers 스키마 사용. 프로젝트 설정이 전역보다 우선.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "lean-ctx-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/yvgude/lean-ctx"
      ],
      "_inferred": true
    }
  }
}

Cline 사이드바의 MCP Servers 아이콘 클릭 후 "Edit Configuration" 선택.

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "lean-ctx-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/yvgude/lean-ctx"
      ],
      "_inferred": true
    }
  }
}

Claude Desktop과 같은 형식. Windsurf 재시작 후 적용.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "lean-ctx-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/yvgude/lean-ctx"
      ]
    }
  ]
}

Continue는 맵이 아닌 서버 오브젝트 배열 사용.

~/.config/zed/settings.json
{
  "context_servers": {
    "lean-ctx-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/yvgude/lean-ctx"
        ]
      }
    }
  }
}

context_servers에 추가. 저장 시 Zed가 핫 리로드.

claude mcp add lean-ctx-skill -- git clone https://github.com/yvgude/lean-ctx

한 줄 명령. claude mcp list로 확인, claude mcp remove로 제거.

사용 사례

실전 활용법: lean-ctx

세션 token 사용량 40~70% 절감

👤 Claude Code 사용자 ⏱ ~15 min intermediate

언제 쓸까: 청구서가 올라가고 컨텍스트 비대가 의심될 때.

흐름
  1. 설치
    lean-ctx를 하네스에 연결합니다.✓ 복사됨
    → 전처리 필터 활성화
  2. 측정
    before/after token 수를 비교합니다.✓ 복사됨
    → 큰 감소
  3. 조정
    정확도가 떨어지면 완화합니다.✓ 복사됨
    → 안정적인 균형

결과: 동일한 작업 성공률로 더 낮은 청구서.

조합

다른 MCP와 조합해 10배 효율

lean-ctx-skill + cmux-skill

lean-ctx가 정리하는 동안 token 그래프 보기

lean-ctx-skill과 cmux-skill 조합: lean-ctx가 정리하는 동안 token 그래프 확인✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
prefilter (문서 참조) 나가는 컨텍스트에 실행 호출 1회

비용 및 제한

운영 비용

API 쿼터
해당 없음
호출당 토큰
token 절감
금액
무료 OSS
품질 저하를 측정하세요; 공격적 모드는 중요한 컨텍스트를 제거할 수 있습니다

보안

권한, 시크릿, 파급범위

자격 증명 저장: 없음
데이터 외부 송신: 없음

문제 해결

자주 발생하는 오류와 해결

에이전트가 컨텍스트를 놓침

공격성 낮추기; 중요한 파일 화이트리스트 추가

대안

lean-ctx 다른 것과 비교

대안언제 쓰나단점/장점
context-mode샌드박스 도구 출력을 원할 때다른 레이어

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기