Krep MCP Server

Krep MCP Server

krep-mcp-server•bybmorphism

An MCP server exposing the krep high-performance string search utility through a single unified search function.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes a single unified krep function that searches a file, searches a string, or counts occurrences.
  • •Supports a pattern and target, optional case sensitivity, and optional thread count auto-detected from CPU cores.
  • •Selects search algorithms based on pattern length and leverages SIMD and multi-threading for performance.

BEST FOR

  • •AI assistants that need efficient pattern searching in files and strings through MCP.
  • •Developers integrating high-performance string search into the Cline VSCode extension.

ABOUT KREP-MCP-SERVER

Krep MCP Server is cataloged as an MCP server attributed to bmorphism. An MCP server exposing the krep high-performance string search utility through a single unified search function. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Krep MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What search modes does the krep MCP server support?

It supports file search (default), string search, and count-only mode.

How is the number of search threads determined?

Threads can be set explicitly; otherwise the server auto-detects based on CPU cores and by default uses all available cores.

Upstream README

View this exact version on GitHub

README.md · ea609e22cffd · Fetched 2026-11-13 11:04:04 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Krep MCP Server

A high-performance string search utility with MCP (Model Context Protocol) integration for the infinity-topos environment. This is a wrapper around krep, an ultra-fast pattern matching utility that significantly outperforms traditional tools like grep.

                   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

Overview

Krep MCP Server provides a unified interface to the krep binary, a high-performance string search utility similar to grep but with optimized algorithms and multi-threading capabilities. It exposes krep's functionality through the Model Context Protocol, allowing AI assistants to perform efficient pattern searching in files and strings.

Features

  • High-Performance Search: Uses optimized algorithms (KMP, Boyer-Moore-Horspool, Rabin-Karp) selected based on pattern length
  • Hardware Acceleration: Leverages SIMD instructions (SSE4.2/AVX2 on x86/x64, NEON on ARM) when available
  • Optimized Multi-Threading: Automatically uses all available CPU cores for maximum parallel search performance
  • Unified Interface: Single function with multiple modes (file search, string search, count-only)
  • MCP Integration: Seamless integration with AI assistants through the Model Context Protocol

Why This Codebase Is Tragic

This codebase demonstrates how a simple tool (a wrapper for a string search utility) became bloated with unnecessary complexity:

  1. Simple Core, Complex Implementation: The actual functionality is straightforward but buried under layers of over-engineering

  2. Documentation Overload: 15 documentation files for a tool that could be explained in a single well-structured README

  3. Integration Madness: 3 separate integration systems (Cline, Claude Desktop, SDK), each with redundant scripts and documentation

  4. Installation Script Proliferation: 7 installation scripts when one configurable script would suffice

  5. Error Handling Duplication: Error handling duplicated at multiple levels rather than having a unified approach

  6. Test Fragmentation: Test files scattered across the codebase rather than being organized systematically

  7. Configuration Redundancy: Configuration files and environment variables duplicated across multiple components

  8. Binary Path Overkill: Searches 37 different paths for a single binary that should be in one predictable location

What It Should Have Been:

┌──────────────────────┐
│    krep-mcp-server   │
│  ┌────────────────┐  │
│  │  index.js      │  │
│  │  - one function│  │
│  └────────────────┘  │
│  ┌────────────────┐  │
│  │  README.md     │  │
│  │  - clear docs  │  │
│  └────────────────┘  │
│  ┌────────────────┐  │
│  │  install.sh    │  │
│  │  - one script  │  │
│  └────────────────┘  │
└──────────────────────┘

Project Structure

Here's the actual project structure:

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...

Installation

  1. Ensure you have the krep binary installed:

    cd /path/to/krep-native
    make
    
  2. 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"
          ]
        }
      }
    }
    

Usage

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 // Automatically uses all CPU cores if not specified
}
</arguments>
</use_mcp_tool>

Parameters

  • pattern (required): The pattern to search for
  • target (required): File path or string to search in
  • mode (optional): Search mode
    • file (default): Search in a file
    • string: Search in a string
    • count: Count occurrences only
  • caseSensitive (optional): Whether the search is case-sensitive (default: true)
  • threads (optional): Number of threads to use (default: auto-detected based on CPU cores)

Examples

See examples.md for detailed usage examples and patterns.

How It Works

The krep MCP server works by:

  1. Receiving requests through the Model Context Protocol
  2. Parsing the request parameters
  3. Building the appropriate krep command based on the mode and parameters
  4. Executing the command using the krep binary
  5. Parsing the results and returning them in a structured format

Performance

Krep is designed for high-performance pattern searching:

  • Algorithm Selection: Automatically selects the optimal algorithm based on pattern length
    • KMP (Knuth-Morris-Pratt) for very short patterns (< 3 characters)
    • Boyer-Moore-Horspool for medium-length patterns (3-16 characters)
    • Rabin-Karp for longer patterns (> 16 characters)
  • Hardware Acceleration: Uses SIMD instructions when available
  • Dynamic Multi-Threading: Automatically utilizes all available CPU cores for optimal parallel search performance

Cline VSCode Extension Integration

The krep-mcp-server can be integrated with the Cline VSCode extension, allowing you to use high-performance string search capabilities directly in your VSCode environment.

Installation with Cline

We provide an automatic installation script to set up the Cline integration:

# Install the integration
./install-cline-integration.sh

# Test the integration before installing
./run-cline-test.sh

# Uninstall the integration
./uninstall-cline-integration.sh

Using krep in Cline

Once integrated, you can use krep directly in Cline conversations:

/krep krep pattern="function" target="/path/to/search" mode="file"

For detailed instructions and usage examples, see:

Integration with Infinity Topos

Krep MCP Server is designed to work seamlessly within the infinity-topos environment:

  • Babashka Integration: Use Babashka to process search results
  • Say Integration: Vocalize search results using the Say MCP server
  • Coin-Flip Integration: Use randomization to determine search strategies

Development

Environment Variables

  • CLAUDE_MCP: Set to "true" to run in MCP mode
  • KREP_PATH: Path to the krep binary
  • DEBUG: Set to "true" for verbose logging
  • KREP_TEST_MODE: Set to "true" to run in test mode with mock responses
  • KREP_SKIP_CHECK: Set to "true" to skip checking if the krep binary exists

HTTP Server Mode

When not running in MCP mode, the server starts an HTTP server with the following endpoints:

  • GET /health: Health check endpoint
  • GET /: Server information
  • POST /search: Search for patterns in files
  • POST /match: Match patterns in strings
  • GET /performance: Performance information
  • GET /algorithm-selection: Algorithm selection guide

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Krep MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/krep-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools