코드베이스를 압축된 심볼 그래프로 매핑하여 AI 코딩 에이전트가 모든 파일을 다시 읽지 않고도 저장소를 탐색할 수 있도록 돕습니다.
다른 이름 glincker/stacklit
- 스타
- 131
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 9일
- 라이선스
- MIT
stacklit MCP란?
stacklit은(는) MCP server입니다. 코드베이스를 압축된 심볼 그래프로 매핑하여 AI 코딩 에이전트가 모든 파일을 다시 읽지 않고도 저장소를 탐색할 수 있도록 돕습니다.
프로젝트 README에서 생성된 요약
stacklit MCP server 정보
Stacklit은 코드베이스를 압축된 심볼 그래프로 매핑하여, AI 코딩 에이전트가 모든 파일을 읽지 않고도 대규모 저장소를 탐색할 수 있는 방법을 제공합니다. tree-sitter를 사용하여 코드를 파싱하고 모듈, export, 의존성 엣지를 포함하는 stacklit.json 파일을 생성합니다. 이러한 방식은 LLM의 토큰 부담을 줄여주며, 실제로 19,500라인 규모의 Go 저장소를 매핑하는 데 단 137개의 토큰만 사용되었습니다.
개발자는 Go 바이너리 또는 npm과 brew를 통해 로컬에서 실행할 수 있습니다. LLM 없이 작동하며 네트워크 호출을 하지 않으므로 개인정보 보호와 결정론적 동작을 보장합니다. 이 도구는 query, slice, impact와 같은 명령어를 포함하는 CLI를 제공하여 에이전트가 특정 코드 위치를 찾을 수 있도록 지원합니다. MCP를 사용하는 경우, stacklit serve 명령어를 통해 AI 어시스턴트와 직접 통합할 수 있는 15개의 도구를 제공합니다.
Python, Rust, TypeScript를 포함한 20개의 특정 언어에 대해 심볼 그래프와 호출 엣지를 지원하며, 총 48개의 언어와 형식을 지원합니다. 이 시스템은 인덱스가 코드와 함께 최신 상태를 유지할 수 있도록 버전 관리 시스템에 커밋하도록 설계되었습니다.
활용 사례
- 1LLM 토큰 소비 감소AI 에이전트가 저장소를 이해하기 위해 전체 파일을 훑는 대신 압축된 지도를 사용할 수 있습니다.
- 2복잡한 의존성 구조 탐색개발자는 심볼 그래프를 사용하여 AI에게 특정 함수 정의나 코드 경로를 찾도록 요청할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
stacklit MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 stacklit MCP 설치
$ claude mcp add stacklit -- npx -y stacklitCursor에 stacklit MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"stacklit": {
"command": "npx",
"args": [
"-y",
"stacklit"
]
}
}
}VS Code에 stacklit MCP 설치
.vscode/mcp.json
{
"servers": {
"stacklit": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"stacklit"
]
}
}
}VS Code CLI에 stacklit MCP 설치
$ code --add-mcp '{"name":"stacklit","type":"stdio","command":"npx","args":["-y","stacklit"]}'Claude Desktop에 stacklit MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"stacklit": {
"command": "npx",
"args": [
"-y",
"stacklit"
]
}
}
}Codex에 stacklit MCP 설치
$ codex mcp add stacklit -- npx -y stacklitCodex config.toml에 stacklit MCP 설치
~/.codex/config.toml
[mcp_servers.stacklit] command = "npx" args = ["-y", "stacklit"]
Gemini CLI에 stacklit MCP 설치
$ gemini mcp add -s user stacklit npx -- -y stacklitGemini settings.json에 stacklit MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"stacklit": {
"command": "npx",
"args": [
"-y",
"stacklit"
]
}
}
}자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
README
GitHub에서 보기Stacklit maps your codebase once and keeps the map fresh. It parses your repo with tree-sitter and writes stacklit.json: modules, exports, dependency edges and hints. Commit it, and your coding agent reads a few hundred tokens instead of crawling your files, then uses a few commands (query, slice, impact) to go straight to the right file.
Free and MIT, no paid tier. One Go binary, local and deterministic, no LLM, and the CLI makes no network calls. (The map page can load language icons from thesvg.org; STACKLIT_MAP_ICONS=off removes that.)
Install
npx stacklit init # scan, write the index, open the map
stacklit setup # wire up the assistants it detects
git add stacklit.json && git commit -m "add stacklit index"
Also: brew install glincker/tap/stacklit, npm install -g stacklit, go install github.com/glincker/stacklit/cmd/stacklit@latest, or a binary from Releases.
See it
Output
stacklit derive prints a compact map for a prompt (gin v1.10.0, 137 tokens, module list trimmed here):
gin | go | 8 modules | 19,537 lines | Gin, GitHub Actions, net/http
test: go test ./... | env: PORT
modules:
binding binding | depends: bytesconv, json
internal/bytesconv bytesconv | depended-by: binding, render, root
render render | depends: bytesconv, json
root root package | depends: binding, bytesconv, json, render
do-not-touch: .github/
stacklit query returns a token-budgeted slice of the symbol graph (output trimmed here):
$ stacklit query "how is the symbol graph built" --budget 600
internal/cli/graphcmds.go
50-63 func buildSymbolGraph(root string, includeTests ...bool) (*graph.SymGraph, error)
calls BuildSymbols E0.95
internal/graph/resolve.go
955-961 func BuildSymbols(root string, files []string, eo ExtractOptions) *SymGraph
What you get
| Index | stacklit.json, a Mermaid diagram (DEPENDENCIES.md by default, set with output.mermaid) and an interactive stacklit.html map |
| Languages | 48 languages and formats indexed; symbol graph for 20 (list) |
| Queries | query, explain, impact, path, hubs, slice, each with a hard --budget |
| MCP | stacklit serve: 15 tools, or --profile minimal for 4 (about 230 tokens of schema) |
| Hooks | git post-commit refresh; optional Claude Code hook that points a grepped identifier to its definition |
| CI | export (graphml, cypher, dot, mermaid and more), check architecture rules, status freshness, merge-graphs, a GitHub Action |
| Deterministic | same repo, same bytes. A committed index only changes when the code does |
| Privacy | no telemetry, no upload. The map loads language logos from thesvg.org unless STACKLIT_MAP_ICONS=off (details) |
Assistants
stacklit setup sets up 25 assistants, including Aider, Cline, Continue, OpenCode, Roo Code and Kiro, plus a generic AGENTS.md (stacklit setup --list shows all 26 targets). Anything else can read stacklit.json directly.
Languages
Stacklit indexes 48 languages and formats (full table). Symbol graph and call edges (query, slice, impact) cover 20 of them.
Symbol graph and call edges (20)
Index only (modules, exports and imports, no call edges)
Anything else gets line counts and language detection.
Benchmark
Two tests, with different answers. The first, with no model in the loop: six pinned repos in six languages, 58 tasks, tokens as bytes / 4. The derived map is 137 to 1,351 tokens. On 47 where-is-X questions one stacklit query with a 1,000 token budget put the right file first on 81% (95% interval 70 to 91) and in the top five on 96%. Grep with a hand written pattern did better, 89% first and 100% in the top five. The 81% was tuned after looking at failures, so treat it as an upper bound. Method and limits: bench/RESULTS.md.
The second is a real agent test, run twice. Round 1: 450 Claude Code sessions (Sonnet, 30 questions, three public repos, plan written before the first run). Stacklit changed how the agent works but did not lower cost overall: pooled cost ratio 1.00 [0.93, 1.07], tokens 1.01 [0.92, 1.10]. It used about a third fewer tool calls (0.68 [0.61, 0.77]), a quarter fewer turns (0.77) and over four fifths fewer grep and glob calls (0.18). Answers were right slightly less often (94.0% to 88.0% on the pre-registered grader, 98.0% to 95.3% audited). Cost ratio by repo (below 1 is cheaper, 50 paired sessions each; full tables, method, limits and the claims we do not make are in bench/agent-ab/RESULTS.md):
| Repo | Size | Cost ratio [95% CI] |
|---|---|---|
| levelrail | about 16,000 files | 0.78 [0.70, 0.86] |
| theauth-go | about 1,300 files | 1.10 [0.98, 1.25] |
| featuredrop | about 400 files | 1.23 [1.14, 1.33] |
Round 2 (650 more sessions, 40 new questions, four repos, bench/agent-ab/RESULTS-round2.md) pointed the same way. The 16,000 file repo was cheaper again (0.89 [0.84, 0.96] with the default wording, 0.87 [0.81, 0.93] with the routed wording). The smaller repos cost more: theauth-go 1.10 and 1.05, featuredrop 1.37 and 1.21, theauth (about 2,900 files) 1.61 and 1.42. Pooled over all four repos a session cost more, not less: 1.17 [1.11, 1.24] and 1.09 [1.04, 1.14]. Tool calls were 0.76 of the no Stacklit count and Grep and Glob calls 0.22 and 0.53. Right answers were equal (97.5%, 97.0%, 97.5%). The model had partly memorised featuredrop, which favours the side without Stacklit. So today Stacklit is for very large repos and "where is it" questions, not for small repos.
When it helps. Locate and add-feature questions ("where is it", "where does a new thing go") were 12 to 22 percent cheaper, mostly on the large repo. Trace questions cost the same and were right less often. "Who imports X" cost 1.59x [1.47, 1.72] because one exact grep already answers it. Small repos cost more, since the map is overhead there. The strict setup (crawl guard plus strict rules) measured worse and is off by default.
Docs
Usage | Languages | FAQ | Privacy | Architecture | Comparison | Roadmap | Changelog | Agent skill | Brand kit
Contributing: .github/CONTRIBUTING.md. Security reports: .github/SECURITY.md. Questions: Discussions.
MIT. See LICENSE.
stacklit MCP 질문
stacklit MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add stacklit -- npx -y stacklit를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
stacklit MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Stacklit이 AI 에이전트를 어떻게 돕나요?
저장소의 압축된 지도를 생성하여 에이전트가 전체 코드베이스를 훑는 대신 query, slice, impact와 같은 명령어를 사용하여 파일을 찾을 수 있게 합니다.
Stacklit을 사용하려면 인터넷 연결이나 LLM이 필요한가요?
아니요, LLM을 사용하지 않는 로컬 기반의 결정론적 도구이며 CLI는 네트워크 호출을 수행하지 않습니다.
Stacklit은 어떤 언어를 지원하나요?
48개의 언어와 형식을 인덱싱하며, 그중 20개 언어에 대해 심볼 그래프와 호출 엣지(call edges)를 제공합니다.
Stacklit은 무료인가요?
네, MIT 라이선스로 제공되는 무료 도구이며 유료 플랜이 없습니다.