Implement a local MCP server enabling AI web search and content extraction for LLMs and RAG pipelines
The MCP (Model Context Protocol) Server for RAG Web Browser Actor serves as a dedicated gateway, facilitating interaction between large language models (LLMs), AI agents, and web content. This server runs locally on your machine and enables seamless communication with the RAG Web Browser Actor from Apify. By setting up this server, you can enable LLMs to perform complex web searches, scrape relevant URLs, and process HTML data for further analysis—ultimately boosting their capability to provide detailed and accurate information.
This MCP server leverages the comprehensive capabilities of the Model Context Protocol (MCP) to bridge the gap between AI applications and external tools. Here are some key features that make this server uniquely valuable:
search tool allows querying Google Search, scraping top results, and returning extracted content in clean Markdown format.
query: Required string indicating the search term or URL.maxResults: Optional integer determining the maximum number of search results to process (default: 1).scrapingTool: Optional string for selecting the scraping method ('browser-playwright' or 'raw-http').outputFormats: Optional array specifying the desired output format(s) (text, markdown, html); default is Markdown.requestTimeoutSecs: Optional integer setting a timeout limit for requests (default: 40 seconds).The implementation of this MCP server adheres strictly to the Model Context Protocol (MCP), ensuring compatibility across various AI application frameworks. The protocol flow is designed to initiate a request from an AI client, relay it through the protocol stack, and deliver processed responses back to the originator.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This simple yet effective protocol ensures that data transfers are standardized and secure, facilitating efficient communication between diverse elements in the AI application ecosystem.
To set up and run this MCP server locally on your machine:
Clone Repository:
git clone [email protected]:apify/mcp-server-rag-web-browser.git
Navigate and Install Dependencies:
cd mcp-server-rag-web-browser
npm install
Build the Project:
npm run build
Edit Configuration File (claude_desktop_config.json):
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonAdd MCP Server Entry:
"mcpServers": {
"rag-web-browser": {
"command": "npx",
"args": ["@apify/mcp-server-rag-web-browser"],
"env": {
"APIFY_TOKEN": "your-apify-api-token"
}
}
}
Restart Claude Desktop:
Using the MCP-powered server, you can instruct your AI agent to perform tasks such as searching for information on web pages:
What is an MCP server and how can it be used?
What are recent news updates in the field of LLMs?
Find and analyze recent research papers about LLMs.
For debugging purposes, use the MCP Inspector:
export APIFY_TOKEN=your-apify-api-token
npx @modelcontextprotocol/inspector npx -y @apify/mcp-server-rag-web-browser
Using the configured MCP server, an LLM can efficiently search the internet and gather timely news updates on specific topics. This process could involve querying Google Search to find relevant articles and then analyzing them to provide a summary or detailed report.
Academics and researchers leveraging AI applications can use this MCP server to access vast amounts of scholarly literature. By querying search engines, they can quickly locate pertinent research papers related to their field of study, thereby streamlining the literature review process significantly.
This server supports integration with multiple clients, including:
| MCP Client | Resources | Tools | Prompts | Status |
|---|---|---|---|---|
| Claude Desktop | ✅ | ✅ | ✅ | Full Support |
| Continue | ✅ | ✅ | ✅ | Partial Support |
| Cursor | ❌ | ✅ | ❌ | Tools Only |
The performance of this MCP server is highly dependent on the complexity and volume of queries. Here’s how it fares with different types of queries:
For advanced users, here are some additional configuration options and security measures:
Ensure necessary environment variables like APIFY_TOKEN are set correctly before running the server:
export APIFY_TOKEN=your-apify-api-token
To customize the server further, you can modify arguments in the server’s command line:
Implement security measures such as rate limiting and secure credentials handling to prevent unauthorized access.
Q: What is Model Context Protocol?
Q: How do I ensure compatibility with my MCP client?
Q: Can I use this server without an internet connection?
Q: How do I troubleshoot errors in the response?
Q: Is there a limit to the number of queries per day?
This comprehensive guide ensures 100% originality in English language content. Key technical specifications align closely with the README content while expanding on them significantly to provide a detailed understanding of how this server enhances AI applications through MCP integration.
By leveraging the Model Context Protocol (MCP) Server for RAG Web Browser Actor, developers and researchers can unlock powerful capabilities in their AI applications, enabling more sophisticated interactions between large language models and external web data resources.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration