Krep MCP Server
Krep MCP サーバー
infinity-topos環境向けのMCP(モデルコンテキストプロトコル)統合型高性能文字列検索ユーティリティです。これは、grepなどの従来のツールを大幅に上回る超高速パターンマッチングユーティリティであるkrepのラッパーです。
THE KREP-MCP-SERVER ABSURDITY DIAGRAM
====================================
+-----------------------------------------------------+
| |
| The KREP MCP Redundancy Zone |
| |
+-----^--------------------+------------------------+-+
| | |
+-----------+----------+ +------+-------------+ +------+-------+
| | | | | |
| M E T A D A T A | | F U N C T I O N | | B I N A R Y |
| E X P L O S I O N | | N A M E C H A O S| | H U N T |
| | | | | |
+-----+----------+-----+ +---+-----------+----+ +------+-------+
| | | | |
v v v v v
+--------+--+ +----+-----+ +---+----+ +---+-----+ +----+------+
| | | | | | | | | |
| "Unified" | | 37 Paths | | krep | |krepSearch| | 5 Error |
| Function | | To Find | | | |krepMatch | | Handlers |
| That Does | | The Same | | | |krepCount | | For |
| 3 Things | | Binary | | | | | | 1 Error |
| | | | | | | | | |
+-----------+ +----------+ +--------+ +----------+ +-----------+
+-----------------------------------------------------+
| |
| Configuration & Shell Script Hell |
| |
+-----^--------------------+------------------------+-+
| | |
+-----------+----------+ +------+-------------+ +------+-------+
| | | | | |
| 3 Scripts to | | Integer | | Test Mode |
| Install 1 Thing | | Arithmetic in | | that Mocks |
| | | Shell that says | | Success When|
| | | 0 + 0 = Syntax | | Everything |
| | | Error | | Fails |
+----------------------+ +--------------------+ +--------------+
"It's not redundant if it's resilient!"
- MCP Engineer, probably概要
Krep MCP Serverは、grepに似た高性能な文字列検索ユーティリティであるkrepバイナリへの統合インターフェースを提供します。krepは、最適化されたアルゴリズムとマルチスレッド機能を備えています。モデルコンテキストプロトコルを介してkrepの機能を公開することで、AIアシスタントがファイルや文字列内で効率的なパターン検索を実行できるようにします。
Related MCP server: CodeAlive MCP
特徴
高性能検索: パターンの長さに基づいて選択された最適化されたアルゴリズム (KMP、Boyer-Moore-Horspool、Rabin-Karp) を使用します。
ハードウェア アクセラレーション: SIMD 命令 (x86/x64 では SSE4.2/AVX2、ARM では NEON) を活用 (利用可能な場合)
最適化されたマルチスレッド: 利用可能なすべてのCPUコアを自動的に使用して、並列検索パフォーマンスを最大限に高めます。
統合インターフェース: 複数のモード (ファイル検索、文字列検索、カウントのみ) を備えた単一の機能
MCP統合:モデルコンテキストプロトコルを介したAIアシスタントとのシームレスな統合
このコードベースが悲劇的な理由
このコードベースは、単純なツール (文字列検索ユーティリティのラッパー) がどのようにして不必要な複雑さで肥大化してしまったかを示しています。
シンプルなコア、複雑な実装:実際の機能はシンプルだが、過剰なエンジニアリングの層の下に埋もれている
ドキュメントの過負荷: 1 つのよく構成された README で説明できるツールに対して 15 個のドキュメント ファイルがある
統合の狂気: 3 つの別々の統合システム (Cline、Claude Desktop、SDK)、それぞれ冗長なスクリプトとドキュメント
インストール スクリプトの増殖: 1 つの構成可能なスクリプトで十分なのに、7 つのインストール スクリプトが必要
エラー処理の重複: エラー処理は統一されたアプローチではなく、複数のレベルで重複しています。
テストの断片化: テストファイルが体系的に整理されておらず、コードベース全体に散在している
構成の冗長性: 構成ファイルと環境変数が複数のコンポーネント間で複製されます
バイナリパスオーバーキル:予測可能な1つの場所にあるはずの1つのバイナリに対して37の異なるパスを検索する
本来あるべき姿:
┌──────────────────────┐
│ krep-mcp-server │
│ ┌────────────────┐ │
│ │ index.js │ │
│ │ - one function│ │
│ └────────────────┘ │
│ ┌────────────────┐ │
│ │ README.md │ │
│ │ - clear docs │ │
│ └────────────────┘ │
│ ┌────────────────┐ │
│ │ install.sh │ │
│ │ - one script │ │
│ └────────────────┘ │
└──────────────────────┘プロジェクト構造
実際のプロジェクト構造は次のとおりです。
krep-mcp-server/
├── CLINE_README.md
├── CLINE_SETUP.md
├── CLAUDE_DESKTOP_INTEGRATION.md
├── CLAUDE_DESKTOP_README.md
├── EXAMPLES.md
├── IMPLEMENTATION_SUMMARY.md
├── INSTALL_NOW.md
├── LIFECYCLE_DESIGN.md
├── MCP_COMPLIANCE.md
├── MCP_URIS.md
├── README.md
├── SETUP_CLAUDE_DESKTOP.md
├── TESTING_STRATEGY.md
├── THREAD_OPTIMIZATION.md
├── analysis/
│ └── index.tree.json
├── auto-install-claude.sh
├── cline-config.js
├── direct-install.sh
├── eslint.config.js
├── fix-claude-desktop.sh
├── go-integration/
│ ├── example/
│ └── krep.go
├── install-claude-desktop.sh
├── install-cline-integration.sh
├── install-sdk-integrations.sh
├── jest.config.js
├── just-krep.sh
├── mcp-config.json
├── package-lock.json
├── package.json
├── python-integration/
│ └── krep_mcp_client.py
├── run-claude-desktop.sh
├── run-claude-integration.sh
├── run-cline-mcp-server.sh
├── run-cline-test.sh
├── run-tests.sh
├── run.sh
├── sdk-integration.js
├── src/
│ ├── index.js
│ ├── index.min.js
│ ├── mcp_server.js
│ └── mcp_server.min.js
├── Support/
│ └── Claude/
├── test/
│ ├── benchmark.js
│ ├── fixtures/
│ ├── integration/
│ ├── mcp_benchmark.js
│ ├── mock-server.js
│ ├── unit/
│ └── utils.js
└── various test scripts...インストール
krep バイナリがインストールされていることを確認します。
cd /path/to/krep-native makeMCP 設定ファイルで MCP サーバーを構成します。
{ "mcpServers": { "krep": { "command": "node", "args": [ "/path/to/krep-mcp-server/src/index.js" ], "env": { "CLAUDE_MCP": "true", "KREP_PATH": "/path/to/krep-native/krep", "DEBUG": "true" }, "description": "High-performance string search utility with unified interface", "disabled": false, "autoApprove": [ "krep" ] } } }
使用法
krep MCP サーバーは、単一の統合された関数を公開します。
<use_mcp_tool>
<server_name>krep</server_name>
<tool_name>krep</tool_name>
<arguments>
{
"pattern": "search pattern",
"target": "file path or string to search",
"mode": "file|string|count",
"caseSensitive": true|false,
"threads": null // Automatically uses all CPU cores if not specified
}
</arguments>
</use_mcp_tool>パラメータ
パターン(必須): 検索するパターン
ターゲット(必須): 検索するファイルパスまたは文字列
mode (オプション): 検索モード
file(デフォルト):ファイル内を検索string: 文字列内を検索count: 出現回数のみをカウントする
caseSensitive (オプション): 検索で大文字と小文字を区別するかどうか (デフォルト: true)
スレッド(オプション):使用するスレッド数(デフォルト:CPUコアに基づいて自動検出)
例
詳細な使用例とパターンについては、 examples.md を参照してください。
仕組み
krep MCP サーバーは次のように動作します。
モデルコンテキストプロトコルを介してリクエストを受信する
リクエストパラメータの解析
モードとパラメータに基づいて適切なkrepコマンドを構築する
krepバイナリを使用してコマンドを実行する
結果を解析し、構造化された形式で返す
パフォーマンス
Krep は、高性能なパターン検索用に設計されています。
アルゴリズム選択:パターンの長さに基づいて最適なアルゴリズムを自動的に選択します
非常に短いパターン(< 3 文字)の場合は KMP(Knuth-Morris-Pratt)
中程度の長さのパターン(3〜16文字)用のBoyer-Moore-Horspool
長いパターン(16文字以上)の場合はRabin-Karp
ハードウェアアクセラレーション: 利用可能な場合はSIMD命令を使用する
ダイナミックマルチスレッド: 利用可能なすべてのCPUコアを自動的に活用して、並列検索パフォーマンスを最適化します。
Cline VSCode拡張機能の統合
krep-mcp-server は Cline VSCode 拡張機能と統合できるため、VSCode 環境で直接、高性能な文字列検索機能を使用できます。
Clineによるインスタレーション
Cline 統合を設定するための自動インストール スクリプトを提供しています。
# Install the integration
./install-cline-integration.sh
# Test the integration before installing
./run-cline-test.sh
# Uninstall the integration
./uninstall-cline-integration.shCline での krep の使用
統合されると、Cline 会話で krep を直接使用できるようになります。
/krep krep pattern="function" target="/path/to/search" mode="file"詳細な手順と使用例については、以下を参照してください。
Infinity Toposとの統合
Krep MCP Server は、infinity-topos 環境内でシームレスに動作するように設計されています。
Babashka 統合: Babashka を使用して検索結果を処理する
Say 統合: Say MCP サーバーを使用して検索結果を音声化する
コイン投げ統合:ランダム化を使用して検索戦略を決定する
発達
環境変数
CLAUDE_MCP: MCPモードで実行するには「true」に設定しますKREP_PATH: krepバイナリへのパスDEBUG: 詳細なログ出力を行うには「true」に設定しますKREP_TEST_MODE: 模擬応答でテストモードで実行するには「true」に設定しますKREP_SKIP_CHECK: krepバイナリが存在するかどうかのチェックをスキップするには「true」に設定します
HTTPサーバーモード
MCP モードで実行されていない場合、サーバーは次のエンドポイントを持つ HTTP サーバーを起動します。
GET /health: ヘルスチェックエンドポイントGET /: サーバー情報POST /search: ファイル内のパターンを検索するPOST /match: 文字列内のパターンを一致させるGET /performance: パフォーマンス情報GET /algorithm-selection: アルゴリズム選択ガイド
ライセンス
マサチューセッツ工科大学
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.61339MIT

CodeAlive MCPofficial
AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.88MIT- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides powerful regex-based code refactoring and search tools for Coding Agents.2307MIT
- FlicenseAqualityDmaintenanceA Model Context Protocol server that enables keyword search within files, returning matching lines with line numbers.11
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Securely search and manage workspace context files for AI agents and teams.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bmorphism/krep-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server