Go MCP server for Serper (Google Search + webpage scrape)
npm install go-serper-mcp-serverA Go implementation of an MCP server that exposes the full Serper Google Search API surface, plus Serper's webpage scrape endpoint.
- Go 1.23+
- A Serper API key (SERPER_API_KEY)
- google_search
- google_search_images
- google_search_videos
- google_search_places
- google_search_maps
- google_search_reviews
- google_search_news
- google_search_shopping
- google_search_lens
- google_search_scholar
- google_search_patents
- google_search_autocomplete
- webpage_scrape
Set your Serper API key as an environment variable:
``bash`
export SERPER_API_KEY="your-key"
Optional:
- AIOHTTP_TIMEOUT (seconds, default: 15) - matches the reference server's timeout env name.
`bash`
go run . -t stdio
`bash`
go run . -t sse -p 8894
SSE endpoint:
``
http://127.0.0.1:8894/sse
`bash`
make build
Binary output: ./go_serper_mcp_server
This repo includes an npm wrapper so the server can be installed and run via npx.
`bash`
npm run build:npm
This creates platform binaries under native/ and prepares the package for npm pack/publish.
After publishing the package (or using a local tarball), you can run:
`bash`
SERPER_API_KEY=your-key npx go-serper-mcp-server -t stdio
For a local tarball:
`bash`
npm pack
SERPER_API_KEY=your-key npx ./go-serper-mcp-server-*.tgz -t stdio
`json`
{
"mcpServers": {
"serper": {
"command": "/path/to/go_serper_mcp_server",
"args": ["-t", "stdio"],
"env": {
"SERPER_API_KEY": "your-key"
}
}
}
}
- The server mirrors the Serper MCP Python implementation in tmp/serper-mcp-server.https://google.serper.dev/{endpoint}
- All requests are sent as JSON to or https://scrape.serper.dev`.