Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

grepai-mcp-toolsgrepai MCP tools 搜索

Agent Skill

grepai-mcp-tools 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,104

周安装

421

GitHub Stars

16

下载量

3,368
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:grepai-mcp-tools(grepai MCP tools 搜索)
来源仓库:https://github.com/yoanbernabeu/grepai-skills
仓库路径:skills/grepai-mcp-tools
安装命令:
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-tools
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-tools

简介

用于查找、检索和筛选相关信息,适合快速定位候选结果。

  • 它根据关键词或任务场景在代码或文档中匹配内容片段。
  • 使用方式依赖具体仓库结构和搜索模式,需结合上下文调整参数。
  • 安装命令:npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-tools。
  • 注意确认权限范围和是否允许读取项目文件,避免误触敏感路径。

SKILL.md

GrepAI MCP Tools Reference

This skill provides a complete reference for all tools available through GrepAI's MCP server.

When to Use This Skill

  • Understanding available MCP tools
  • Learning tool parameters and options
  • Integrating GrepAI with AI assistants
  • Debugging MCP tool usage

Starting the MCP Server

grepai mcp-serve

The server exposes tools via the Model Context Protocol.

Available Tools

1. grepai_search

Semantic code search using embeddings.

Parameters

ParameterTypeRequiredDefaultDescription
querystringYes-Search query describing what to find
limitnumberNo10Maximum results to return
compactbooleanNofalseReturn compact output (no content)
formatstringNo"json"Output format: "json" or "toon" (v0.26.0+)

Example Request

{
  "tool": "grepai_search",
  "parameters": {
    "query": "user authentication middleware",
    "limit": 5,
    "compact": true,
    "format": "toon"
  }
}

Response (Compact)

{
  "q": "user authentication middleware",
  "r": [
    {"s": 0.92, "f": "src/auth/middleware.go", "l": "15-45"},
    {"s": 0.85, "f": "src/auth/jwt.go", "l": "23-55"},
    {"s": 0.78, "f": "src/handlers/auth.go", "l": "10-40"}
  ],
  "t": 3
}

Response (Full)

{
  "query": "user authentication middleware",
  "results": [
    {
      "score": 0.92,
      "file": "src/auth/middleware.go",
      "start_line": 15,
      "end_line": 45,
      "content": "func AuthMiddleware() gin.HandlerFunc {\n    ..."
    }
  ],
  "total": 3
}

2. grepai_trace_callers

Find all functions that call a specified symbol.

Parameters

ParameterTypeRequiredDefaultDescription
symbolstringYes-Function/method name to trace
compactbooleanNofalseReturn compact output (no context)
formatstringNo"json"Output format: "json" or "toon" (v0.26.0+)

Example Request

{
  "tool": "grepai_trace_callers",
  "parameters": {
    "symbol": "Login",
    "compact": true
  }
}

Response (Compact)

{
  "q": "Login",
  "m": "callers",
  "c": 3,
  "r": [
    {"f": "handlers/auth.go", "l": 42, "fn": "HandleAuth"},
    {"f": "handlers/auth_test.go", "l": 15, "fn": "TestLoginSuccess"},
    {"f": "cmd/main.go", "l": 88, "fn": "RunCLI"}
  ]
}

Response (Full)

{
  "query": "Login",
  "mode": "callers",
  "count": 3,
  "results": [
    {
      "file": "handlers/auth.go",
      "line": 42,
      "caller": "HandleAuth",
      "context": "user.Login(ctx, credentials)"
    }
  ]
}

3. grepai_trace_callees

Find all functions called by a specified symbol.

Parameters

ParameterTypeRequiredDefaultDescription
symbolstringYes-Function/method name to trace
compactbooleanNofalseReturn compact output (no context)
formatstringNo"json"Output format: "json" or "toon" (v0.26.0+)

Example Request

{
  "tool": "grepai_trace_callees",
  "parameters": {
    "symbol": "ProcessOrder",
    "compact": true
  }
}

Response (Compact)

{
  "q": "ProcessOrder",
  "m": "callees",
  "c": 4,
  "r": [
    {"f": "services/order.go", "l": 45, "fn": "validateOrder"},
    {"f": "services/order.go", "l": 48, "fn": "calculateTotal"},
    {"f": "services/order.go", "l": 51, "fn": "applyDiscount"},
    {"f": "services/order.go", "l": 55, "fn": "sendConfirmation"}
  ]
}

4. grepai_trace_graph

Build a complete call graph starting from a symbol.

Parameters

ParameterTypeRequiredDefaultDescription
symbolstringYes-Root function for the graph
depthnumberNo2Maximum recursion depth
compactbooleanNofalseReturn compact JSON format
formatstringNo"json"Output format: "json" or "toon" (v0.26.0+)

Example Request

{
  "tool": "grepai_trace_graph",
  "parameters": {
    "symbol": "main",
    "depth": 3,
    "compact": true
  }
}

Response (Compact)

{
  "q": "main",
  "d": 3,
  "r": {
    "n": "main",
    "c": [
      {
        "n": "initialize",
        "c": [
          {"n": "loadConfig"},
          {"n": "connectDB"}
        ]
      },
      {
        "n": "startServer",
        "c": [
          {"n": "registerRoutes"}
        ]
      }
    ]
  },
  "s": {"nodes": 6, "depth": 3}
}

Response (Full)

{
  "query": "main",
  "mode": "graph",
  "depth": 3,
  "root": {
    "name": "main",
    "file": "cmd/main.go",
    "line": 10,
    "children": [
      {
        "name": "initialize",
        "file": "cmd/main.go",
        "line": 15,
        "children": [...]
      }
    ]
  },
  "stats": {
    "nodes": 6,
    "max_depth": 3
  }
}

5. grepai_index_status

Check the health and status of the code index.

Parameters

ParameterTypeRequiredDefaultDescription
verbosebooleanNofalseInclude detailed information
formatstringNo"json"Output format: "json" or "toon" (v0.26.0+)

Example Request

{
  "tool": "grepai_index_status",
  "parameters": {
    "verbose": true
  }
}

Response

{
  "status": "healthy",
  "project": "/path/to/project",
  "embedder": {
    "provider": "ollama",
    "model": "nomic-embed-text",
    "status": "connected"
  },
  "store": {
    "backend": "gob",
    "location": ".grepai/index.gob"
  },
  "index": {
    "files": 245,
    "chunks": 1234,
    "last_updated": "2025-01-28T10:30:00Z"
  },
  "daemon": {
    "running": true,
    "pid": 12345
  }
}

Compact Format Reference

When compact: true, responses use abbreviated keys:

Full KeyCompact KeyDescription
queryqSearch query or symbol
resultsrResults array
totaltTotal count
countcCount
scoresSimilarity score
filefFile path
linelLine number(s)
modemTrace mode
depthdGraph depth
namenNode name
childrencChild nodes
statssStatistics
functionfnFunction name

Token Efficiency

Compact mode reduces tokens significantly:

Response TypeFullCompactSavings
Search (5 results)~800~15081%
Trace callers (10)~600~12080%
Trace graph (depth 3)~1200~25079%

Error Responses

Index Not Found

{
  "error": "Index not found. Run 'grepai watch' first.",
  "code": "INDEX_NOT_FOUND"
}

Embedder Connection Failed

{
  "error": "Cannot connect to embedding provider. Is Ollama running?",
  "code": "EMBEDDER_UNAVAILABLE"
}

Symbol Not Found

{
  "error": "Symbol 'FunctionName' not found in index.",
  "code": "SYMBOL_NOT_FOUND"
}

Invalid Parameters

{
  "error": "Parameter 'query' is required.",
  "code": "INVALID_PARAMETERS"
}

Best Practices for AI Integration

  1. Use compact mode: Reduces token usage by ~80%
  2. Limit results: Request only what you need
  3. Check status first: Use grepai_index_status before searches
  4. Handle errors: Check for error responses
  5. Combine tools: Search + trace for full understanding

MCP Protocol Details

Request Format

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "grepai_search",
    "arguments": {
      "query": "authentication",
      "limit": 5,
      "compact": true
    }
  }
}

Response Format

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"q\":\"authentication\",\"r\":[...],\"t\":5}"
      }
    ]
  }
}

Output Format

MCP tools reference summary:

📚 GrepAI MCP Tools Reference

Tools available:

1. grepai_search
   - Semantic code search
   - Params: query*, limit, compact

2. grepai_trace_callers
   - Find function callers
   - Params: symbol*, compact

3. grepai_trace_callees
   - Find function callees
   - Params: symbol*, compact

4. grepai_trace_graph
   - Build call graph
   - Params: symbol*, depth, compact

5. grepai_index_status
   - Check index health
   - Params: verbose

* = required parameter

Compact mode: ~80% token reduction

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.76%
按下载量换算1,137

Claude

29.16%
按下载量换算982

Cursor

18.96%
按下载量换算639

Gemini CLI

10.37%
按下载量换算349

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills