Open Custom Search API
Perform web searches using Google's Custom Search API.
Open Custom Search API MCP Server
A Model Context Protocol (MCP) server that provides access to Google's Custom Search API.
Features
- google_search: Search the web using Google Custom Search API
- Configurable result limits (1-10 results)
- Environment variable configuration for API credentials
- Comprehensive error handling
Installation
Using npx (Recommended)
# Run directly without installation
npx open-custom-search-api-mcp-server
Local Installation
npm install -g open-custom-search-api-mcp-server
Prerequisites
- Google API Key - Get one from Google Cloud Console
- Custom Search Engine ID - Create one at Google Custom Search
Usage
Running with npx
npx open-custom-search-api-mcp-server
Running locally
# After global installation
open-custom-search-api-mcp-server
Available Tools
google_search
Searches the web using Google Custom Search API.
Parameters:
query(required): The search querylimit(optional): Maximum number of results to return (1-10, default: 10)
Example:
{
"name": "google_search",
"arguments": {
"query": "MCP server development",
"limit": 5
}
}
Response:
{
"query": "MCP server development",
"totalResults": "1000000",
"searchTime": 0.123,
"results": [
{
"title": "Example Result",
"link": "https://example.com",
"snippet": "This is an example search result...",
"displayLink": "example.com"
}
]
}
Configuration
MCP Client Configuration
To use this server with Claude Desktop or other MCP clients, add the following configuration to your MCP client settings (e.g., .mcp.json or Claude Desktop configuration):
{
"mcpServers": {
"custom-search": {
"command": "npx",
"args": ["open-custom-search-api-mcp-server"],
"env": {
"GOOGLE_API_KEY": "your-google-api-key",
"GOOGLE_SEARCH_ENGINE_ID": "your-custom-search-engine-id"
}
}
}
}
For local development or global installation:
{
"mcpServers": {
"custom-search": {
"command": "open-custom-search-api-mcp-server",
"env": {
"GOOGLE_API_KEY": "your-google-api-key",
"GOOGLE_SEARCH_ENGINE_ID": "your-custom-search-engine-id"
}
}
}
}
Environment Variables
The server requires the following environment variables:
GOOGLE_API_KEY: Your Google API key from Google Cloud ConsoleGOOGLE_SEARCH_ENGINE_ID: Your Custom Search Engine ID from Google Custom Search
Architecture
All search operations are performed locally on the MCP server to minimize AI token consumption. The server handles:
- HTTP/HTTPS requests to Google Custom Search API
- JSON response parsing and formatting
- Error handling for API failures
- Environment variable validation
- Input parameter validation
License
MIT
เซิร์ฟเวอร์ที่เกี่ยวข้อง
Library Docs MCP Server
Search and fetch documentation for popular libraries like Langchain, Llama-Index, and OpenAI using the Serper API, providing updated information for LLMs.
Fabric Marketplace
An agent-native marketplace API where any participant ("Node") can publish allocatable resources, search for what they need, negotiate structured offers, and exchange contact details after mutual acceptance.
Langflow Document Q&A Server
A document question-and-answer server powered by Langflow.
bbox-mcp-server
Bounding box coordinate conversion, EPSG projections, H3 indexing, Overpass OSM queries, and shareable map links
Entscheidsuche
Search Swiss legal decisions using the entscheidsuche.ch API.
People Data Labs
Access person, company, school, location, job title, and skill data using the People Data Labs API.
Data Gouv MCP Server
Interact with the French government's open data platform (data.gouv.fr) to search for company information.
Pokemon TCG Card Search MCP
Search and display Pokemon Trading Card Game cards using the Pokemon TCG API.
SerpApi MCP
SerpApi MCP Server for Google and other search engine results
MCP Ripgrep Server
Provides local file search capabilities using the ripgrep (rg) command-line tool.