
Grepai Mcp Cursor
Wire GrepAI semantic code search into Cursor through MCP so the IDE agent can search and navigate by meaning, not just grep.
Overview
grepai-mcp-cursor is an agent skill for the Build phase that configures GrepAI semantic search as an MCP server inside Cursor IDE.
Install
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-cursorWhat is this skill?
- Project-level `.cursor/mcp.json` with grepai mcp-serve command
- Global MCP paths documented for macOS, Linux, and Windows
- Requires indexed project via grepai watch and embedding provider (Ollama default)
- Enables grepai_search semantic queries and call-graph style navigation from Cursor chat
- 3 documented global MCP config path patterns (macOS, Linux, Windows)
Adoption & trust: 449 installs on skills.sh; 17 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Cursor’s built-in search misses conceptual matches and cross-file relationships in your indexed repo.
Who is it for?
Indie builders using Cursor on medium or large codebases who already run or will run GrepAI locally.
Skip if: Teams without MCP support in their editor, or repos you have not indexed with grepai watch.
When should I use this skill?
User wants GrepAI in Cursor, MCP config for semantic search, or Cursor integration troubleshooting.
What do I get? / Deliverables
Cursor loads grepai via MCP so chat can call grepai_search after you add mcp.json and index the project.
- .cursor/mcp.json MCP server entry
- Verified grepai_search tool availability in Cursor chat
Recommended Skills
Journey fit
MCP wiring is Build work—it connects your coding agent to a local or project-indexed search backend. Cursor MCP configuration is an IDE integration task, not application feature code.
How it compares
MCP integration skill for semantic index search—not a hosted SaaS search product or plain ripgrep shortcut.
Common Questions / FAQ
Who is grepai-mcp-cursor for?
Developers using Cursor who want GrepAI’s embedding-backed code search exposed as tools the agent can invoke during implementation.
When should I use grepai-mcp-cursor?
During Build integrations when onboarding a new repo to Cursor, enabling semantic search, or troubleshooting missing grepai_search tool calls.
Is grepai-mcp-cursor safe to install?
MCP runs a local grepai process with filesystem access to your project—review the Security Audits panel on this Prism page and only index repos you trust.
SKILL.md
READMESKILL.md - Grepai Mcp Cursor
# 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: ```json { "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 ```json { "mcpServers": { "grepai": { "command": "grepai", "args": ["mcp-serve"] } } } ``` ## Per-Project Configuration For project-specific settings: ```json { "mcpServers": { "grepai": { "command": "grepai", "args": ["mcp-serve"], "cwd": "/absolute/path/to/project" } } } ``` ## Available Tools 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 | ## 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`: ```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 ```bash # Create workspace grepai workspace create dev grepai workspace add dev /path/to/project1 grepai workspace add dev /path/to/project2 ``` ```json { "mcpServers": { "grepai": { "command": "grepai", "args": ["mcp-serve", "--workspace", "dev"] } } } ``` ## Environment Variables If GrepAI uses environment variables (like API keys): ```json { "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