{"id":31286952,"url":"https://github.com/grokify/metasearch-mcp-server","last_synced_at":"2025-09-24T10:59:01.034Z","repository":{"id":315368495,"uuid":"1059193209","full_name":"grokify/metasearch-mcp-server","owner":"grokify","description":"MCP server for search via Serper and SerpApi","archived":false,"fork":false,"pushed_at":"2025-09-18T07:19:26.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-18T08:26:41.785Z","etag":null,"topics":["go","mcp-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grokify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T05:58:05.000Z","updated_at":"2025-09-18T07:15:45.000Z","dependencies_parsed_at":"2025-09-18T08:28:07.922Z","dependency_job_id":"44e34d35-e215-4e85-8256-e81ce0287886","html_url":"https://github.com/grokify/metasearch-mcp-server","commit_stats":null,"previous_names":["grokify/metasearch-mcp-server"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/grokify/metasearch-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Fmetasearch-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Fmetasearch-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Fmetasearch-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Fmetasearch-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grokify","download_url":"https://codeload.github.com/grokify/metasearch-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grokify%2Fmetasearch-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276191277,"owners_count":25600410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","mcp-server"],"created_at":"2025-09-24T10:58:56.812Z","updated_at":"2025-09-24T10:59:01.024Z","avatar_url":"https://github.com/grokify.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Search MCP Server\n\n[![Build Status][build-status-svg]][build-status-url]\n[![Lint Status][lint-status-svg]][lint-status-url]\n[![Go Report Card][goreport-svg]][goreport-url]\n[![Docs][docs-godoc-svg]][docs-godoc-url]\n[![Visualization][viz-svg]][viz-url]\n[![License][license-svg]][license-url]\n\nA Model Context Protocol (MCP) server implementation in Go that provides Google search functionality via multiple search engine APIs through a plugin-based architecture. Currently supporting:\n\n1. Serper\n2. SerpApi\n\n## Features\n\nThis server provides comprehensive Google search capabilities through the following tools:\n\n- **`google_search`** - General web search\n- **`google_search_news`** - News articles search\n- **`google_search_images`** - Image search\n- **`google_search_videos`** - Video search\n- **`google_search_places`** - Places and location search\n- **`google_search_maps`** - Maps search\n- **`google_search_reviews`** - Reviews search\n- **`google_search_shopping`** - Product/shopping search\n- **`google_search_scholar`** - Academic papers search\n- **`google_search_lens`** - Visual search\n- **`google_search_autocomplete`** - Search suggestions\n- **`webpage_scrape`** - Web page content extraction\n\n## Supported Search Engines\n\n### Serper API (Default)\n- **API**: [serper.dev](https://serper.dev)\n- **Environment Variable**: `SERPER_API_KEY`\n- **All tools supported**\n\n### SerpAPI\n- **API**: [serpapi.com](https://serpapi.com)\n- **Environment Variable**: `SERPAPI_API_KEY`\n- **Most tools supported** (note: `google_search_lens` falls back to image search)\n\n## Prerequisites\n\n1. **Go 1.24.5 or later**\n2. **API Key** for your chosen search engine:\n   - **Serper API Key** - Get one from [serper.dev](https://serper.dev)\n   - **SerpAPI Key** - Get one from [serpapi.com](https://serpapi.com)\n\n## Installation\n\n### Option 1: Install via `go install`\n\n```bash\ngo install github.com/grokify/metasearch-mcp-server@latest\n```\n\n### Option 2: Build from source\n\n1. Clone or download this repository\n2. Set your API key(s) as environment variables:\n   ```bash\n   # For Serper (default)\n   export SERPER_API_KEY=\"your_serper_api_key_here\"\n   \n   # For SerpAPI (optional)\n   export SERPAPI_API_KEY=\"your_serpapi_key_here\"\n   \n   # Choose which engine to use (optional, defaults to \"serper\")\n   export SEARCH_ENGINE=\"serper\"  # or \"serpapi\"\n   ```\n3. Install dependencies:\n   ```bash\n   go mod tidy\n   ```\n4. Build the server:\n   ```bash\n   go build -o multi-search-mcp-server\n   ```\n\n## Usage\n\n### Running the Server\n\n```bash\n# Use default engine (Serper)\n./multi-search-mcp-server\n\n# Or explicitly choose an engine\nSEARCH_ENGINE=serpapi ./multi-search-mcp-server\n```\n\nThe server runs using stdio transport and follows the MCP specification.\n\n### Tool Parameters\n\nAll search tools accept the following parameters:\n\n- **`query`** (required) - The search query string\n- **`location`** (optional) - Search location/region\n- **`language`** (optional) - Language code (e.g., \"en\", \"es\", \"fr\")\n- **`country`** (optional) - Country code (e.g., \"us\", \"uk\", \"ca\")\n- **`num_results`** (optional) - Number of results to return (1-100, default: 10)\n\nThe `webpage_scrape` tool accepts:\n- **`url`** (required) - The URL to scrape\n\n### Example Tool Calls\n\n#### Basic Web Search\n```json\n{\n  \"name\": \"google_search\",\n  \"arguments\": {\n    \"query\": \"artificial intelligence trends 2024\",\n    \"num_results\": 5\n  }\n}\n```\n\n#### Location-specific News Search\n```json\n{\n  \"name\": \"google_search_news\",\n  \"arguments\": {\n    \"query\": \"climate change\",\n    \"location\": \"New York\",\n    \"language\": \"en\",\n    \"country\": \"us\"\n  }\n}\n```\n\n#### Web Scraping\n```json\n{\n  \"name\": \"webpage_scrape\",\n  \"arguments\": {\n    \"url\": \"https://example.com/article\"\n  }\n}\n```\n\n## Configuration with MCP Clients\n\n### Claude Desktop\n\nAdd to your Claude Desktop configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"multi-search\": {\n      \"command\": \"/path/to/multi-search-mcp-server\",\n      \"env\": {\n        \"SEARCH_ENGINE\": \"serper\",\n        \"SERPER_API_KEY\": \"your_serper_api_key_here\",\n        \"SERPAPI_API_KEY\": \"your_serpapi_key_here\"\n      }\n    }\n  }\n}\n```\n\nOr for a specific engine only:\n\n```json\n{\n  \"mcpServers\": {\n    \"search-serper\": {\n      \"command\": \"/path/to/multi-search-mcp-server\",\n      \"env\": {\n        \"SEARCH_ENGINE\": \"serper\",\n        \"SERPER_API_KEY\": \"your_serper_api_key_here\"\n      }\n    },\n    \"search-serpapi\": {\n      \"command\": \"/path/to/multi-search-mcp-server\",\n      \"env\": {\n        \"SEARCH_ENGINE\": \"serpapi\",\n        \"SERPAPI_API_KEY\": \"your_serpapi_key_here\"\n      }\n    }\n  }\n}\n```\n\n### Other MCP Clients\n\nThis server is compatible with any MCP-compliant client. Configure it according to your client's documentation, ensuring the appropriate API key environment variables are set.\n\n## API Response Format\n\nAll search tools return JSON responses containing:\n- Search results with titles, URLs, and snippets\n- Knowledge graph information (when available)\n- Related searches and suggestions\n- Metadata about the search\n\nThe `webpage_scrape` tool returns:\n- Extracted text content\n- Page metadata\n- Structured data (when available)\n\n## Error Handling\n\nThe server provides detailed error messages for:\n- Missing or invalid API keys\n- Invalid search parameters\n- Network connectivity issues\n- API rate limits or quota exceeded\n- Invalid URLs for scraping\n\n## Architecture\n\nThis server uses a plugin-based architecture with the external [`github.com/grokify/metasearch`](https://github.com/grokify/metasearch) package:\n\n```\n/\n└── main.go                      # Main server and tool registration\n```\n\n### Metasearch Package\n\nThe server leverages the external [`github.com/grokify/metasearch`](https://github.com/grokify/metasearch) package which provides:\n\n- **Core interfaces** (`Engine`, `Registry`) for implementing search engines\n- **Common types** (`SearchParams`, `ScrapeParams`, `SearchResult`)\n- **Engine implementations** for various search providers\n- **Registry management** for discovering and selecting engines\n\n### Adding New Search Engines\n\nTo add a new search engine, contribute to the [`github.com/grokify/metasearch`](https://github.com/grokify/metasearch) package:\n\n1. Fork the metasearch repository\n2. Create a new engine implementation following the existing patterns\n3. Submit a pull request to the metasearch repository\n\n### Using the Metasearch Package\n\nThe [`github.com/grokify/metasearch`](https://github.com/grokify/metasearch) package can be used in your own projects:\n\n```go\nimport \"github.com/grokify/metasearch\"\n\nregistry := metasearch.NewRegistry()\nengine, err := metasearch.GetDefaultEngine(registry)\nif err != nil {\n    log.Fatal(err)\n}\n\nresult, err := engine.Search(ctx, metasearch.SearchParams{\n    Query: \"golang web scraping\",\n})\n```\n\n## Development\n\n### Building from Source\n\n```bash\ngit clone \u003crepository-url\u003e\ncd metasearch-mcp-server\ngo mod tidy\ngo build -o multi-search-mcp-server\n```\n\n### Testing\n\n```bash\ngo test ./...\n```\n\n### Testing with Different Engines\n\n```bash\n# Test with Serper\nSEARCH_ENGINE=serper SERPER_API_KEY=your_key ./multi-search-mcp-server\n\n# Test with SerpAPI  \nSEARCH_ENGINE=serpapi SERPAPI_API_KEY=your_key ./multi-search-mcp-server\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Support\n\nFor issues related to:\n- **Serper API**: Contact [serper.dev](https://serper.dev)\n- **SerpAPI**: Contact [serpapi.com](https://serpapi.com)\n- **MCP Specification**: See [Model Context Protocol documentation](https://modelcontextprotocol.io)\n- **This Implementation**: Open an issue in this repository\n\n [build-status-svg]: https://github.com/grokify/metasearch-mcp-server/actions/workflows/ci.yaml/badge.svg?branch=main\n [build-status-url]: https://github.com/grokify/metasearch-mcp-server/actions/workflows/ci.yaml\n [lint-status-svg]: https://github.com/grokify/metasearch-mcp-server/actions/workflows/lint.yaml/badge.svg?branch=main\n [lint-status-url]: https://github.com/grokify/metasearch-mcp-server/actions/workflows/lint.yaml\n [goreport-svg]: https://goreportcard.com/badge/github.com/grokify/metasearch-mcp-server\n [goreport-url]: https://goreportcard.com/report/github.com/grokify/metasearch-mcp-server\n [docs-godoc-svg]: https://pkg.go.dev/badge/github.com/grokify/metasearch-mcp-server\n [docs-godoc-url]: https://pkg.go.dev/github.com/grokify/metasearch-mcp-server\n [viz-svg]: https://img.shields.io/badge/visualizaton-Go-blue.svg\n [viz-url]: https://mango-dune-07a8b7110.1.azurestaticapps.net/?repo=grokify%2Fmetasearch-mcp-server\n [loc-svg]: https://tokei.rs/b1/github/grokify/metasearch-mcp-server\n [repo-url]: https://github.com/grokify/metasearch-mcp-server\n [license-svg]: https://img.shields.io/badge/license-MIT-blue.svg\n [license-url]: https://github.com/grokify/metasearch-mcp-server/blob/master/LICENSE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokify%2Fmetasearch-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrokify%2Fmetasearch-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrokify%2Fmetasearch-mcp-server/lists"}