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
|
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 (
|
require (
|
||||||
github.com/google/go-cmp v0.7.0 // indirect
|
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/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 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
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 h1:YV+5X/+W4oBdERLWgiA1uR7AIvenlKJaa5V4hqufI7E=
|
||||||
github.com/mark3labs/mcp-go v0.24.1/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
|
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=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
|
|||||||
@@ -120,62 +120,62 @@ func main() {
|
|||||||
)
|
)
|
||||||
mcpServer.AddTool(newsSearchTool, searxngNewsSearchHandler)
|
mcpServer.AddTool(newsSearchTool, searxngNewsSearchHandler)
|
||||||
|
|
||||||
// Code Search Tools (via Grep.app)
|
// Code Search Tools (via Grep.app) - DISABLED due to rate limiting
|
||||||
grepSearchTool := mcp.NewTool("grep_search",
|
// 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.WithDescription("Search code across public GitHub repositories using grep.app. Find real-world code examples, patterns, and implementations."),
|
||||||
mcp.WithString("query",
|
// mcp.WithString("query",
|
||||||
mcp.Required(),
|
// mcp.Required(),
|
||||||
mcp.Description("Search query string - code pattern to search for"),
|
// mcp.Description("Search query string - code pattern to search for"),
|
||||||
),
|
// ),
|
||||||
mcp.WithString("language",
|
// mcp.WithString("language",
|
||||||
mcp.Description("Programming language filter (e.g., Go, Python, JavaScript, TypeScript)"),
|
// mcp.Description("Programming language filter (e.g., Go, Python, JavaScript, TypeScript)"),
|
||||||
),
|
// ),
|
||||||
mcp.WithString("repo",
|
// mcp.WithString("repo",
|
||||||
mcp.Description("Repository filter in format 'owner/repo' (e.g., 'vercel/next.js')"),
|
// mcp.Description("Repository filter in format 'owner/repo' (e.g., 'vercel/next.js')"),
|
||||||
),
|
// ),
|
||||||
mcp.WithString("path",
|
// mcp.WithString("path",
|
||||||
mcp.Description("Path filter for specific directories (e.g., 'src/', 'lib/')"),
|
// mcp.Description("Path filter for specific directories (e.g., 'src/', 'lib/')"),
|
||||||
),
|
// ),
|
||||||
mcp.WithBoolean("regex",
|
// mcp.WithBoolean("regex",
|
||||||
mcp.Description("Treat query as regex pattern"),
|
// mcp.Description("Treat query as regex pattern"),
|
||||||
),
|
// ),
|
||||||
mcp.WithBoolean("caseSensitive",
|
// mcp.WithBoolean("caseSensitive",
|
||||||
mcp.Description("Case-sensitive search"),
|
// mcp.Description("Case-sensitive search"),
|
||||||
),
|
// ),
|
||||||
mcp.WithBoolean("wholeWords",
|
// mcp.WithBoolean("wholeWords",
|
||||||
mcp.Description("Search for whole words only"),
|
// mcp.Description("Search for whole words only"),
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
mcpServer.AddTool(grepSearchTool, grepSearchHandler)
|
// mcpServer.AddTool(grepSearchTool, grepSearchHandler)
|
||||||
|
|
||||||
githubFileTool := mcp.NewTool("github_file",
|
// githubFileTool := mcp.NewTool("github_file",
|
||||||
mcp.WithDescription("Fetch a single file from a GitHub repository"),
|
// mcp.WithDescription("Fetch a single file from a GitHub repository"),
|
||||||
mcp.WithString("owner",
|
// mcp.WithString("owner",
|
||||||
mcp.Required(),
|
// mcp.Required(),
|
||||||
mcp.Description("Repository owner (e.g., 'vercel', 'facebook')"),
|
// mcp.Description("Repository owner (e.g., 'vercel', 'facebook')"),
|
||||||
),
|
// ),
|
||||||
mcp.WithString("repo",
|
// mcp.WithString("repo",
|
||||||
mcp.Required(),
|
// mcp.Required(),
|
||||||
mcp.Description("Repository name (e.g., 'next.js', 'react')"),
|
// mcp.Description("Repository name (e.g., 'next.js', 'react')"),
|
||||||
),
|
// ),
|
||||||
mcp.WithString("path",
|
// mcp.WithString("path",
|
||||||
mcp.Required(),
|
// mcp.Required(),
|
||||||
mcp.Description("File path (e.g., 'package.json', 'src/index.ts')"),
|
// mcp.Description("File path (e.g., 'package.json', 'src/index.ts')"),
|
||||||
),
|
// ),
|
||||||
mcp.WithString("ref",
|
// mcp.WithString("ref",
|
||||||
mcp.Description("Branch, tag, or commit SHA (default: default branch)"),
|
// mcp.Description("Branch, tag, or commit SHA (default: default branch)"),
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
mcpServer.AddTool(githubFileTool, githubFileHandler)
|
// mcpServer.AddTool(githubFileTool, githubFileHandler)
|
||||||
|
|
||||||
githubBatchFilesTool := mcp.NewTool("github_batch_files",
|
// githubBatchFilesTool := mcp.NewTool("github_batch_files",
|
||||||
mcp.WithDescription("Fetch multiple files from GitHub repositories in parallel"),
|
// mcp.WithDescription("Fetch multiple files from GitHub repositories in parallel"),
|
||||||
mcp.WithArray("files",
|
// mcp.WithArray("files",
|
||||||
mcp.Required(),
|
// mcp.Required(),
|
||||||
mcp.Description("Array of file objects with owner, repo, path, and optional ref"),
|
// mcp.Description("Array of file objects with owner, repo, path, and optional ref"),
|
||||||
),
|
// ),
|
||||||
)
|
// )
|
||||||
mcpServer.AddTool(githubBatchFilesTool, githubBatchFilesHandler)
|
// mcpServer.AddTool(githubBatchFilesTool, githubBatchFilesHandler)
|
||||||
|
|
||||||
// New v2.0.0 Management Tools
|
// New v2.0.0 Management Tools
|
||||||
searchStatusTool := mcp.NewTool("search_status",
|
searchStatusTool := mcp.NewTool("search_status",
|
||||||
|
|||||||
Reference in New Issue
Block a user