
grepai-mcp-claude
Integrate GrepAI with Claude Code via MCP. Use this skill to enable semantic code search in Claude Code.
- Installs
- 612
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-claude- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads grepai-mcp-claude automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
- GrepAI installed
- Ollama running (or other embedding provider)
- Project indexed (
grepai watch) - 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:
| 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:
{
"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:
- GrepAI is initialized in your project
- Index exists (run
grepai watchfirst) - 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:
- Restart Claude Code after config changes
- Check MCP config syntax (valid JSON)
- Verify
grepaiis in PATH - Test:
grepai mcp-servemanually
Search Returns No Results
❌ Problem: Searches return empty
✅ Solutions:
- Ensure
grepai watchhas run - Check working directory has
.grepai/ - Verify index exists:
grepai status
Connection Refused
❌ Problem: MCP server won't start
✅ Solutions:
- Check Ollama is running:
curl http://localhost:11434/api/tags - Verify config:
cat .grepai/config.yaml - Run
grepai mcp-servemanually to see errors
Wrong Project Indexed
❌ Problem: Results from wrong codebase
✅ Solutions:
- Check
cwdin MCP config - Start Claude from correct directory
- Verify with
grepai_index_statustool
Best Practices
- Keep index updated: Run
grepai watch --background - Use compact mode: Reduces token usage
- Set working directory: Explicit
cwdin config - Check status first: Use
grepai_index_status - 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!
FAQ
What does the grepai-mcp-claude skill do?
Integrate GrepAI with Claude Code via MCP. Use this skill to enable semantic code search in Claude Code.
How do I install grepai-mcp-claude?
Run npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-claude in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/grepai-mcp-claude/ (personal) or .claude/skills/grepai-mcp-claude/ (project).
Which AI agents can use grepai-mcp-claude?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is grepai-mcp-claude safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains grepai-mcp-claude?
It is published by yoanbernabeu in yoanbernabeu/grepai-skills. It has 612 recorded installs.
More from yoanbernabeu/grepai-skills
grepai-search-basics
yoanbernabeu/grepai-skills
Basic semantic code search with GrepAI. Use this skill to learn fundamental search commands and concepts.
grepai-search-advanced
yoanbernabeu/grepai-skills
Advanced search options in GrepAI. Use this skill for JSON output, compact mode, and AI agent integration.
grepai-trace-graph
yoanbernabeu/grepai-skills
Build complete call graphs with GrepAI trace. Use this skill for recursive dependency analysis.
grepai-ollama-setup
yoanbernabeu/grepai-skills
Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation.
grepai-trace-callers
yoanbernabeu/grepai-skills
Find function callers with GrepAI trace. Use this skill to discover what code calls a specific function.
grepai-search-tips
yoanbernabeu/grepai-skills
Tips and best practices for effective GrepAI searches. Use this skill to improve search result quality.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available