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

grepai-mcp-claudegrepai MCP Claude 搜索

Agent Skill

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

总安装

9,126

周安装

392

GitHub Stars

16

下载量

3,199
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

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

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

SKILL.md

GrepAI MCP Integration with Claude Code

This skill covers integrating GrepAI with Claude Code using the Model Context Protocol (MCP).

When to Use This Skill

  • Setting up GrepAI in Claude Code
  • Enabling semantic search for AI coding assistant
  • Configuring MCP server for Claude
  • Troubleshooting Claude Code integration

What is MCP?

Model Context Protocol (MCP) allows AI assistants to use external tools. GrepAI provides an MCP server that gives Claude Code:

  • Semantic code search
  • Call graph analysis
  • Index status monitoring

Prerequisites

  1. GrepAI installed
  2. Ollama running (or other embedding provider)
  3. Project indexed (grepai watch)
  4. Claude Code installed

Quick Setup

One command to add GrepAI to Claude Code:

claude mcp add grepai -- grepai mcp-serve

That's it! Claude Code can now use GrepAI tools.

Manual Configuration

If you prefer manual setup, add to Claude Code's MCP config:

Location

  • macOS/Linux: ~/.claude/mcp.json
  • Windows: %APPDATA%\Claude\mcp.json

Configuration

{
  "mcpServers": {
    "grepai": {
      "command": "grepai",
      "args": ["mcp-serve"]
    }
  }
}

With Working Directory

If you want GrepAI to always use a specific project:

{
  "mcpServers": {
    "grepai": {
      "command": "grepai",
      "args": ["mcp-serve"],
      "cwd": "/path/to/your/project"
    }
  }
}

Verifying Installation

Check MCP Server

# Start MCP server manually to test
grepai mcp-serve

You should see:

GrepAI MCP Server started
Listening for requests...

In Claude Code

Ask Claude:

"Search the codebase for authentication code"

Claude should use the grepai_search tool.

Available Tools

Once connected, Claude Code has access to these tools:

ToolDescriptionParameters
grepai_searchSemantic code searchquery (required), limit, compact
grepai_trace_callersFind function callerssymbol (required), compact
grepai_trace_calleesFind function calleessymbol (required), compact
grepai_trace_graphBuild call graphsymbol (required), depth
grepai_index_statusCheck index healthverbose (optional)

Tool Usage Examples

Semantic Search

Claude request:

"Find code related to user authentication"

Claude uses:

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

Trace Analysis

Claude request:

"What functions call the Login function?"

Claude uses:

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

Index Status

Claude request:

"Is the code index up to date?"

Claude uses:

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

Compact Mode

By default, MCP tools return compact JSON to minimize tokens:

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

This reduces token usage by ~80% compared to full content.

Working Directory

The MCP server uses the current working directory. Ensure:

  1. GrepAI is initialized in your project
  2. Index exists (run grepai watch first)
  3. Start Claude Code from your project directory

Option 1: Start Claude from Project Directory

cd /path/to/your/project
claude  # Claude Code now uses this directory

Option 2: Configure CWD in MCP Config

{
  "mcpServers": {
    "grepai": {
      "command": "grepai",
      "args": ["mcp-serve"],
      "cwd": "/path/to/your/project"
    }
  }
}

Multiple Projects

For multiple projects, you can:

Option 1: Multiple MCP Servers

{
  "mcpServers": {
    "grepai-frontend": {
      "command": "grepai",
      "args": ["mcp-serve"],
      "cwd": "/path/to/frontend"
    },
    "grepai-backend": {
      "command": "grepai",
      "args": ["mcp-serve"],
      "cwd": "/path/to/backend"
    }
  }
}

Option 2: Use Workspaces

grepai workspace create my-workspace
grepai workspace add my-workspace /path/to/frontend
grepai workspace add my-workspace /path/to/backend
{
  "mcpServers": {
    "grepai": {
      "command": "grepai",
      "args": ["mcp-serve", "--workspace", "my-workspace"]
    }
  }
}

Troubleshooting

Tool Not Available

Problem: Claude doesn't see GrepAI tools

Solutions:

  1. Restart Claude Code after config changes
  2. Check MCP config syntax (valid JSON)
  3. Verify grepai is in PATH
  4. Test: grepai mcp-serve manually

Search Returns No Results

Problem: Searches return empty

Solutions:

  1. Ensure grepai watch has run
  2. Check working directory has .grepai/
  3. Verify index exists: grepai status

Connection Refused

Problem: MCP server won't start

Solutions:

  1. Check Ollama is running: curl http://localhost:11434/api/tags
  2. Verify config: cat.grepai/config.yaml
  3. Run grepai mcp-serve manually to see errors

Wrong Project Indexed

Problem: Results from wrong codebase

Solutions:

  1. Check cwd in MCP config
  2. Start Claude from correct directory
  3. Verify with grepai_index_status tool

Best Practices

  1. Keep index updated: Run grepai watch --background
  2. Use compact mode: Reduces token usage
  3. Set working directory: Explicit cwd in config
  4. Check status first: Use grepai_index_status
  5. Restart after config: Claude needs restart for MCP changes

Removing Integration

To remove GrepAI from Claude Code:

claude mcp remove grepai

Or manually edit ~/.claude/mcp.json and remove the grepai entry.

Output Format

Successful MCP setup:

✅ GrepAI MCP Integration Configured

   Claude Code: ~/.claude/mcp.json
   Server: grepai mcp-serve
   Status: Connected

   Available tools:
   - grepai_search (semantic code search)
   - grepai_trace_callers (find callers)
   - grepai_trace_callees (find callees)
   - grepai_trace_graph (call graphs)
   - grepai_index_status (index health)

   Claude can now search your code semantically!

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.68%
按下载量换算1,077

Claude

31.41%
按下载量换算1,005

Cursor

19.25%
按下载量换算616

Gemini CLI

8.65%
按下载量换算277

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

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

安装前确认

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

来源信息

继续浏览同类 Skills