grepai-mcp-claude

yoanbernabeu/grepai-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-claude
0 commentsdiscussion
summary

This skill covers integrating GrepAI with Claude Code using the Model Context Protocol (MCP).

skill.md

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:

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:

  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

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:

  1. Restart Claude Code after config changes
  2. Check MCP config syntax (valid JSON)
  3. Verify grepai is in PATH
  4. Test: grepai mcp-serve manually

Search Returns No Results

Problem: Searches return empty

Solutions:

  1. Ensure grepai watch has run
  2. Check working directory has .grepai/
  3. Verify index exists: grepai status

Connection Refused

Problem: MCP server won't start

Solutions:

  1. Check Ollama is running: curl http://localhost:11434/api/tags
  2. Verify config: cat .grepai/config.yaml
  3. Run grepai mcp-serve manually to see errors

Wrong Project Indexed

Problem: Results from wrong codebase

Solutions:

  1. Check cwd in MCP config
  2. Start Claude from correct directory
  3. Verify with grepai_index_status tool

Best Practices

  1. Keep index updated: Run grepai watch --background
  2. Use compact mode: Reduces token usage
  3. Set working directory: Explicit cwd in config
  4. Check status first: Use grepai_index_status
  5. 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!
how to use grepai-mcp-claude

How to use grepai-mcp-claude on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add grepai-mcp-claude
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-mcp-claude

The skills CLI fetches grepai-mcp-claude from GitHub repository yoanbernabeu/grepai-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/grepai-mcp-claude

Reload or restart Cursor to activate grepai-mcp-claude. Access the skill through slash commands (e.g., /grepai-mcp-claude) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.737 reviews
  • Anaya Dixit· Dec 28, 2024

    Registry listing for grepai-mcp-claude matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Chaitanya Patil· Dec 12, 2024

    grepai-mcp-claude has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Liam Nasser· Dec 12, 2024

    Useful defaults in grepai-mcp-claude — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Layla Thompson· Dec 8, 2024

    Keeps context tight: grepai-mcp-claude is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Henry Bhatia· Nov 27, 2024

    grepai-mcp-claude is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Advait Malhotra· Nov 19, 2024

    grepai-mcp-claude fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Arjun Sharma· Nov 7, 2024

    I recommend grepai-mcp-claude for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Piyush G· Nov 3, 2024

    Solid pick for teams standardizing on skills: grepai-mcp-claude is focused, and the summary matches what you get after install.

  • Noor Khanna· Nov 3, 2024

    We added grepai-mcp-claude from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Arya Srinivasan· Oct 26, 2024

    grepai-mcp-claude reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 37

1 / 4