mcp-google-search
v1.0.0
Published
Google Search MCP Server for Claude Desktop App
Readme
Google Search MCP Server for Claude Desktop
This MCP (Machine Communication Protocol) server enables Claude Desktop to perform Google searches using the Google Custom Search API.
Prerequisites
- Google API Key
- Google Custom Search Engine ID (cx)
Setup
Clone this repository
Install dependencies:
npm installConfigure environment variables in your Claude Desktop config file (
claude_desktop_config.json):{ "mcps": { "google-search": { "command": "npx claude-google-search-mcp", "env": { "GOOGLE_API_KEY": "your-google-api-key", "GOOGLE_SEARCH_ENGINE_ID": "your-search-engine-id" } } } }
API Endpoints
POST /search
Performs a Google search.
Request body:
{
"query": "search query string",
"num": 10 // optional, number of results (max 10)
}Response:
{
"results": [
{
"title": "Result title",
"link": "https://result.url",
"snippet": "Result description",
"displayLink": "result.url"
}
],
"totalResults": "1234567"
}GET /health
Health check endpoint.
Response:
{
"status": "healthy"
}Error Handling
The server will return appropriate HTTP status codes:
- 400: Bad Request (missing query)
- 500: Server Error (API errors)
Environment Variables
GOOGLE_API_KEY: Your Google API key for Custom SearchGOOGLE_SEARCH_ENGINE_ID: Your Custom Search Engine IDPORT: Server port (default: 3000)
Development
To run the server locally:
npm startDeployment
Package the application:
npm packInstall globally:
npm install -g claude-google-search-mcp-1.0.0.tgz
License
MIT
