High-performance local search and indexing engine for large codebases
Project description
Sari – 로컬 코드 검색/인덱싱 MCP 서버
Sari는 로컬에서 동작하는 코드 검색/인덱싱 MCP 서버입니다. 소스코드를 외부로 보내지 않고, 로컬에서 빠르게 검색하도록 설계되어 있습니다.
0. 소개
Sari는 다음을 제공합니다.
- 대규모 코드베이스 로컬 인덱싱/검색
- MCP stdio 기반 연동
- 다중 워크스페이스 수집
- 명확한 설정/데이터 경로 분리
1. 설치
Sari는 현재 활성화된 파이썬 환경에 설치됩니다. uv를 쓰는 경우 venv가 필요합니다.
1.1 uv + venv (권장)
uv venv .venv
uv pip install sari
업데이트:
uv pip install -U sari
1.2 pip
pip install sari
2. stdio (MCP 기본 운용)
stdio는 데몬 프록시로 동작합니다.
즉, stdio를 사용하려면 데몬이 필요합니다.
2.1 데몬 시작
sari daemon start -d
2.2 실행 (stdio)
python -m sari --transport stdio
2.3 Gemini CLI 설정 (stdio)
~/.gemini/settings.json
{
"mcpServers": {
"sari": {
"command": "/abs/path/to/.venv/bin/python",
"args": ["-m", "sari", "--transport", "stdio"],
"env": {
"SARI_CONFIG": "/abs/path/to/project/.sari/config.json"
}
}
}
}
2.4 Codex CLI 설정 (stdio)
~/.codex/config.toml
[mcp_servers.sari]
command = "/abs/path/to/.venv/bin/python"
args = ["-m", "sari", "--transport", "stdio"]
env = { SARI_CONFIG = "/abs/path/to/project/.sari/config.json" }
3. HTTP 모드 (선택)
HTTP 모드는 stdio와 분리된 별도 프로세스로 운영합니다.
python -m sari --transport http --http-api
기본 엔드포인트:
http://127.0.0.1:47777/mcp
4. 데이터/로그 경로
- 전역 DB:
~/.local/share/sari/index.db - 전역 레지스트리:
~/.local/share/sari/server.json - 로그:
~/.local/share/sari/logs - 워크스페이스 설정:
<workspace>/.sari/config.json또는<workspace>/sari.json - 전역 설정:
~/.config/sari/config.json
5. 다중 워크스페이스
5.1 CLI
sari roots add /path/to/workspaceA
sari roots add /path/to/workspaceB
sari roots list
5.2 설정 파일
{
"workspace_roots": [
"/path/to/workspaceA",
"/path/to/workspaceB"
]
}
주의:
- 상위/하위가 중첩되는 경로는 피하세요.
6. 설정 예시
{
"workspace_root": "/path/to/workspace",
"workspace_roots": ["/path/to/workspaceA", "/path/to/workspaceB"],
"db_path": "/custom/path/index.db",
"include_ext": [".py", ".js", ".ts", ".java", ".rs"],
"include_files": ["Dockerfile", "Makefile"],
"exclude_dirs": [".git", "node_modules", ".sari"],
"exclude_globs": ["**/dist/**"],
"max_depth": 20,
"scan_interval_seconds": 180,
"store_content": true
}
7. 업데이트
uv pip install -U sari
8. 트러블슈팅
문제가 발생하면 TROUBLESHOOTING.md를 확인하세요.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sari-0.5.9.tar.gz.
File metadata
- Download URL: sari-0.5.9.tar.gz
- Upload date:
- Size: 247.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
177da157d8905700156814335818bd8696520edff29bc1e01002bcabeed4e5f5
|
|
| MD5 |
ab935796dac031c5e73721babbb56dd0
|
|
| BLAKE2b-256 |
1e2a828b5e39f66f920a110b476390bb5f6d22c5f888a757b4db99eb2dafe1a3
|
File details
Details for the file sari-0.5.9-py3-none-any.whl.
File metadata
- Download URL: sari-0.5.9-py3-none-any.whl
- Upload date:
- Size: 240.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a49a098158b1c58f6330571721680951584fb82fb6fc17ce59c9523a67d9acca
|
|
| MD5 |
8e47efbbc0c2d84b43c5ac365010e859
|
|
| BLAKE2b-256 |
9d2ccb594cf880a7068c784d2bf3231eb1e2d494408b6f8403b482101e96bc14
|