Agent skill
mcp-grep-code
Search real-world code examples from over a million public GitHub repositories. Use when finding code patterns, implementation examples, or how libraries are used in practice. Triggers on "find code examples", "how is [library] used", "search GitHub code", "grep.app search", "code pattern".
Install this agent skill to your Project
npx add-skill https://github.com/vaayne/agent-kit/tree/main/skills/mcp-grep-code
SKILL.md
Grep.app Code Search
MCP service at https://mcp.grep.app (http) with 1 tool.
Requirements
mhCLI must be installed. If not available, install with:bashcurl -fsSL https://raw.githubusercontent.com/vaayne/mcphub/main/scripts/install.sh | sh
Usage
List tools: `mh list -u https://mcp.grep.app -t http`
Get tool details: `mh inspect -u https://mcp.grep.app -t http searchGitHub`
Invoke tool: `mh invoke -u https://mcp.grep.app -t http searchGitHub '{"query": "pattern"}'`
Notes
- Run
inspectbefore invoking unfamiliar tools to get full parameter schema - Timeout: 30s default, use
--timeout <seconds>to adjust - Important: This searches for literal code patterns (like grep), NOT keywords
- Use actual code that would appear in files, not descriptions
- Use
useRegexp=truewith(?s)prefix for multi-line patterns
Tools
| Tool | Description |
|---|---|
searchGitHub |
Find real-world code examples from public GitHub repositories. Searches for literal code patterns across millions of repos. |
Tool Parameters
searchGitHub
Required:
query (string) — literal code pattern, e.g. "useState(" or "import React from"
Optional:
language (array) — filter by language, e.g. ["TypeScript", "TSX"], ["Python"]
repo (string) — filter by repo, e.g. "facebook/react" or "vercel/"
path (string) — filter by file path, e.g. "src/components" or "/route.ts"
useRegexp (boolean) — treat query as regex (default: false)
matchCase (boolean) — case-sensitive search (default: false)
matchWholeWords (boolean) — match whole words only (default: false)
Search Tips
Good queries (literal code patterns):
useState(import React fromasync function(?s)try {.*await
Bad queries (keywords — won't work well):
react state managementhow to use hooks
Examples
# Find useState usage patterns
mh invoke -u https://mcp.grep.app -t http searchGitHub '{"query": "useState("}'
# Find async/await patterns in TypeScript
mh invoke -u https://mcp.grep.app -t http searchGitHub '{"query": "async function fetch", "language": ["TypeScript"]}'
# Find multi-line patterns with regex
mh invoke -u https://mcp.grep.app -t http searchGitHub '{"query": "(?s)useEffect\\(\\(\\) => {.*removeEventListener", "useRegexp": true}'
# Search within a specific repo
mh invoke -u https://mcp.grep.app -t http searchGitHub '{"query": "from \"openai\"", "repo": "vercel/ai"}'
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
pi-delegate
Delegate tasks to Pi subagents with preset roles (oracle, worker, reviewer, ui-engineer, librarian) or ad-hoc prompts. Use for fresh context, model specialization, second opinions, code review, isolated execution, or parallel task delegation.
mcp-jetbrains-ide
Control JetBrains IDE (IntelliJ, WebStorm, PyCharm) via MCP. Use when manipulating IDE files, running configurations, searching code, or performing refactoring. Triggers on "open in IDE", "run configuration", "refactor code", "IDE search", "JetBrains".
mcp-context7-docs
Query up-to-date documentation and code examples for any programming library or framework. Use when looking up API docs, finding code examples, or checking library usage. Triggers on "how to use [library]", "docs for [package]", "show me examples of [framework]", "Context7 lookup".
web-fetch
Fetch and extract clean content from URLs using Jina Reader API. Use when users need to read webpage content, extract article text, or fetch URL content for analysis. Triggers on "fetch this page", "read this URL", "extract content from", "get the content of", "what does this page say".
tmux
Control interactive terminal sessions via tmux. Use when tasks need persistent REPLs, parallel CLI agents, or any process requiring a TTY that simple shell execution cannot handle.
specs-dev
Plan-first development workflow with review gates. Use when implementing features, refactoring, or any task requiring structured planning, iterative implementation with reviews, and clean commits. Triggers on requests like "implement feature X", "plan and build", "spec-driven development", or when user wants disciplined, reviewed code changes.
Didn't find tool you were looking for?