serper-search
Enables web searching using the Serper API for Google search results, returning structured results with titles, URLs, descriptions, and optionally fetches web page content.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@serper-searchsearch for MCP protocol details"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Serper Search MCP Server
A Model Context Protocol (MCP) server that enables web searching using the Serper API for Google search results.
Features
Search the web using Serper API for Google search results
Requires Serper API key for authentication
Returns structured results with titles, URLs, and descriptions
Fetches and includes actual web page content for each result
Configurable number of results per search
Supports streamable-http transport for LibreChat integration
Docker containerization support
Health checks and monitoring
Built-in rate limiting to respect API limits
Related MCP server: Serper MCP Server
Installation
Clone or download this repository
Install dependencies:
npm installBuild the server:
npm run buildUsage Modes
Local Development (Stdio Mode)
For local development and direct MCP client integration:
npm startAdd the server to your MCP configuration:
For VSCode (Claude Dev Extension):
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/web-search/build/index.js"]
}
}
}For Claude Desktop:
{
"mcpServers": {
"web-search": {
"command": "node",
"args": ["/path/to/web-search/build/index.js"]
}
}
}HTTP Mode (Container-Ready)
For containerized deployments or LibreChat integration:
# Start in HTTP mode
npm run start:http
# or
node build/index.js --http
# or set environment variable
MCP_HTTP_MODE=true npm startThe server will expose:
MCP endpoint:
http://localhost:3000/mcp(for JSON-RPC 2.0 requests)Health endpoint:
http://localhost:3000/healthHealth check:
http://localhost:3000/health
Docker Deployment
Using Docker directly:
# Build the image
npm run docker:build
# Run the container
npm run docker:runOr manually:
docker build -t web-search-mcp .
docker run -p 3000:3000 -e MCP_HTTP_MODE=true web-search-mcpUsing Docker Compose:
# Start the service
npm run docker:up
# View logs
npm run docker:logs
# Stop the service
npm run docker:downContainer Configuration
Environment variables:
MCP_HTTP_MODE: Set totrueto enable HTTP/SSE modePORT: Port number (default: 3000)SEARCH_RATE_LIMIT_MS: Minimum milliseconds between search requests (default: 500)
The container includes:
Health checks
Non-root user execution
CORS support
Automatic restart policies
Rate Limiting
The server includes built-in rate limiting to be respectful to Google's servers:
Default: Minimum 500ms between search requests
Configurable: Set
SEARCH_RATE_LIMIT_MSenvironment variableAutomatic: If requests come in faster than the limit, the server will automatically wait
Logging: Rate limiting events are logged to stderr
Example with custom rate limit:
# Set 1 second minimum between searches
SEARCH_RATE_LIMIT_MS=1000 npm run start:httpAPI Reference
Tool: search
Parameters:
{
"query": string, // The search query
"limit": number, // Optional: Number of results to return (default: 5, max: 10)
"maxContentLength": number // Optional: Max length of content to extract (default: 50000)
}Tool: fetch_page_content
Parameters:
{
"url": string, // The URL of the web page to fetch
"maxContentLength": number // Optional: Max length of content to extract (default: 50000)
}HTTP/SSE API
Health Check
GET /healthReturns:
{
"status": "ok",
"service": "web-search-mcp"
}SSE Connection
GET /sseEstablishes Server-Sent Events connection for real-time communication.
Message Endpoint
POST /message
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": "unique-id",
"method": "tools/call",
"params": {
"name": "search",
"arguments": {
"query": "your search query",
"limit": 5
}
}
}Testing
A test client is included (test-client.html) for testing the HTTP/SSE endpoint. Open it in a browser and ensure the server is running in HTTP mode.
Example Usage
MCP Client (stdio mode):
use_mcp_tool({
server_name: "web-search",
tool_name: "search",
arguments: {
query: "your search query",
limit: 3
}
})HTTP API (container mode):
const response = await fetch('http://localhost:3000/message', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: "2.0",
id: "1",
method: "tools/call",
params: {
name: "search",
arguments: { query: "Model Context Protocol", limit: 5 }
}
})
});Example response:
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"content": [
{
"type": "text",
"text": "[{\"title\":\"Example Result\",\"url\":\"https://example.com\",\"description\":\"Description...\"}]"
}
]
}
}Fetch Page Content Tool
HTTP API Example
{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "fetch_page_content",
"arguments": {
"url": "https://en.wikipedia.org/wiki/Model_Context_Protocol",
"maxContentLength": 10000
}
}
}Example Response
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"content": [
{
"type": "text",
"text": "[Cleaned web page content here...]"
}
]
}
}Limitations
Since this tool uses web scraping of Google search results, there are some important limitations to be aware of:
Rate Limiting: Google may temporarily block requests if too many searches are performed in a short time. To avoid this:
Keep searches to a reasonable frequency
Use the limit parameter judiciously
Consider implementing delays between searches if needed
Result Accuracy:
The tool relies on Google's HTML structure, which may change
Some results might be missing descriptions or other metadata
Complex search operators may not work as expected
Legal Considerations:
This tool is intended for personal use
Respect Google's terms of service
Consider implementing appropriate rate limiting for your use case
Contributing
Feel free to submit issues and enhancement requests!
License
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
2 toolsfetch_page_contentC
Fetch and clean the main content of a web page, with a configurable content length limit
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the web page to fetch | |
| maxContentLength | No | Maximum length of content to extract (default: 50000 characters) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'cleaning' and a configurable length limit, but does not disclose return format, error handling, redirects, authentication requirements, or what happens with non-HTML content. This is insufficient for a fetch tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that immediately conveys the core action and configurable option. It is front-loaded, contains no redundant words, and every element is relevant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description should clarify what the returned content looks like, how the max length is applied, and behavior on failures. The description is too minimal to be complete for a fetch operation, leaving significant gaps for an agent to act reliably.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters, so the schema fully documents 'url' and 'maxContentLength'. The description's mention of a 'configurable content length limit' aligns with maxContentLength but adds little beyond what the schema already conveys, warranting the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches and cleans the main content of a web page, with a specific verb and resource. It implicitly distinguishes from the sibling 'search' tool by focusing on page content extraction rather than search, though it does not explicitly name the alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the sibling 'search' tool. There is no mention of scenarios, prerequisites, or exclusions, leaving the agent to infer usage from the generic purpose statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchA
Search the web using Serper API and fetch full content from each result page
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 5) | |
| query | Yes | Search query | |
| maxContentLength | No | Maximum length of content to extract from each page (default: 50000 characters) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the main behavior (search + fetch full content) but omits details about external service rate limits, potential failures, or whether the operation is read-only. The mention of 'full content' gives some context beyond a basic search.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that clearly states the core function without unnecessary detail. It is front-loaded and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the high-level behavior but lacks details about the return structure since there is no output schema. Given the simplicity of the tool, it is adequate but does not describe result format or error handling, leaving some gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the description does not add any extra parameter meaning. The baseline of 3 applies because the schema already fully explains query, limit, and maxContentLength.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches the web via Serper API and fetches full content from each result, which distinguishes it from the sibling tool 'fetch_page_content' that presumably only fetches content from a given URL. The verb 'search' and resource 'web' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for searching and retrieving content but does not explicitly state when to prefer this tool over alternatives like 'fetch_page_content'. No exclusion criteria or when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
fetch_page_content - First observed
search
TDQS
Scored across 2 tools
The two tools are distinct in primary purpose: search is for query-based discovery, fetch_page_content is for retrieving a specific URL. However, the search tool also fetches content from result pages, creating slight overlap that could cause confusion, but descriptions help clarify.
Both tool names use an imperative verb style, but 'search' is a single verb while 'fetch_page_content' is a compound verb_noun. This is a minor inconsistency, yet the names remain clear and predictable.
With only two tools, the server feels thin for a search-focused MCP. They cover the core steps of search and content retrieval, but the count is at the borderline where the toolset could be perceived as minimal.
The domain of web search and content fetching is adequately covered: search discovers pages and fetches their content, while fetch_page_content handles arbitrary URLs. Missing features like search customization or pagination are minor and do not create dead ends.
Maintenance
Related MCP Connectors
Serper MCP — wraps the Serper Google Search API (serper.dev)
MCP server for Google search results via SERP API
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLMs to perform web searches using Google's Custom Search API through a standardized interface.147MIT
- FlicenseCqualityBmaintenanceA Model Context Protocol server that enables LLMs to perform Google searches via the Serper API, allowing models to retrieve current information from the web.1338-
- FlicenseAqualityCmaintenanceA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.262-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.2MIT