
wrxck/srag
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
ツリー・シッター・チャンク、IDEの統合のためのMCPサーバー、プロンプトの注入の検出および秘密の赤字とRustで書かれているSemanticコード検索およびRAGシステム
概要
リポジトリ全体でコード検索を行います。 一度にプロジェクトをインデックス化し、MCP 経由で問い合わせる - AI コーディングアシスタントは、これまでに書いたすべてのパターン、実装、および慣習に即座にアクセスできます。 AI コーディングアシスタントは、コードを書くのに素晴らしいですが、コードがわからない。 すでに1つを持っていると、新しいauthフローを提案します。 右手にロギングパターンを発明します。 既に他のプロジェクトで回答した質問をします。 これを修正します。 あなたのリポジトリをインデックス化し、あなたのアシスタントは、それらを全文的に検索することができます - 何かを説明することなく、関連する実装、パターン、および慣習を見つけます.
概要(AI 翻訳)
リポジトリ全体でコード検索を行います。 一度にプロジェクトをインデックス化し、MCP 経由で問い合わせる - AI コーディングアシスタントは、これまでに書いたすべてのパターン、実装、および慣習に即座にアクセスできます。
なぜ?
AI コーディングアシスタントはコードを書くのが得意ですが、your のコードは知りません。 すでに1つを持っていると、新しいauthフローを提案します。 右手にロギングパターンを発明します。 既に他のプロジェクトで回答した質問をします。
これを修正します。 あなたのリポジトリをインデックス化し、あなたのアシスタントは、それらを全文的に検索することができます - 何かを説明することなく、関連する実装、パターン、および慣習を見つけます。
ユースケース
独自の実装を再利用
“Add OAuthトークンリフレッシュ” → エージェントは、プロジェクト全体で既存の実装を見つけ、既に処理したエッジケースを含むパターンをコピーします。
一貫したコードスタイル
エージェントのクエリ
get_project_patterns] はコードを書く前に、 関数のsnake_caseとPascalCaseを使用して、 スーツを自動的にフォローします
書き込めるもの
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
srag
Semantic code search across all your repositories. Index your projects once, then query them via MCP - your AI coding assistant gains instant access to every pattern, implementation, and convention you’ve ever written.
Why?
AI coding assistants are great at writing code, but they don’t know your code. They’ll suggest a new auth flow when you already have one. They’ll invent a logging pattern when yours is right there. They’ll ask questions you’ve already answered in another project.
srag fixes this. Index your repositories, and your assistant can search across all of them semantically - finding relevant implementations, patterns, and conventions without you having to explain anything.
Use Cases
Reuse your own implementations
“Add OAuth token refresh” → Agent finds your existing implementation across projects, copies the pattern including the edge cases you already handled
Consistent code style
Agent queries
get_project_patternsbefore writing code, sees you usesnake_casefor functions andPascalCasefor types, follows suit automatically
Find that thing you wrote
“How did I handle rate limiting?” → Semantic search finds the relevant code even if you don’t remember which project or what you called it
Cross-project knowledge
Working on project A, need to integrate with an API you’ve used before in project B → Agent finds your previous integration, reuses the error handling and retry logic
Debug with context
“Why is this failing?” → Agent searches for similar error handling patterns in your codebase, finds how you solved the same class of problem before
Onboard yourself
Returning to an old project? Query the index to understand the architecture, find where things are defined, see the patterns that were used
Code review context
“Is this how we usually do it?” → Search for similar implementations to check consistency with established patterns
Find duplication
Pass a code snippet to
find_similar_code→ Discover near-duplicates across your codebase that could be refactored
The real value compounds over time. The more projects you index, the more patterns your assistant can draw from. The quality scales with the model - better models make better use of the retrieved context.
Install
You’ll need Rust and Python 3.10+ installed first.
インストール
npx @modelcontextprotocol/inspector srag mcp