diff --git a/go.mod b/go.mod index 805c0bd..c5ef15b 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 60fdade..932026f 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/main.go b/main.go index 504d814..4fc574e 100644 --- a/main.go +++ b/main.go @@ -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",