Skip to main content

High-performance local search and indexing engine for large codebases

Project description

Sari - Local MCP Code Search + Daemon + Dashboard

한국어 문서

Sari is a local-first MCP server for large codebases. It provides:

  • Fast local indexing/search
  • Multi-workspace registration
  • Daemon lifecycle management
  • Web dashboard for runtime/index visibility

Your code stays on your machine.

Quick Start

1. Install

Recommended:

uv tool install sari

Check install path:

which sari

2. Start daemon

sari daemon start -d

3. Register workspaces to index

sari roots add /absolute/path/to/repo-a
sari roots add /absolute/path/to/repo-b
sari roots list

4. Open dashboard

Default URL:

http://127.0.0.1:47777/

The dashboard shows status, health, workspace list, and per-workspace indexed file counts.

5. Verify runtime

sari daemon status
sari status

MCP Setup

Minimal MCP server configuration (recommended):

Codex CLI (~/.codex/config.toml)

[mcp_servers.sari]
command = "sari"
args = ["--transport", "stdio", "--format", "pack"]

Gemini CLI (~/.gemini/settings.json)

{
  "mcpServers": {
    "sari": {
      "command": "sari",
      "args": ["--transport", "stdio", "--format", "pack"]
    }
  }
}

You can also generate host-specific config snippets:

sari --cmd install --host codex --print
sari --cmd install --host gemini --print

Workspace Registration Model

Sari uses config roots (not per-CLI hardcoded workspace env).

Primary commands:

sari roots add /abs/path
sari roots remove /abs/path
sari roots list

Config location resolution:

  1. <workspace>/.sari/mcp-config.json if present
  2. Fallback: ~/.config/sari/config.json

Daemon Lifecycle (Current Policy)

  • Sari runs a single daemon endpoint per target host/port.
  • If version mismatch is detected, daemon is replaced on same endpoint.
  • Daemon autostop is session-aware:
    • If at least one active client session exists, daemon stays alive.
    • If active sessions drop to 0, daemon stops after grace period.
  • Orphan index workers are handled with two safety layers:
    • Worker self-termination when parent daemon is gone.
    • sari daemon stop orphan sweep.

Useful commands:

sari daemon start -d
sari daemon ensure
sari daemon status
sari daemon stop
sari daemon refresh

Dashboard and HTTP Endpoints

When daemon HTTP is up, these endpoints are available:

  • / : Dashboard UI
  • /health : Liveness
  • /status : Runtime/index/system summary
  • /workspaces : Registered workspace state
  • /search?q=...&limit=... : HTTP search
  • /rescan : Trigger rescan
  • /health-report : Extended diagnostics

Example:

curl "http://127.0.0.1:47777/status"
curl "http://127.0.0.1:47777/workspaces"

Common Operations

Force rescan

sari --cmd index

Doctor

sari doctor

Show active config

sari --cmd config show

Data Paths

  • DB: ~/.local/share/sari/index.db
  • Registry: ~/.local/share/sari/server.json
  • Logs: ~/.local/share/sari/logs/
  • Global config: ~/.config/sari/config.json
  • Workspace config: <workspace>/.sari/mcp-config.json

Troubleshooting

Dashboard shows CJK tokenizer dictionary error

If the environment was installed before the dependency update, install or upgrade:

uv pip install lindera-python-ipadic

Port conflict

sari daemon stop
sari daemon start -d --daemon-port 47789

CLI updated but daemon still old

sari daemon refresh

Upgrade / Remove

uv tool upgrade sari
uv tool uninstall sari

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

sari-0.6.32.tar.gz (493.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sari-0.6.32-py3-none-any.whl (425.6 kB view details)

Uploaded Python 3

File details

Details for the file sari-0.6.32.tar.gz.

File metadata

  • Download URL: sari-0.6.32.tar.gz
  • Upload date:
  • Size: 493.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sari-0.6.32.tar.gz
Algorithm Hash digest
SHA256 305f13f0920b15ad2d076f38d037958cd8dd398a59ea2bb5e0d45c3cdb33e75d
MD5 81775cf3782d8add68a0971503329c5e
BLAKE2b-256 3043d5dbea33d69f249b6a6d2c6f38f4de845e394e4bbca933f29b1d4c7c5b24

See more details on using hashes here.

File details

Details for the file sari-0.6.32-py3-none-any.whl.

File metadata

  • Download URL: sari-0.6.32-py3-none-any.whl
  • Upload date:
  • Size: 425.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sari-0.6.32-py3-none-any.whl
Algorithm Hash digest
SHA256 1c45864f684a746d79327c550091451cfeedb480b119786d691d3565b79217e5
MD5 0ba487905f38bf375c1d22d829ed91ea
BLAKE2b-256 c0f13499a8d9627e56e546f5d1c130b99a3c4e7fbffbb8b0983a11de5fa11529

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page