This MCP server provides a high-performance string search utility that integrates with AI assistants through the Model Context Protocol. It wraps around the "krep" tool, which significantly outperforms traditional search utilities like grep by using optimized algorithms and multi-threading capabilities.
Ensure you have the krep binary installed:
cd /path/to/krep-native
make
Configure the MCP server in your MCP settings file:
{
"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"
]
}
}
}
The krep MCP server exposes a single unified function:
<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
}
</arguments>
</use_mcp_tool>
file
(default): Search in a filestring
: Search in a stringcount
: Count occurrences onlyThe server functions by:
Krep provides high-performance pattern searching through:
# Install the integration
./install-cline-integration.sh
# Test the integration
./run-cline-test.sh
Once integrated, use krep directly in Cline conversations:
/krep krep pattern="function" target="/path/to/search" mode="file"
CLAUDE_MCP
: Set to "true" to run in MCP modeKREP_PATH
: Path to the krep binaryDEBUG
: Set to "true" for verbose loggingKREP_TEST_MODE
: Set to "true" to run in test modeKREP_SKIP_CHECK
: Set to "true" to skip checking if the krep binary existsTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "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"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"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"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"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"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect