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:
@@ -1,8 +1,8 @@
|
||||
module go_mcp_server_searxng
|
||||
|
||||
go 1.24
|
||||
go 1.23
|
||||
|
||||
require github.com/mark3labs/mcp-go v0.24.1
|
||||
require github.com/mark3labs/mcp-go v0.18.0
|
||||
|
||||
require (
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
|
||||
@@ -10,6 +10,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/mark3labs/mcp-go v0.18.0 h1:YuhgIVjNlTG2ZOwmrkORWyPTp0dz1opPEqvsPtySXao=
|
||||
github.com/mark3labs/mcp-go v0.18.0/go.mod h1:KmJndYv7GIgcPVwEKJjNcbhVQ+hJGJhrCCB/9xITzpE=
|
||||
github.com/mark3labs/mcp-go v0.24.1 h1:YV+5X/+W4oBdERLWgiA1uR7AIvenlKJaa5V4hqufI7E=
|
||||
github.com/mark3labs/mcp-go v0.24.1/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
|
||||
@@ -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