VS

voxmenthe/search-tools-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

32 stars 3 forks 质量 60 趋势 11Apache-2.0

⚡ 一个智能模型上下文协议(MCP)服务器,通过先进的搜索功能和依赖映射增强代码分析

概览

⚡ 一个智能模型上下文协议(MCP)服务器,通过先进的搜索功能和依赖映射增强代码分析 这是一个强大的工具包,将传统代码搜索与智能分析算法结合起来。它利用该算法(灵感来自PageRank)来识别代码库中最关键的模块,并提供超越简单文本匹配的复杂搜索功能。 - : 基于 Ripgrep 的搜索,带有可配置的上下文行 - : 提取和分析函数、类、方法和模块 - : 查找符号在代码库中的使用位置 - : 按代码重要性排序的搜索结果 - : 利用网络分析识别最关键的模块 - : 追踪复杂依赖链和影响分析 - : 寻找高度关联且频繁使用的代码区域 - : 分析代码变更的潜在影响 - 符号类型过滤(函数、方法、类)- 文件包含/排除模式- 外部......

概述(AI 翻译)

⚡ 一个智能模型上下文协议(MCP)服务器,通过先进的搜索功能和依赖映射增强代码分析

🌟 概述

搜索工具MCP服务器是一个强大的工具包,将传统代码搜索与智能分析算法结合在一起。它利用受PageRank启发的CodeRank算法来识别代码库中最关键的模块,并提供超越简单文本匹配的复杂搜索功能。

🎯 主要特色

🔎 智能搜索功能

  • 上下文关键词搜索:基于Ripgrep的搜索,可配置上下文行
  • 符号发现:提取和分析函数、类、方法和模块
  • 使用跟踪:查找符号在代码库中被使用的位置
  • 优先级排名结果:按代码重要性排序的搜索结果

🧠 情报与分析

  • CodeRank 算法:利用网络分析识别最关键模块
  • 依赖映射:追踪复杂依赖链和影响分析
  • 热点检测:查找高度连接且频繁使用的代码区域

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🔍 Search Tools MCP Server

⚡ An intelligent Model Context Protocol (MCP) server that supercharges code analysis with advanced search capabilities and dependency mapping

🌟 Overview

The Search Tools MCP Server is a powerful toolkit that combines traditional code search with intelligent analysis algorithms. It leverages the CodeRank algorithm (inspired by PageRank) to identify the most critical modules in your codebase and provides sophisticated search capabilities that go beyond simple text matching.

🎯 Key Features

🔎 Smart Search Capabilities

  • Contextual Keyword Search: Ripgrep-powered search with configurable context lines
  • Symbol Discovery: Extract and analyze functions, classes, methods, and modules
  • Usage Tracking: Find where symbols are used across your codebase
  • Priority-Ranked Results: Search results ranked by code importance

🧠 Intelligence & Analysis

  • CodeRank Algorithm: Identify the most critical modules using network analysis
  • Dependency Mapping: Trace complex dependency chains and impact analysis
  • Hotspot Detection: Find code areas that are both highly connected and frequently used
  • Refactoring Impact: Analyze the potential impact of code changes

🎨 Advanced Filtering

  • Symbol type filtering (functions, methods, classes)
  • File inclusion/exclusion patterns
  • External module dependency tracking
  • Markdown documentation analysis

🛠️ Installation

Prerequisites

  • Python 3.13+
  • uv package manager
  • kit CLI tool (for symbol analysis)
  • ripgrep (for fast text search)

Setup

# Clone the repository
git clone 
cd search-tools

# Install dependencies
uv sync

⚙️ Configuration

Adding to Cursor/Windsurf

Add the following configuration to your mcp.json file:

{
  "mcpServers": {
    "search-tools": {
      "command": "/path/to/uv",
      "args": [
        "run",
        "--directory",
        "/path/to/search-tools",
        "main.py"
      ]
    }
  }
}

For macOS users with Homebrew:

{
  "mcpServers": {
    "search-tools": {
      "command": "/Users/yourusername/.local/bin/uv",
      "args": [
        "run",
        "--directory",
        "/path/to/your/search-tools/directory",
        "main.py"
      ]
    }
  }
}

To add to claude code:

claude mcp add-json search-tools '{"type":"stdio","command":"/Users/yourusername/.local/bin/uv","args":[ "run", "--directory", "/path/to/your/search-tools/directory", "main.py"]}'

📍 Finding Your Paths

To find the correct paths for your system:

# Find uv location
which uv

# Get absolute path to search-tools directory  
pwd  # (run this from the search-tools directory)

🚀 Available Tools

🔍 contextual_keyword_search

Search for keywords with configurable context lines around matches.

Parameters:

  • keyword: Search term (case insensitive)
在 GitHub 查看完整 README

安装

npx @modelcontextprotocol/inspector python main.py
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "search-tools": { "command": "/path/to/uv", "args": [ "run", "--directory", "/path/to/search-tools", "main.py" ] } } }