
Grepai Mcp Claude
Wire GrepAI semantic code search into Claude Code through MCP so the assistant navigates your indexed repo without blind grepping.
Install
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-claudeWhat is this skill?
- One-line setup: `claude mcp add grepai -- grepai mcp-serve`
- Manual MCP config for macOS, Linux, and Windows paths
- Exposes semantic search, call graph analysis, and index status to Claude
- Prerequisites checklist: GrepAI, embeddings provider, indexed project, Claude Code
- Troubleshooting path for Claude Code integration issues
Adoption & trust: 474 installs on skills.sh; 17 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Microsoft Foundrymicrosoft/azure-skills
Azure Aimicrosoft/azure-skills
Azure Hosted Copilot Sdkmicrosoft/azure-skills
Lark Eventlarksuite/cli
Running Claude Code Via Litellm Copilotxixu-me/skills
Setup Matt Pocock Skillsmattpocock/skills
Journey fit
Primary fit
Build → integrations is the right shelf because the skill is entirely about connecting an external MCP server to Claude Code. MCP configuration, `claude mcp add`, and mcp.json edits are classic integration work during active product development.
Common Questions / FAQ
Is Grepai Mcp Claude safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Grepai Mcp Claude
# 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: ```bash 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 ```json { "mcpServers": { "grepai": { "command": "grepai", "args": ["mcp-serve"] } } } ``` ### With Working Directory If you want GrepAI to always use a specific project: ```json { "mcpServers": { "grepai": { "command": "grepai", "args": ["mcp-serve"], "cwd": "/path/to/your/project" } } } ``` ## Verifying Installation ### Check MCP Server ```bash # 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: | Tool | Description | Parameters | |------|-------------|------------| | `grepai_search` | Semantic code search | `query` (required), `limit`, `compact` | | `grepai_trace_callers` | Find function callers | `symbol` (required), `compact` | | `grepai_trace_callees` | Find function callees | `symbol` (required), `compact` | | `grepai_trace_graph` | Build call graph | `symbol` (required), `depth` | | `grepai_index_status` | Check index health | `verbose` (optional) | ## Tool Usage Examples ### Semantic Search Claude request: > "Find code related to user authentication" Claude uses: ```json { "tool": "grepai_search", "parameters": { "query": "user authentication", "limit": 5, "compact": true } } ``` ### Trace Analysis Claude request: > "What functions call the Login function?" Claude uses: ```json { "tool": "grepai_trace_callers", "parameters": { "symbol": "Login", "compact": true } } ``` ### Index Status Claude request: > "Is the code index up to date?" Claude uses: ```json { "tool": "grepai_index_status", "parameters": { "verbose": true } } ``` ## Compact Mode By default, MCP tools return compact JSON to minimize tokens: ```json { "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 ```bash cd /path/to/your/project claude # Claude Code now uses this directory ``` ### Option 2: Configure CWD in MCP Config ```json { "mcpServers": { "grepai": { "command": "grepai", "args": ["mcp-serve"], "cwd": "/path/to/your/project" } } } ``` ## Multiple Projects For multiple projects, you can: ###