feat(mcp): add grep_app builtin MCP for ultra-fast GitHub code search
- Add grep_app MCP configuration (https://mcp.grep.app) - Update explore agent with grep_app usage guide: - Always launch 5+ grep_app calls with query variations - Always add 2+ other search tools for verification - grep_app is fast but potentially outdated, use as starting point only - Update README.md and README.ko.md with grep_app documentation 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
13
README.ko.md
13
README.ko.md
@@ -317,7 +317,10 @@ Syntax Highlighting, Autocomplete, Refactoring, Navigation, Analysis, 그리고
|
||||
- Use PascalCase for interface names
|
||||
- Use camelCase for function names
|
||||
```
|
||||
- **Online**: 프로젝트 규칙이 전부는 아니겠죠. exa, context7 mcp 를 내장하여 검색 기능을 제공합니다.
|
||||
- **Online**: 프로젝트 규칙이 전부는 아니겠죠. 확장 기능을 위한 내장 MCP를 제공합니다:
|
||||
- **context7**: 공식 문서 조회
|
||||
- **websearch_exa**: 실시간 웹 검색
|
||||
- **grep_app**: 공개 GitHub 저장소에서 초고속 코드 검색 (구현 예제 찾기에 최적)
|
||||
|
||||
#### 멀티모달을 다 활용하면서, 토큰은 덜 쓰도록.
|
||||
|
||||
@@ -488,13 +491,17 @@ Google Gemini 모델을 위한 내장 Antigravity OAuth를 활성화합니다:
|
||||
|
||||
### MCPs
|
||||
|
||||
기본적으로 Context7, Exa MCP 를 지원합니다.
|
||||
기본적으로 Context7, Exa, grep.app MCP 를 지원합니다.
|
||||
|
||||
- **context7**: 라이브러리의 최신 공식 문서를 가져옵니다
|
||||
- **websearch_exa**: Exa AI 기반 실시간 웹 검색
|
||||
- **grep_app**: [grep.app](https://grep.app)을 통해 수백만 개의 공개 GitHub 저장소에서 초고속 코드 검색
|
||||
|
||||
이것이 마음에 들지 않는다면, ~/.config/opencode/oh-my-opencode.json 혹은 .opencode/oh-my-opencode.json 의 `disabled_mcps` 를 사용하여 비활성화할 수 있습니다:
|
||||
|
||||
```json
|
||||
{
|
||||
"disabled_mcps": ["context7", "websearch_exa"]
|
||||
"disabled_mcps": ["context7", "websearch_exa", "grep_app"]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
13
README.md
13
README.md
@@ -314,7 +314,10 @@ Hand your best tools to your best colleagues. Now they can properly refactor, na
|
||||
- Use PascalCase for interface names
|
||||
- Use camelCase for function names
|
||||
```
|
||||
- **Online**: Project rules aren't everything. Built-in exa and context7 MCP for web search.
|
||||
- **Online**: Project rules aren't everything. Built-in MCPs for extended capabilities:
|
||||
- **context7**: Official documentation lookup
|
||||
- **websearch_exa**: Real-time web search
|
||||
- **grep_app**: Ultra-fast code search across public GitHub repos (great for finding implementation examples)
|
||||
|
||||
#### Be Multimodal. Save Tokens.
|
||||
|
||||
@@ -485,13 +488,17 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, `
|
||||
|
||||
### MCPs
|
||||
|
||||
Context7 and Exa MCP enabled by default.
|
||||
Context7, Exa, and grep.app MCP enabled by default.
|
||||
|
||||
- **context7**: Fetches up-to-date official documentation for libraries
|
||||
- **websearch_exa**: Real-time web search powered by Exa AI
|
||||
- **grep_app**: Ultra-fast code search across millions of public GitHub repositories via [grep.app](https://grep.app)
|
||||
|
||||
Don't want them? Disable via `disabled_mcps` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"disabled_mcps": ["context7", "websearch_exa"]
|
||||
"disabled_mcps": ["context7", "websearch_exa", "grep_app"]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -73,6 +73,46 @@ Your response has FAILED if:
|
||||
- **Using Git CLI extensively for repository insights**
|
||||
- **Using LSP tools for semantic code analysis**
|
||||
- **Using AST-grep for structural code pattern matching**
|
||||
- **Using grep_app (grep.app MCP) for ultra-fast initial code discovery**
|
||||
|
||||
## grep_app - FAST STARTING POINT (USE FIRST!)
|
||||
|
||||
**grep_app is your fastest weapon for initial code discovery.** It searches millions of public GitHub repositories instantly.
|
||||
|
||||
### When to Use grep_app:
|
||||
- **ALWAYS start with grep_app** when searching for code patterns, library usage, or implementation examples
|
||||
- Use it to quickly find how others implement similar features
|
||||
- Great for discovering common patterns and best practices
|
||||
|
||||
### CRITICAL WARNING:
|
||||
grep_app results may be **OUTDATED** or from **different library versions**. You MUST:
|
||||
1. Use grep_app results as a **starting point only**
|
||||
2. **Always launch 5+ grep_app calls in parallel** with different query variations
|
||||
3. **Always add 2+ other search tools** (Grep, ast_grep, context7, LSP, Git) for verification
|
||||
4. Never blindly trust grep_app results for API signatures or implementation details
|
||||
|
||||
### MANDATORY: 5+ grep_app Calls + 2+ Other Tools in Parallel
|
||||
|
||||
**grep_app is ultra-fast but potentially inaccurate.** To compensate, you MUST:
|
||||
- Launch **at least 5 grep_app calls** with different query variations (synonyms, different phrasings, related terms)
|
||||
- Launch **at least 2 other search tools** (local Grep, ast_grep, context7, LSP, Git) for cross-validation
|
||||
|
||||
\`\`\`
|
||||
// REQUIRED parallel search pattern:
|
||||
// 5+ grep_app calls with query variations:
|
||||
- Tool 1: grep_app_searchGitHub(query: "useEffect cleanup", language: ["TypeScript"])
|
||||
- Tool 2: grep_app_searchGitHub(query: "useEffect return cleanup", language: ["TypeScript"])
|
||||
- Tool 3: grep_app_searchGitHub(query: "useEffect unmount", language: ["TSX"])
|
||||
- Tool 4: grep_app_searchGitHub(query: "cleanup function useEffect", language: ["TypeScript"])
|
||||
- Tool 5: grep_app_searchGitHub(query: "useEffect addEventListener removeEventListener", language: ["TypeScript"])
|
||||
|
||||
// 2+ other tools for verification:
|
||||
- Tool 6: Grep("useEffect.*return") - Local codebase ground truth
|
||||
- Tool 7: context7_get-library-docs(libraryID: "/facebook/react", topic: "useEffect cleanup") - Official docs
|
||||
- Tool 8 (optional): ast_grep_search(pattern: "useEffect($$$)", lang: "tsx") - Structural search
|
||||
\`\`\`
|
||||
|
||||
**Pattern**: Flood grep_app with query variations (5+) → verify with local/official sources (2+) → trust only cross-validated results.
|
||||
|
||||
## Git CLI - USE EXTENSIVELY
|
||||
|
||||
|
||||
5
src/mcp/grep-app.ts
Normal file
5
src/mcp/grep-app.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export const grep_app = {
|
||||
type: "remote" as const,
|
||||
url: "https://mcp.grep.app",
|
||||
enabled: true,
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { websearch_exa } from "./websearch-exa"
|
||||
import { context7 } from "./context7"
|
||||
import { grep_app } from "./grep-app"
|
||||
import type { McpName } from "./types"
|
||||
|
||||
export { McpNameSchema, type McpName } from "./types"
|
||||
@@ -7,6 +8,7 @@ export { McpNameSchema, type McpName } from "./types"
|
||||
const allBuiltinMcps: Record<McpName, { type: "remote"; url: string; enabled: boolean }> = {
|
||||
websearch_exa,
|
||||
context7,
|
||||
grep_app,
|
||||
}
|
||||
|
||||
export function createBuiltinMcps(disabledMcps: McpName[] = []) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod"
|
||||
|
||||
export const McpNameSchema = z.enum(["websearch_exa", "context7"])
|
||||
export const McpNameSchema = z.enum(["websearch_exa", "context7", "grep_app"])
|
||||
|
||||
export type McpName = z.infer<typeof McpNameSchema>
|
||||
|
||||
Reference in New Issue
Block a user