用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-cursor命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | grepai-mcp-cursor |
| description | Integrate GrepAI with Cursor IDE via MCP. Use this skill to enable semantic code search in Cursor. |
This skill covers integrating GrepAI with Cursor IDE using the Model Context Protocol (MCP).
Cursor is an AI-powered IDE that supports MCP for external tools. GrepAI integration gives Cursor's AI:
grepai watch)Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve"]
}
}
}
Close and reopen Cursor for the config to take effect.
Ask Cursor's AI:
"Search the codebase for authentication"
Cursor should use the grepai_search tool.
For GrepAI in all Cursor projects, use global config:
~/.cursor/mcp.json~/.cursor/mcp.json%APPDATA%\Cursor\mcp.json{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve"]
}
}
}
For project-specific settings:
{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve"],
"cwd": "/absolute/path/to/project"
}
}
}
Once configured, Cursor has access to:
| Tool | Description |
|---|---|
grepai_search | Semantic code search |
grepai_trace_callers | Find function callers |
grepai_trace_callees | Find function callees |
grepai_trace_graph | Build call graphs |
grepai_index_status | Check index health |
Ask Cursor:
"Find code that handles user login"
Cursor uses grepai_search to find semantically related code.
Ask Cursor:
"What functions call validateToken?"
Cursor uses grepai_trace_callers to show all callers.
Ask Cursor:
"Show me the call graph for processPayment"
Cursor uses grepai_trace_graph to display dependencies.
Cmd+, / Ctrl+,)Cmd+Shift+P / Ctrl+Shift+P)Windsurf uses the same MCP format as Cursor:
Create .windsurf/mcp.json:
{
"mcpServers": {
"grepai": {
"command": "grepai",
"args": ["mcp-serve"]
}
}
}
Each project has its own .cursor/mcp.json with appropriate cwd.
# 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"]
}
}
}
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.
❌ Problem: Cursor doesn't see GrepAI tools
✅ Solutions:
.cursor/mcp.json in project rootgrepai is in PATH❌ Problem: Empty search results
✅ Solutions:
grepai statusgrepai watch first❌ Problem: MCP connection failed
✅ Solutions:
grepai mcp-servecurl http://localhost:11434/api/tags❌ Problem: Results from wrong project
✅ Solutions:
cwd in configgrepai_index_status to verifygrepai watch --background running| Feature | Cursor | Claude Code |
|---|---|---|
| Config location | .cursor/mcp.json | ~/.claude/mcp.json |
| Setup command | Manual JSON | claude mcp add |
| Project scope | Per-project or global | Global |
| IDE integration | Native | Terminal |
.cursor/mcp.json to git (without secrets)grepai mcp-serve works firstDelete .cursor/mcp.json and restart Cursor.
Or remove just GrepAI:
{
"mcpServers": {
// Remove grepai entry
}
}
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"