Memungkinkan coding agent untuk melakukan pencarian ripgrep yang sadar token (token-aware) dan pengeditan multi-file secara atomik guna mengurangi penggunaan context window.
Juga dikenal sebagai BasilSkyWalk/parecode
- Stars
- 5
- Tools
- —
- Unduhan, 30 hari
- —
- Versi terbaru
- 0.7.0
- Commit terakhir
- 14 Sep 2026
- Lisensi
- MIT
Apa itu parecode MCP?
parecode adalah MCP server. Memungkinkan coding agent untuk melakukan pencarian ripgrep yang sadar token (token-aware) dan pengeditan multi-file secara atomik guna mengurangi penggunaan context window.
Ringkasan dibuat dari README proyek
Tentang parecode MCP server
Coding agent yang perlu menavigasi codebase besar tanpa menghabiskan context window dapat menggunakan parecode untuk melakukan pencarian yang sadar token dan pengeditan multi-file. Dengan memanfaatkan instalasi ripgrep pada sistem, server ini menyediakan tool seperti ParecodeSearch dan ParecodeEdit yang menggabungkan beberapa pemanggilan tool tradisional menjadi satu operasi tunggal yang efisien. Pendekatan ini dirancang untuk mengurangi konsumsi token sekaligus jumlah turn yang dibutuhkan untuk menyelesaikan tugas refactoring yang kompleks.
Developer yang menggunakan Claude Code dapat menyiapkan server ini secara lokal via npm. Proses instalasi mencakup hook SessionStart opsional untuk memprioritaskan tool khusus ini, serta plugin parecode-explore yang menggunakan subagent lebih murah untuk pertanyaan tipe eksplorasi. Sistem ini beroperasi sepenuhnya di mesin lokal tanpa panggilan jaringan atau telemetri, memastikan data kode dan log sesi tetap privat. Anda dapat memantau efisiensi melalui log sesi lokal yang mengestimasi jumlah token yang berhasil dihemat.
Apa yang bisa Anda lakukan dengannya
- 1Refactoring multi-file yang efisienSeorang agent dapat menemukan setiap call site dari simbol tertentu di beberapa file dan menerapkan perubahan ke semuanya dalam satu batch tunggal.
- 2Eksplorasi kode yang sadar konteksDeveloper dapat menanyakan di mana lokasi komponen tertentu atau bagaimana cara kerja sebuah fungsi menggunakan subagent berbiaya rendah untuk menghemat token sesi utama.
- 3Pencarian kode yang tertargetCari beberapa pola terkait secara bersamaan untuk melacak alur event tanpa harus menjalankan perintah grep terpisah.
- 4Memperluas hasil pencarianSetelah menemukan baris kode tertentu yang menarik, agent dapat memperluas rentang kode yang terlihat tanpa harus membaca ulang seluruh isi file.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal parecode MCP
Format diverifikasi 10 Nov 2026Tambahkan ke CursorTambahkan ke GooseInstal parecode MCP di Claude Code
$ claude mcp add parecode -- npx -y parecodeInstal parecode MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"parecode": {
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}Instal parecode MCP di VS Code
.vscode/mcp.json
{
"servers": {
"parecode": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}Instal parecode MCP di VS Code CLI
$ code --add-mcp '{"name":"parecode","type":"stdio","command":"npx","args":["-y","parecode"]}'Instal parecode MCP di Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"parecode": {
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}Instal parecode MCP di Codex
$ codex mcp add parecode -- npx -y parecodeInstal parecode MCP di Codex config.toml
~/.codex/config.toml
[mcp_servers.parecode] command = "npx" args = ["-y", "parecode"]
Instal parecode MCP di Gemini CLI
$ gemini mcp add -s user parecode npx -- -y parecodeInstal parecode MCP di Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"parecode": {
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}Pengecekan otomatis
Berjalan 14 Nov 2026Laporan lengkap →Lolos checks otomatis kami. Ini bukan audit keamanan: baca kodenya dan berikan server akses paling terbatas yang dibutuhkannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkaubasilskywalk/parecode is public and reachablegithub.com/basilskywalk/parecode ↗Lolos
- Nama paket mencantumkan repositori ini sebagai sumbernyaparecode names basilskywalk/parecode as sourcenpmjs.com/package/parecode ↗Lolos
- Provenance build (atestasi Sigstore)Sigstore attestation for parecodenpmjs.com/package/parecode/v/0.7.0#provenance ↗Lolos
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html ↗Lolos
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-09-14github.com/basilskywalk/parecode ↗Lolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerNo popular package one edit away from parecodeLolos
- Tidak ada advisory kritis pada paket atau dependensinya114 resolved dependencies checked; no critical advisoryosv.dev ↗Lolos
- Tidak ada instruksi tersembunyi untuk model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelTidak diperiksa
- Endpoint remote merespons handshake MCPTidak diperiksa
README
Lihat di GitHubparecode
An MCP server that gives coding agents context-window-aware search and safe, atomic multi-file edits — built to cut token usage on large codebases without giving up correctness.
Requirements
- Node.js 20 or newer (ESM, native test runner, stable
fetch-free runtime). - ripgrep on
PATH(rgon Linux/macOS,rg.exeon Windows). Install via your package manager:- macOS:
brew install ripgrep - Debian/Ubuntu:
apt install ripgrep - Windows:
winget install BurntSushi.ripgrep.MSVCorchoco install ripgrep
- macOS:
- A supported MCP client (Claude Code is the reference target).
Parecode does not bundle ripgrep — it shells out to the system binary so you stay on a single, audited version.
Install
npm install -g parecode
Pure JavaScript — no native dependencies, no C/C++ toolchain required.
Quick start
Register the server with Claude Code:
parecode init # user scope; installs MCP + SessionStart hook + parecode-explore plugin (defaults)
parecode init --scope project # commit MCP config + hook to the repo
parecode init --no-hook # register MCP only; skip the SessionStart hook
parecode init --no-plugin # skip the parecode-explore Claude Code plugin
parecode init --print # print the equivalent command without running it
parecode init --remove-hook # remove the SessionStart hook (MCP stays registered)
parecode init --remove-plugin # uninstall the parecode-explore Claude Code plugin
The SessionStart hook injects a short directive at the start of each session telling Claude to prefer ParecodeSearch / ParecodeEdit over the equivalent native tools. Without it, Claude's first-party Grep / Read / Edit tools typically win by default and Parecode's token savings never land. The hook payload is a static string; parecode hook session-start prints it. Pass --no-hook if you would rather opt in explicitly per session via your own tooling.
The bundled parecode-explore Claude Code plugin adds a read-only subagent (pinned to Haiku, given only ParecodeSearch) and a matching skill, so exploration-style questions ("where is X?", "how does Y work?", "find all usages of Z") get answered in a cheap, isolated context window instead of burning tokens in your main session. init registers a local marketplace pointing at the npm-installed copy and runs claude plugin install parecode-explore@parecode. If your Claude Code build doesn't support the plugin subcommand the step soft-fails with a warning and the rest of init still succeeds; pass --no-plugin to skip it entirely, or --with-plugin to make any plugin-step failure hard-fail.
Then in any session, the ParecodeSearch, ParecodeExpand, and ParecodeEdit tools become available. Run parecode doctor to confirm registration, hook status, and .codegraph/ pairing if present.
What it does
ParecodeSearch— ripgrep-backed search that returns matches with surrounding context windows in a single call, with per-file byte chunking so large result sets do not blow up your context.patternaccepts a single string or an array of strings; arrays dispatch parallel ripgrep runs sharing the samepaths/contextLines, and each match carries apatterns: string[]field listing which input patterns contributed. One call replaces N back-to-back greps for related-keyword flow tracing.- Overlapping or adjacent windows within the same file are merged automatically (gap ≤
contextLines), with bridging lines loaded from disk. - Per-match and response-level
estimatedTokensare returned so the agent can self-budget before consuming results. - Opt-in
relatedSymbols: truesurfaces likely event-flow neighbours (Handle<X>,On<X>,<X>Handler/Listener/Closed/Completed/Started) discovered in each match, capped at 10. - Omitted line ranges are reported so the agent can widen with
ParecodeExpandwithout re-reading the whole file.
ParecodeExpand— widen a known(file, startLine, endLine)range with optionalcontextBefore/contextAfterpadding. Designed as the natural follow-up to aParecodeSearchmatch. Returns the sameestimatedTokensshape so the same self-budgeting heuristic applies. Prefer this over a full-fileReadafter locating a line.ParecodeEdit— batched multi-file edits with whitespace-tolerant fuzzy matching (and an opt-in Unicode-lookalike mode), pre/poststatconflict detection, and atomic same-directory rename writes. Cross-file edits run in parallel.parecode stats— local JSONL session log with token-saved estimates. Zero network. Zero telemetry.
Measured savings
On search-and-edit tasks — finding call sites, multi-file refactors, "do X to every Y" — Parecode cut cost ~40% and assistant turns ~75–83% in matched A/B tests:
| repo | task | cost | turns |
|---|---|---|---|
| TypeScript | find every call site of a symbol, edit each (17 sites, 8 files) | −43% | −83% |
| Unity / C# | find every call site of a symbol, edit each (11 sites, 5 files) | −41% | −76% |
Method: the identical task run with Parecode on vs off, a fresh session per run, n=3 per arm with alternated order, Sonnet 4.6. Savings come from collapsing many Grep / Read / Edit round-trips into single ParecodeSearch / ParecodeEdit calls — so the win scales with how much searching and multi-file fan-out a task involves, and shrinks toward zero on single-file or reasoning-heavy tasks. These are measured per-session token and cost numbers, not the estimates in the scan below.
Retroactive Savings Scan
Curious how much Parecode would have saved you if you had installed it earlier? You can scan your past Claude Code sessions:
parecode stats --retroactive --since 30d
Sample output:
Parecode — last 30d (retroactive scan)
─────────────────────
Sessions: 42
Tool calls: 156
Calls batched (est): 89
Tokens saved (est): 1,200,000
* Note: Retroactive savings are estimated, not measured.
Privacy disclaimer: This scan runs entirely locally against Claude Code's session transcripts (~/.claude/projects/**). By default, it parses only structured fields (tool names, paths, patterns, and token counts). It does not send any data over the network. The --include-content flag (which allows reading tool input/output) is strictly opt-in and loudly flagged if used.
Privacy
Parecode performs no network calls at runtime. Session logs are written to your OS data directory (resolved via env-paths) with 0600 permissions on Unix. Logs are self-maintaining: each server start prunes session data older than 30 days and caps the envelope log at 5 MB. Prune earlier with parecode prune <days> or wipe the data dir. Update to the latest release (and refresh hooks/plugin) with parecode update.
License
Pertanyaan tentang parecode MCP
Bagaimana cara menambahkan parecode MCP ke Claude Code?
Jalankan claude mcp add parecode -- npx -y parecode di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan parecode MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Apakah parecode sudah menyertakan ripgrep?
Tidak, parecode menggunakan system binary yang ada di sistem Anda sehingga Anda bisa menggunakan versi yang sudah Anda audit sendiri.
Seberapa besar penghematan biaya yang bisa saya dapatkan dengan menggunakan parecode?
Dalam pengujian A/B yang sesuai, tool ini memangkas biaya sekitar 40% dan mengurangi jumlah turn asisten sebesar 75–83% pada tugas pencarian dan pengeditan.