index, search, read, grep, neighbors 툴셋을 사용하여 LLM agent가 인덱스를 기반으로 필요한 문서 섹션만 요청 시점에 가져올 수 있도록 합니다.
다른 이름 mi2arun/contextpull
- 스타
- 0
- Tools
- —
- 다운로드, 30일
- 352
- 최신 버전
- 0.2.1
- 마지막 커밋
- 2026년 11월 4일
- 라이선스
- MIT
ContextPull MCP란?
ContextPull은(는) MCP server입니다. index, search, read, grep, neighbors 툴셋을 사용하여 LLM agent가 인덱스를 기반으로 필요한 문서 섹션만 요청 시점에 가져올 수 있도록 합니다.
프로젝트 README에서 생성된 요약
ContextPull MCP server 정보
ContextPull은 대규모 문서 컬렉션을 다루는 개발자가 LLM agent에게 필요한 문서 섹션만 요청 시점에 제공할 수 있게 해줍니다. 전체 파일을 프롬프트에 밀어넣는 대신, 항상 존재하는 작은 인덱스를 사용하여 agent가 필요한 콘텐츠만 가져올 수 있습니다. 이 방식은 모델이 무관한 데이터를 받는 것을 방지하고 토큰 사용량을 더 효과적으로 관리하도록 돕습니다.
사용자는 Python, TypeScript 또는 Go를 사용하여 서버를 로컬에 설정할 수 있으며, 단일 SQLite 파일을 사용하여 완전히 오프라인으로 작동합니다. Markdown, text, docx, xlsx, pptx, PDF를 포함한 다양한 파일 형식을 지원합니다. 시스템은 index, search, read, grep, neighbours의 다섯 가지 핵심 툴을 제공합니다. 이를 통해 agent는 특정 섹션을 찾거나, 텍스트를 그대로 읽거나, 특정 헤딩 주변의 문맥을 찾아내며 코퍼스를 탐색할 수 있습니다.
Claude Code 또는 MCP 호환 호스트와 쉽게 통합할 수 있습니다. 개발자는 문서 폴더를 인입하여 검색 가능한 저장소를 생성할 수 있으며, 이를 stdio 또는 읽기 전용 공유 HTTP 서버를 통해 제공할 수 있습니다.
활용 사례
- 1특정 정책 세부 정보 검색search 및 read 툴을 사용하여 agent가 대규모 정책 문서 내의 특정 조항을 찾아 읽도록 요청합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
ContextPull MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 ContextPull MCP 설치
$ claude mcp add contextpull -- uvx contextpullCursor에 ContextPull MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"contextpull": {
"command": "uvx",
"args": [
"contextpull"
]
}
}
}VS Code에 ContextPull MCP 설치
.vscode/mcp.json
{
"servers": {
"contextpull": {
"type": "stdio",
"command": "uvx",
"args": [
"contextpull"
]
}
}
}VS Code CLI에 ContextPull MCP 설치
$ code --add-mcp '{"name":"contextpull","type":"stdio","command":"uvx","args":["contextpull"]}'Claude Desktop에 ContextPull MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"contextpull": {
"command": "uvx",
"args": [
"contextpull"
]
}
}
}Codex에 ContextPull MCP 설치
$ codex mcp add contextpull -- uvx contextpullCodex config.toml에 ContextPull MCP 설치
~/.codex/config.toml
[mcp_servers.contextpull] command = "uvx" args = ["contextpull"]
Gemini CLI에 ContextPull MCP 설치
$ gemini mcp add -s user contextpull uvx -- contextpullGemini settings.json에 ContextPull MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"contextpull": {
"command": "uvx",
"args": [
"contextpull"
]
}
}
}자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능mi2arun/contextpull is public and reachablegithub.com/mi2arun/contextpull ↗통과
- 패키지가 이 저장소를 소스로 명시contextpull, contextpull name mi2arun/contextpull as sourcepypi.org/project/contextpull/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for contextpullpypi.org/project/contextpull/ ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-04github.com/mi2arun/contextpull ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from contextpull, contextpull통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음1 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기ContextPull
Website: https://mi2arun.github.io/contextpull/ · demo · docs · MCP Registry io.github.mi2arun/contextpull
Pull, don't push. ContextPull turns a folder of documents into something an LLM agent can pull from the way Claude Code pulls from a codebase: a small index that is always in context, and five tools that return exact sections on demand. The model never receives content it did not ask for.
Zero runtime dependencies. One SQLite file. Works offline.
ContextPull ships with a companion, ragbisect (formerly stagewise): a neutral benchmark harness that builds an eval set from your corpus and scores ContextPull next to bm25, dense and hybrid pipelines. Two names, one project, kept apart so the measurement stays independent of the thing it measures.
Status
M1 to M3 are built: store, ingest, the five operations, CLI, conformance suite, MCP server, Claude Code integration, LLM summaries, protocol client examples, ragbisect adapters, and a TypeScript reader and server. See the roadmap.
Measured
uv documentation, 603 sections, 221 self-generated questions, recall@5, from docs/testing.md:
| config | recall@5 | ms/q | model tokens/q |
|---|---|---|---|
| hybrid push (dense + bm25) | 0.964 | 69 | 0 |
| bm25 push | 0.923 | 5 | 0 |
| pull, Claude Code (10-question sample) | 1.000 | 26,565 | 86,656 |
| pull, gpt-5.4-mini with reasoning off | 0.615 | 16,023 | 10,891 |
A strong agent reads the right section every time; a small no-reasoning model reads the right section when it reads (NDCG 0.96 given a hit) but misses the gold section on 38% of questions. Push retrieval is nearly free per query; pull costs tens of thousands of tokens. Both facts are in the table on purpose. The model's own searches surfaced the gold section on 88% of a sample, so most of the gap is snippets being answered from rather than read; a stricter prompt did not change that. An earlier version of this table showed 0.045 for the small model; that number came from a threading bug in the benchmark adapter and is retracted in docs/testing.md.
Try it
Fastest: ./scripts/demo.sh ingests the bundled fixture corpus and walks through index, search, read and grep, then prints the exact claude mcp add line. ./scripts/demo.sh ./your-docs does the same on your own folder.
uv tool install contextpull # or: pip install contextpull (PyPI: contextpull 0.2.0)
contextpull ingest ./docs # writes .contextpull/store.sqlite
contextpull index # the always-in-context table of contents
contextpull search "refund window" --in policy-2025.md
contextpull read policy-2025.md#3 --context 1
contextpull grep TX-4419
contextpull neighbours specs.md#1
contextpull export-chunks > chunks.jsonl # ragbisect-compatible sections
In Claude Code
claude mcp add contextpull -- uvx --from "contextpull[mcp]" contextpull serve ./docs
The server ingests ./docs into ./docs/.contextpull/store.sqlite, puts the index into its instructions so it is always in context, and exposes the five tools. Ask a question; the trace shows search, then read, then an answer with [path.md#3] citations. contextpull claude-md prints a CLAUDE.md snippet if you want to tell the model about it explicitly. Add --summarizer openai:gpt-5.4-mini for model-written one-line summaries in the index (cached by document hash).
Any other MCP host works the same way; see examples/clients/ for TypeScript, Go and Java protocol clients and examples/direct_api_loop.py for using the tools straight from a model API with no server.
More
uv sync --extra pdf # PDFs: headings inferred from font size
uv run contextpull ingest ./docs --embed-model openai:text-embedding-3-small # enables: search --mode hybrid
uv run contextpull serve ./docs --transport http --port 8765 # streamable HTTP at /mcp for a shared read-only server
As a library
Embedding it in your own product, with access control and air-gap notes: docs/embedding.md and examples/embed_with_acl.py.
from contextpull import Store, Ops
with Store.open(".contextpull/store.sqlite") as store:
ops = Ops(store)
print(ops.index())
hits = ops.search("refund window", in_=["policy-2024.md", "policy-2025.md"]).hits
for h in hits:
print(h.id, h.heading_path, h.snippet)
section = ops.read(hits[0].id).section
Tool definitions for any model API are in contextpull.tools.TOOLS (Anthropic shape) and openai_tools(); tools.json at the repo root is the same thing for other languages.
How it works
- Ingest parses Markdown, text, docx, xlsx, pptx and (with the
pdfextra) PDF into headings, paragraphs, tables and code, and cuts heading-aware sections with stable ids likepolicy-2025.md#3. Tables and code are never split mid-block; long tables are split by rows and every part carries the header. Unchanged files are skipped on re-ingest. - Store is one SQLite file with an FTS5 index whose tokenizer keeps identifiers whole (
--no-cache,UV_CACHE_DIR,TX-4419,3.12). - Index is a token-budgeted table of contents, one line per document, delivered into the model's context. It goes hierarchical when a corpus is too large for the budget.
- Tools:
index,search(ids and snippets, never bodies),read(verbatim),grep(exact matches),neighbours(the header row, the next clause).
Node
sdk/typescript/ is a store-native reader and MCP server in TypeScript over better-sqlite3: open the same store file, no Python at query time. Published to npm as contextpull.
npx contextpull serve /path/store.sqlite # npm: contextpull 0.1.0
claude mcp add contextpull -- npx -y contextpull serve /path/store.sqlite
It passes the same conformance suite as the Python reference and returns identical results over MCP. Ingest stays in Python (npx contextpull ingest delegates to uvx contextpull ingest).
Go
sdk/go/ is a store-native reader and a single static binary server, pure Go, no cgo: the shape for a shared read-only deployment.
cd sdk/go && go build -o contextpull-server ./cmd/contextpull-server
./contextpull-server serve /data/store.sqlite --http 0.0.0.0:8765 # or without --http for stdio
Same conformance suite, identical results to Python over MCP.
Other languages
The store file is the contract. docs/store-format.md says what a reader must do; conformance/ holds a fixture corpus, its store and expected results. An SDK in any language is done when check passes. See the SDK plan.
Docs
Start at docs/README.md: architecture, design, system design, tool reference, evaluation, roadmap, decision records.
Measured with ragbisect, which lives next door.
ContextPull MCP 질문
ContextPull MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add contextpull -- uvx contextpull를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
ContextPull MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
ContextPull을 사용하려면 인터넷 연결이 필요한가요?
아니요, 단일 SQLite 파일을 사용하여 오프라인으로 작동하며 런타임 종속성이 없습니다.
ContextPull이 지원하는 파일 형식은 무엇인가요?
Markdown, text, docx, xlsx, pptx 및 PDF 파일을 파싱할 수 있습니다.
대규모 표나 코드 블록은 어떻게 처리하나요?
표와 코드는 블록 중간에서 분할되지 않습니다. 긴 표는 행 단위로 분할되며 모든 부분에 헤더가 포함됩니다.