トークン数を意識したripgrep検索と、アトミックな複数ファイル編集をコーディングエージェントに提供し、コンテキストウィンドウの使用量を削減します。
別名 BasilSkyWalk/parecode
- スター
- 5
- ツール
- —
- ダウンロード数(30日間)
- —
- 最新バージョン
- 0.7.0
- 最終コミット
- 2026年9月14日
- ライセンス
- MIT
parecode MCPとは
parecodeはMCPサーバーです。 トークン数を意識したripgrep検索と、アトミックな複数ファイル編集をコーディングエージェントに提供し、コンテキストウィンドウの使用量を削減します。.
プロジェクトのREADMEから生成された概要
parecode MCP server について
コンテキストウィンドウを使い果たすことなく大規模なコードベースを操作する必要があるコーディングエージェントは、parecodeを使用してトークンを意識した検索と複数ファイルへの編集を行うことができます。システムのripgrepを利用することで、このMCP serverはParecodeSearchやParecodeEditといったツールを提供し、従来の複数のツール呼び出しを単一の効率的な操作に集約します。このアプローチは、トークン消費量と、複雑なリファクタリングタスクを完了するために必要なターン数の両方を削減するように設計されています。
Claude Codeを使用している開発者は、npm経由でこのサーバーをローカルにセットアップできます。インストールプロセスには、これらの特化型ツールを優先させるためのオプションのSessionStartフックと、探索的な質問に対して低コストなサブエージェントを使用するparecode-exploreプラグインが含まれています。システムは完全にローカルマシン上で動作し、ネットワーク通信やテレメトリは行われないため、コードデータやセッションログのプライバシーが確保されます。ユーザーは、節約されたトークン数を推定するローカルのセッションログを通じて、効率をモニタリングできます。
できること
- 1効率的な複数ファイルのリファクタリングエージェントは、複数のファイルにわたる特定のシンボルのすべての呼び出し箇所を見つけ出し、それらすべてに対して単一のバッチで変更を適用できます。
- 2コンテキストを意識したコード探索開発者は、メインセッションのトークンを節約するために、低コストなサブエージェントを使用して、特定のコンポーネントの場所や関数の動作について質問できます。
- 3ターゲットを絞ったコード検索個別のgrepコマンドを実行することなく、複数の関連するパターンを同時に検索してイベントフローを追跡できます。
- 4検索結果の範囲拡大関心のある特定の行を見つけた後、エージェントはファイル全体を読み直すことなく、表示されるコードの範囲を広げることができます。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
parecode MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude Codeにparecode MCPをインストール
$ claude mcp add parecode -- npx -y parecodeCursorにparecode MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"parecode": {
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}VS Codeにparecode MCPをインストール
.vscode/mcp.json
{
"servers": {
"parecode": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}VS Code CLIにparecode MCPをインストール
$ code --add-mcp '{"name":"parecode","type":"stdio","command":"npx","args":["-y","parecode"]}'Claude Desktopにparecode MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"parecode": {
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}Codexにparecode MCPをインストール
$ codex mcp add parecode -- npx -y parecodeCodex config.tomlにparecode MCPをインストール
~/.codex/config.toml
[mcp_servers.parecode] command = "npx" args = ["-y", "parecode"]
Gemini CLIにparecode MCPをインストール
$ gemini mcp add -s user parecode npx -- -y parecodeGemini settings.jsonにparecode MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"parecode": {
"command": "npx",
"args": [
"-y",
"parecode"
]
}
}
}自動チェック
実行日 2026年11月14日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能basilskywalk/parecode is public and reachablegithub.com/basilskywalk/parecode ↗合格
- パッケージがこのリポジトリをソースとして指定parecode names basilskywalk/parecode as sourcenpmjs.com/package/parecode ↗合格
- ビルドの来歴 (Sigstore 証明)Sigstore attestation for parecodenpmjs.com/package/parecode/v/0.7.0#provenance ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-09-14github.com/basilskywalk/parecode ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していないNo popular package one edit away from parecode合格
- パッケージおよびその依存関係に重大な勧告なし114 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で見るparecode
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
parecode MCPのよくある質問
parecode MCPをClaude Codeに追加するには
ターミナルでclaude mcp add parecode -- npx -y parecodeを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
parecode MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
parecodeにはripgrepが同梱されていますか?
いいえ、システムのバイナリを呼び出すため、ユーザー自身が監査済みのものを使用することになります。
parecodeを使用することで、どの程度コストを削減できますか?
A/Bテストの結果では、検索および編集タスクにおいて、コストを約40%削減し、アシスタントのターン数を75〜83%削減できました。