TypeScript MCP server for web search and scraping using Serper API with powerful tools and features
The Serper Search and Scrape MCP Server is a specialized server built in TypeScript that leverages the Serper API to provide robust web search capabilities to Model Context Protocol (MCP) clients. This server is designed to integrate seamlessly with AI applications such as Claude Desktop, Continue, Cursor, among others, enhancing their functionality by enabling powerful web search and content extraction features.
google_search: Perform sophisticated web searches via the Serper API.
site
, filetype
, inurl
, intitle
, after
, before
, etc., enabling users to perform highly specific queries.scrape: Extract content from web pages effectively.
The Serper Search and Scrape server adheres to the Model Context Protocol (MCP) standards, which ensures compatibility with various AI applications. The protocol flow is meticulously designed to facilitate seamless communication between the client application and the server, ensuring robust performance in real-time operations.
The architecture of the Serper Search and Scrape server is modular, consisting of several key components:
The protocol flow diagram below illustrates this structure:
graph TD
A[AI Application] -->|MCP Client| B[Serper Search & Scrape Server]
B --> C[Web Data Source/Tool]
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
Install Dependencies:
npm install
Build the Server:
npm run build
Development with Auto-Rebuild (optional):
npm run watch
Run Tests:
npm test
npm run test:watch
npm run test:coverage
npm run test:integration
Create a .env
file in the root directory and add your Serper API key:
SERPER_API_KEY=your_api_key_here
Imagine an advanced analytical model that requires access to the latest research papers across multiple domains. The Serper Search and Scrape MCP server can be configured to automatically retrieve relevant papers based on specific keywords, authors, or publication dates. This ensures that the AI model always has access to up-to-date information, enhancing its predictive capabilities.
In scenarios where content extraction is essential—such as summarizing web pages or generating abstracts—the Serper Search and Scrape server can extract plain text along with JSON-LD metadata. This metadata allows the AI application to understand the context of the content more comprehensively, improving summarization accuracy.
MCP Client | Claude Desktop | Continue | Cursor |
---|---|---|---|
Resources | ✅ | ✅ | ❌ |
Tools | ✅ | ✅ | |
Prompts | ✅ | ✅ | |
Status | Full Support | Full Support | Tools Only |
This matrix indicates that the Serper Search and Scrape MCP server is fully compatible with both Claude Desktop and Continue, integrating seamlessly with their resources and tools. For Cursor, it supports tools but not the full range of features.
The Serper Search and Scrape MCP server supports integration into various AI applications that leverage the Model Context Protocol (MCP). Here's a performance matrix illustrating its compatibility with different clients:
Client | Integration Level |
---|---|
Claude Desktop | Fully integrated, supporting all features. |
Continue | Fully integrated, supporting all features. |
Cursor | Integrated for tools only, missing some functionalities. |
Ensure that critical environment variables are set correctly to avoid security risks:
SERPER_API_KEY=your_api_key_here
For deployment:
Build the Docker Image:
docker build -t mcp-server-serper .
Run the Container with Environment Variables:
docker run -e SERPER_API_KEY=your_api_key_here mcp-server-serper
Alternatively, mount your source code as a volume for development:
docker run -v $(pwd):/app --env-file .env mcp-server-serper
The Serper API key enables secure access to the SerpAPI service, allowing the server to perform web searches and content extraction. It must be properly set as an environment variable for authentication.
Yes, the server supports integration with Claude Desktop and Continue via MCP, but some features might differ when using Cursor due to its limited support.
Setting correct environment variables ensures that the server operates smoothly without any API connectivity issues. Incorrect settings can lead to failure in fetching data or security vulnerabilities.
The google_search
tool supports various advanced operators, allowing users to perform complex searches with fine-grained parameters such as location, date ranges, and file types.
Yes, you can configure the scraping tool to extract plain text or markdown content along with additional metadata like JSON-LD, providing flexibility in how data is handled based on different use cases.
Contributions to the Serper Search and Scrape MCP server are welcome. Developers interested in contributing should follow these guidelines:
git checkout -b feature/new-feature
git commit -am "Add new feature or bug fix"
git push origin feature/new-feature
This comprehensive documentation positions the Serper Search and Scrape MCP server as a valuable tool for enhancing AI application capabilities, especially in areas requiring robust web search and content extraction functionalities.
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Build a local personal knowledge base with Markdown files for seamless AI conversations and organized information.
Integrate AI with GitHub using MCP Server for profiles repos and issue creation
Python MCP client for testing servers avoid message limits and customize with API key
Explore MCP servers for weather data and DigitalOcean management with easy setup and API tools