
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@mako10k/mcp-search
Advanced tools
A Model Context Protocol (MCP) server for Google Custom Search and Web Fetch with comprehensive caching capabilities. Supports both STDIO and HTTP transports.
A powerful Google Custom Search and Web Fetch MCP (Model Context Protocol) server that provides search functionality and web fetch capabilities using MCP.
The easiest way to get started with MCP clients is using STDIO mode:
# Set up environment variables first
export GOOGLE_API_KEY="your_google_api_key"
export GOOGLE_CX="your_google_cx_id"
# Run the MCP server (STDIO mode is default)
npx @mako10k/mcp-search
For HTTP-based integration:
# Start in HTTP mode
npx @mako10k/mcp-search --http
# Or with custom port
npx @mako10k/mcp-search --http --port 8080
For STDIO transport (recommended):
{
"command": "npx",
"args": ["@mako10k/mcp-search"],
"type": "stdio"
}
For HTTP transport:
{
"url": "http://localhost:3000/mcp",
"type": "http"
}
For command help:
npx @mako10k/mcp-search --help
The mcp-search
package can be run directly using npx without installation:
npx @mako10k/mcp-search [options]
Transport Options:
--http
: Enable HTTP mode with /mcp endpointConfiguration Options:
--port <number>
: Specify the server port for HTTP mode (default: 3000)--help
: Show help information--version
: Show version informationExamples:
# STDIO mode (default)
npx @mako10k/mcp-search
# HTTP mode
npx @mako10k/mcp-search --http
# HTTP mode with custom port
npx @mako10k/mcp-search --http --port 8080
# One-liner with environment variables
GOOGLE_API_KEY="your_key" GOOGLE_CX="your_cx" npx @mako10k/mcp-search
Note: The server listens on a port only in HTTP mode. In STDIO mode (default), no port is used.
Add to your .vscode/mcp.json
:
{
"servers": {
"mcp-search": {
"command": "npx",
"args": ["@mako10k/mcp-search"],
"type": "stdio",
"env": {
"GOOGLE_API_KEY": "your_google_api_key",
"GOOGLE_CX": "your_google_cx_id"
}
}
}
}
Add to your Claude Desktop config:
{
"mcpServers": {
"mcp-search": {
"command": "npx",
"args": ["@mako10k/mcp-search"],
"env": {
"GOOGLE_API_KEY": "your_google_api_key",
"GOOGLE_CX": "your_google_cx_id"
}
}
}
}
Add to your MCP configuration:
{
"servers": {
"search": {
"command": "npx",
"args": ["@mako10k/mcp-search"],
"type": "stdio"
}
}
}
Set up environment variables:
export GOOGLE_API_KEY="your_google_api_key"
export GOOGLE_CX="your_google_cx_id"
Run the server:
# STDIO mode (default - recommended for MCP clients)
npx @mako10k/mcp-search
# OR HTTP mode (for custom integrations)
npx @mako10k/mcp-search --http
Clone and install dependencies:
git clone https://github.com/mako10k/mcp-search
cd mcp-search
npm install
Set up environment variables by copying the example file:
cp .env.example .env
Then edit .env
with your actual values:
GOOGLE_API_KEY=your_actual_google_api_key
GOOGLE_CX=your_actual_google_cx_id
PORT=3000
MAX_FILE_SIZE=4194304
MAX_TOTAL_CACHE_SIZE=104857600
Build and run:
npm run build
npm start
GOOGLE_API_KEY
: Your Google Custom Search API key (required)
GOOGLE_CX
: Your Google Custom Search Engine ID (required)
PORT
: Server port for HTTP mode only (default: 3000). Not used in STDIO mode.MAX_FILE_SIZE
: Maximum size per fetch request in bytes (default: 4MB = 4194304 bytes)MAX_TOTAL_CACHE_SIZE
: Maximum total cache size in bytes (default: 100MB = 104857600 bytes)Note: These control internal cache limits, separate from model data window sizes.
This package is published to npm as @mako10k/mcp-search
.
Ways to use:
npx @mako10k/mcp-search
npm install -g @mako10k/mcp-search
then run mcp-search
npm install @mako10k/mcp-search
The CLI binary name is mcp-search
. The package includes TypeScript definitions and supports both CommonJS and ES modules.
Use the following command for development:
npm run dev
Execute a Google Custom Search query and cache the results.
Parameters:
query
(string, required): Search querylanguage
(string, optional): Language for search results (ISO 639-1)region
(string, optional): Region for search results (ISO 3166-1 alpha-2)numResults
(number, optional): Number of results (1-10, default: 10)startIndex
(number, optional): Starting index for resultsimageSearch
(boolean, optional): Enable image search modeimageSize
, imageType
, imageColor
(string, optional): Image search filtersResponse:
List cached search queries with filtering and pagination.
Parameters:
keyword
(string, optional): Filter searches by keyword (case-insensitive)page
(number, optional): Page number (default: 1)limit
(number, optional): Results per page (1-100, default: 10)Response:
Retrieve a specific search result by result ID.
Parameters:
resultId
(string, required): Unique identifier for the search resultResponse:
Fetch content with automatic processing and optional search/summary. By default, returns processed text (not raw HTML) based on Content-Type.
Parameters:
url
(string, required): Target URL to fetchmethod
(string, optional): HTTP method (default: GET)headers
(object, optional): Custom HTTP headerstimeout
(number, optional): Request timeout in milliseconds (min: 100, max: 600000, default: 30000)includeResponseHeaders
(boolean, optional): Include response headers in output (default: false)outputSize
(number, optional): Max bytes of processed text to return (replaces windowSize; max 32768; default 4096)process
(boolean, optional): Auto process by Content-Type (HTML→text, JSON pretty, text passthrough; default: true)summarize
(boolean, optional): Include short extractive summary (default: true)summaryMaxSentences
(number, optional): Max sentences in summary (default: 3)summaryMaxChars
(number, optional): Max characters in summary (default: 500)search
(string, optional): Search pattern (string or regex if searchIsRegex=true
)searchIsRegex
(boolean, optional): Interpret search
as regex (default: false)caseSensitive
(boolean, optional): Case-sensitive search (default: false)context
(number, optional): Lines of context around matches (-C; default: 2)before
(number, optional): Lines before match (-B; overrides context
)after
(number, optional): Lines after match (-A; overrides context
)maxMatches
(number, optional): Max number of matches (default: 20)includeRawPreview
(boolean, optional): Include raw data preview (default: false)rawPreviewSize
(number, optional): Raw preview size in bytes (default: 1024)Response:
requestId
(string): Unique identifier for this fetch requeststatus
(number): HTTP status codestatusText
(string): HTTP status messagecontentType
(string, optional): Response Content-TypecontentSize
(number, optional): Total content size if knownactualSize
(number): Actual size of fetched data (raw)processed
(boolean): Whether processing was appliedtextSize
(number, optional): Size of processed textdata
(string): Processed text (up to outputSize
)summary
(string, optional): Extractive summarymatches
(array, optional): Grep-like matches with contextrawPreview
(string, optional): Raw data preview when requestedisComplete
(boolean): Whether data
contains the full processed textresponseHeaders
(object, optional): Response headers if requestederror
(string, optional): Error message for errors (network/timeout/HTTP>=400)errorCode
(string, optional): Platform error code (e.g., ENOTFOUND, ECONNREFUSED, ETIMEDOUT)Notes:
statusText
includes (warning: host mismatch)
.Caching Behavior:
List cached fetch requests with their status and progress information.
Parameters:
requestId
(string, optional): Filter by specific request IDpage
(number, optional): Page number (default: 1)limit
(number, optional): Results per page (1-100, default: 10)Response:
requestId
(string): Unique request identifierurl
(string): Original request URLmethod
(string): HTTP method usedstatus
(string): Cache status ("Completed" or "InProgress")httpStatus
(number): HTTP response status codeexpectedSize
(number): Expected content size from headersfetchedSize
(number): Actually fetched data sizetimestamp
(string): Request timestampexpiresAt
(string): Cache expiry timestampRetrieve cached fetch data in two modes: processed text view or raw byte chunks.
Parameters:
requestId
(string, required): Request ID to retrievemode
(string, optional): "text"
(default) or "rawChunk"
mode="rawChunk"
:
includeHeaders
(boolean, optional): Include response headers (default: false)startPosition
(number, optional): Starting byte position (default: 0)size
(number, optional): Number of bytes to retrieve (max: 1MB, default: 4096)mode="text"
(mirrors fetch processing options):
outputSize
, process
, summarize
, summaryMaxSentences
, summaryMaxChars
,
search
, searchIsRegex
, caseSensitive
, context
, before
, after
, maxMatches
Response (mode=text): Same shape as fetch
response (processed text, summary, matches, etc.)
Response (mode=rawChunk):
requestId
, url
, httpStatus
, contentSize
, startPosition
, dataSize
, data
, hasMore
, responseHeaders
, metadata
Notes:
Breaking changes:
fetch.data
is now processed text by default (previously raw slice)windowSize
is replaced with outputSize
FAQs
A Model Context Protocol (MCP) server for Google Custom Search and Web Fetch with comprehensive caching capabilities. Supports both STDIO and HTTP transports.
We found that @mako10k/mcp-search demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.