GoogleSearchMCP
🔗 Quick Links
📊 Project Details
- Primary Language: TypeScript
- Languages Used: TypeScript, Dockerfile
- License: None
- Created: September 20, 2025
- Last Updated: September 20, 2025
📝 About
MCP Google Search Server
An MCP server exposing Google search as tools that MCP clients can call. Optional n8n webhook integration logs each query and result set.
Features
google_search: Programmable Search (JSON API) results (title, link, snippet, metadata)fetch_url: Fetch a URL and return plain text (best-effort extraction)- Optional n8n webhook on each search or fetch
- WebSocket transport (easy to connect from remote clients)
Requirements
- Node.js 20+
- A Google Programmable Search Engine (PSE) cx
- A Google API key with Custom Search JSON API enabled
Quick Start (Docker)
- Copy
env.exampleto.envand fill values: - Start services:
- The MCP WebSocket server listens on
ws://localhost:3333(or your container host).
Environment Variables
GOOGLE_API_KEY– Google API keyGOOGLE_CX– Programmable Search Engine cx idPORT– WebSocket server port (default 3333)N8N_WEBHOOK_URL– optional, e.g.https://n8n.example.com/webhook/xyz(will POST logs)FETCH_MAX_BYTES– max bytes to fetch forfetch_url(default 1048576)
Connect from Claude Desktop (example)
Add to your Claude config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"google-search": {
"command": "node",
"args": ["/app/dist/server.js"],
"transport": {
"type": "websocket",
"url": "ws://localhost:3333"
}
}
}
}
Adjust the path/URL for your setup. If running outside Docker, point to your host.
n8n Integration
Set N8N_WEBHOOK_URL and the server will POST events like:
{
"event": "google_search",
"timestamp": "2025-09-20T12:34:56.789Z",
"query": "site:openai.com mcp",
"params": {"num": 5},
"results": [
{"title": "...", "link": "https://...", "snippet": "...", "source": "google"}
]
}
Development
Production
Security Notes
- Rate-limit with Docker/network policy or place behind a reverse proxy.
- Keep your API key secret. Consider restricting it to your IPs.
- Set a tight
GOOGLE_CXscope to avoid unwanted results.