fix: disable broken GitHub code search tools (grep.app rate limited)
- Comment out grep_search, github_file, github_batch_files tools - Grep.app is hitting rate limits / Vercel security checkpoint - Keep SearXNG web search as primary working feature - Downgrade mcp-go to v0.18.0 for Go 1.23 compatibility
This commit is contained in:
@@ -120,62 +120,62 @@ func main() {
|
||||
)
|
||||
mcpServer.AddTool(newsSearchTool, searxngNewsSearchHandler)
|
||||
|
||||
// Code Search Tools (via Grep.app)
|
||||
grepSearchTool := mcp.NewTool("grep_search",
|
||||
mcp.WithDescription("Search code across public GitHub repositories using grep.app. Find real-world code examples, patterns, and implementations."),
|
||||
mcp.WithString("query",
|
||||
mcp.Required(),
|
||||
mcp.Description("Search query string - code pattern to search for"),
|
||||
),
|
||||
mcp.WithString("language",
|
||||
mcp.Description("Programming language filter (e.g., Go, Python, JavaScript, TypeScript)"),
|
||||
),
|
||||
mcp.WithString("repo",
|
||||
mcp.Description("Repository filter in format 'owner/repo' (e.g., 'vercel/next.js')"),
|
||||
),
|
||||
mcp.WithString("path",
|
||||
mcp.Description("Path filter for specific directories (e.g., 'src/', 'lib/')"),
|
||||
),
|
||||
mcp.WithBoolean("regex",
|
||||
mcp.Description("Treat query as regex pattern"),
|
||||
),
|
||||
mcp.WithBoolean("caseSensitive",
|
||||
mcp.Description("Case-sensitive search"),
|
||||
),
|
||||
mcp.WithBoolean("wholeWords",
|
||||
mcp.Description("Search for whole words only"),
|
||||
),
|
||||
)
|
||||
mcpServer.AddTool(grepSearchTool, grepSearchHandler)
|
||||
// Code Search Tools (via Grep.app) - DISABLED due to rate limiting
|
||||
// grepSearchTool := mcp.NewTool("grep_search",
|
||||
// mcp.WithDescription("Search code across public GitHub repositories using grep.app. Find real-world code examples, patterns, and implementations."),
|
||||
// mcp.WithString("query",
|
||||
// mcp.Required(),
|
||||
// mcp.Description("Search query string - code pattern to search for"),
|
||||
// ),
|
||||
// mcp.WithString("language",
|
||||
// mcp.Description("Programming language filter (e.g., Go, Python, JavaScript, TypeScript)"),
|
||||
// ),
|
||||
// mcp.WithString("repo",
|
||||
// mcp.Description("Repository filter in format 'owner/repo' (e.g., 'vercel/next.js')"),
|
||||
// ),
|
||||
// mcp.WithString("path",
|
||||
// mcp.Description("Path filter for specific directories (e.g., 'src/', 'lib/')"),
|
||||
// ),
|
||||
// mcp.WithBoolean("regex",
|
||||
// mcp.Description("Treat query as regex pattern"),
|
||||
// ),
|
||||
// mcp.WithBoolean("caseSensitive",
|
||||
// mcp.Description("Case-sensitive search"),
|
||||
// ),
|
||||
// mcp.WithBoolean("wholeWords",
|
||||
// mcp.Description("Search for whole words only"),
|
||||
// ),
|
||||
// )
|
||||
// mcpServer.AddTool(grepSearchTool, grepSearchHandler)
|
||||
|
||||
githubFileTool := mcp.NewTool("github_file",
|
||||
mcp.WithDescription("Fetch a single file from a GitHub repository"),
|
||||
mcp.WithString("owner",
|
||||
mcp.Required(),
|
||||
mcp.Description("Repository owner (e.g., 'vercel', 'facebook')"),
|
||||
),
|
||||
mcp.WithString("repo",
|
||||
mcp.Required(),
|
||||
mcp.Description("Repository name (e.g., 'next.js', 'react')"),
|
||||
),
|
||||
mcp.WithString("path",
|
||||
mcp.Required(),
|
||||
mcp.Description("File path (e.g., 'package.json', 'src/index.ts')"),
|
||||
),
|
||||
mcp.WithString("ref",
|
||||
mcp.Description("Branch, tag, or commit SHA (default: default branch)"),
|
||||
),
|
||||
)
|
||||
mcpServer.AddTool(githubFileTool, githubFileHandler)
|
||||
// githubFileTool := mcp.NewTool("github_file",
|
||||
// mcp.WithDescription("Fetch a single file from a GitHub repository"),
|
||||
// mcp.WithString("owner",
|
||||
// mcp.Required(),
|
||||
// mcp.Description("Repository owner (e.g., 'vercel', 'facebook')"),
|
||||
// ),
|
||||
// mcp.WithString("repo",
|
||||
// mcp.Required(),
|
||||
// mcp.Description("Repository name (e.g., 'next.js', 'react')"),
|
||||
// ),
|
||||
// mcp.WithString("path",
|
||||
// mcp.Required(),
|
||||
// mcp.Description("File path (e.g., 'package.json', 'src/index.ts')"),
|
||||
// ),
|
||||
// mcp.WithString("ref",
|
||||
// mcp.Description("Branch, tag, or commit SHA (default: default branch)"),
|
||||
// ),
|
||||
// )
|
||||
// mcpServer.AddTool(githubFileTool, githubFileHandler)
|
||||
|
||||
githubBatchFilesTool := mcp.NewTool("github_batch_files",
|
||||
mcp.WithDescription("Fetch multiple files from GitHub repositories in parallel"),
|
||||
mcp.WithArray("files",
|
||||
mcp.Required(),
|
||||
mcp.Description("Array of file objects with owner, repo, path, and optional ref"),
|
||||
),
|
||||
)
|
||||
mcpServer.AddTool(githubBatchFilesTool, githubBatchFilesHandler)
|
||||
// githubBatchFilesTool := mcp.NewTool("github_batch_files",
|
||||
// mcp.WithDescription("Fetch multiple files from GitHub repositories in parallel"),
|
||||
// mcp.WithArray("files",
|
||||
// mcp.Required(),
|
||||
// mcp.Description("Array of file objects with owner, repo, path, and optional ref"),
|
||||
// ),
|
||||
// )
|
||||
// mcpServer.AddTool(githubBatchFilesTool, githubBatchFilesHandler)
|
||||
|
||||
// New v2.0.0 Management Tools
|
||||
searchStatusTool := mcp.NewTool("search_status",
|
||||
|
||||
Reference in New Issue
Block a user