Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

grepai-mcp-cursorgrepai MCP Cursor 搜索

Agent Skill

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

总安装

9,033

周安装

369

GitHub Stars

16

下载量

2,922
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

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

简介

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

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

SKILL.md

GrepAI MCP Integration with Cursor

This skill covers integrating GrepAI with Cursor IDE using the Model Context Protocol (MCP).

When to Use This Skill

  • Setting up GrepAI in Cursor
  • Enabling semantic search for Cursor AI
  • Configuring MCP for Cursor
  • Troubleshooting Cursor integration

What is Cursor?

Cursor is an AI-powered IDE that supports MCP for external tools. GrepAI integration gives Cursor's AI:

  • Semantic code search beyond simple text matching
  • Call graph analysis for understanding dependencies
  • Index-based code navigation

Prerequisites

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

Configuration

Step 1: Create MCP Config File

Create .cursor/mcp.json in your project root:

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

Step 2: Restart Cursor

Close and reopen Cursor for the config to take effect.

Step 3: Verify

Ask Cursor's AI:

"Search the codebase for authentication"

Cursor should use the grepai_search tool.

Global Configuration

For GrepAI in all Cursor projects, use global config:

Location

  • macOS: ~/.cursor/mcp.json
  • Linux: ~/.cursor/mcp.json
  • Windows: %APPDATA%\Cursor\mcp.json

Content

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

Per-Project Configuration

For project-specific settings:

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

Available Tools

Once configured, Cursor has access to:

ToolDescription
grepai_searchSemantic code search
grepai_trace_callersFind function callers
grepai_trace_calleesFind function callees
grepai_trace_graphBuild call graphs
grepai_index_statusCheck index health

Usage Examples

Finding Code

Ask Cursor:

"Find code that handles user login"

Cursor uses grepai_search to find semantically related code.

Understanding Dependencies

Ask Cursor:

"What functions call validateToken?"

Cursor uses grepai_trace_callers to show all callers.

Code Navigation

Ask Cursor:

"Show me the call graph for processPayment"

Cursor uses grepai_trace_graph to display dependencies.

Cursor Settings Integration

Enable MCP in Settings

  1. Open Cursor Settings (Cmd+, / Ctrl+,)
  2. Search for "MCP"
  3. Ensure MCP is enabled

Verify MCP Status

  1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Search "MCP"
  3. Check connected servers

Windsurf Configuration

Windsurf uses the same MCP format as Cursor:

Location

Create .windsurf/mcp.json:

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

Multiple Projects Setup

Option 1: Separate Configs

Each project has its own .cursor/mcp.json with appropriate cwd.

Option 2: Workspaces

# Create workspace
grepai workspace create dev
grepai workspace add dev /path/to/project1
grepai workspace add dev /path/to/project2
{
  "mcpServers": {
    "grepai": {
      "command": "grepai",
      "args": ["mcp-serve", "--workspace", "dev"]
    }
  }
}

Environment Variables

If GrepAI uses environment variables (like API keys):

{
  "mcpServers": {
    "grepai": {
      "command": "grepai",
      "args": ["mcp-serve"],
      "env": {
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

Better: Set environment variables in your shell profile instead.

Troubleshooting

MCP Not Recognized

Problem: Cursor doesn't see GrepAI tools

Solutions:

  1. Check file location: .cursor/mcp.json in project root
  2. Verify JSON syntax (no trailing commas)
  3. Restart Cursor completely
  4. Check grepai is in PATH

Search Returns Nothing

Problem: Empty search results

Solutions:

  1. Ensure index exists: grepai status
  2. Run grepai watch first
  3. Verify working directory

Connection Errors

Problem: MCP connection failed

Solutions:

  1. Test manually: grepai mcp-serve
  2. Check Ollama: curl http://localhost:11434/api/tags
  3. Look at Cursor's developer console for errors

Wrong Results

Problem: Results from wrong project

Solutions:

  1. Set explicit cwd in config
  2. Check you opened the right folder in Cursor
  3. Use grepai_index_status to verify

Performance Tips

  1. Background daemon: Keep grepai watch --background running
  2. Use compact mode: MCP tools use compact by default
  3. Limit results: AI will request appropriate limits
  4. Index regularly: Especially after git pull

Comparison: Cursor vs Claude Code

FeatureCursorClaude Code
Config location.cursor/mcp.json~/.claude/mcp.json
Setup commandManual JSONclaude mcp add
Project scopePer-project or globalGlobal
IDE integrationNativeTerminal

Best Practices

  1. Version control: Add .cursor/mcp.json to git (without secrets)
  2. Team setup: Document MCP config in README
  3. Keep index fresh: Run watch daemon
  4. Test locally: Verify grepai mcp-serve works first
  5. Use workspaces: For multi-project setups

Removing Integration

Delete .cursor/mcp.json and restart Cursor.

Or remove just GrepAI:

{
  "mcpServers": {
    // Remove grepai entry
  }
}

Output Format

Successful Cursor setup:

✅ GrepAI MCP Integration for Cursor

   Config: .cursor/mcp.json
   Server: grepai mcp-serve
   Status: Ready

   Available tools:
   - grepai_search
   - grepai_trace_callers
   - grepai_trace_callees
   - grepai_trace_graph
   - grepai_index_status

   Cursor AI can now search your code semantically!

   Test: Ask Cursor "search for authentication code"

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.58%
按下载量换算1,010

Claude

32.94%
按下载量换算963

Cursor

19.91%
按下载量换算582

Gemini CLI

8.95%
按下载量换算262

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills