Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-server-rag-web-browser

MCP.Pizza Chef: apify

The mcp-server-rag-web-browser is an MCP server designed to facilitate real-time web browsing and data extraction for large language models (LLMs) and retrieval-augmented generation (RAG) pipelines. It integrates with the RAG Web Browser Actor, acting as a local server that sends search queries and receives structured web content responses. This server enables AI agents to interact dynamically with live web pages, providing fast, relevant information retrieval similar to web search capabilities in ChatGPT. It supports seamless communication in standby mode with the RAG Web Browser Actor, enhancing AI assistants' ability to access and utilize up-to-date web data efficiently.

Use This MCP server To

Enable LLMs to perform live web searches and data extraction Integrate real-time web content into AI assistant workflows Support RAG pipelines with dynamic web browsing capabilities Provide fast web query responses for AI agents Facilitate local communication with the RAG Web Browser Actor Extract structured information from web pages for analysis

README

Model Context Protocol (MCP) Server for the RAG Web Browser Actor 🌐

Implementation of an MCP server for the RAG Web Browser Actor. This Actor serves as a web browser for large language models (LLMs) and RAG pipelines, similar to a web search in ChatGPT.

mcp-server-rag-web-browser MCP server

🎯 What does this MCP server do?

This server is specifically designed to provide fast responses to AI agents and LLMs, allowing them to interact with the web and extract information from web pages. It runs locally and communicates with the RAG Web Browser Actor in Standby mode, sending search queries and receiving extracted web content in response.

The RAG Web Browser Actor allows an AI assistant to:

  • Perform web search, scrape the top N URLs from the results, and return their cleaned content as Markdown
  • Fetch a single URL and return its content as Markdown

🧱 Components

Tools

  • search: Query Google Search, scrape the top N URLs from the results, and returns their cleaned content as Markdown. Arguments:
    • query (string, required): Search term or URL
    • maxResults (number, optional): Maximum number of search results to scrape (default: 1)
    • scrapingTool (string, optional): Select a scraping tool for extracting web pages. Options: 'browser-playwright' or 'raw-http' (default: 'raw-http')
    • outputFormats (array, optional): Select one or more formats for the output. Options: 'text', 'markdown', 'html' (default: ['markdown'])
    • requestTimeoutSecs (number, optional): Maximum time in seconds for the request (default: 40)

πŸ”„ What is the Model Context Protocol?

The Model Context Protocol (MCP) is a framework that enables AI applications, such as Claude Desktop, to connect seamlessly with external tools and data sources. For more details, visit the Model Context Protocol website or read the blog post What is MCP and why does it matter?.

πŸ€– How does the MCP Server integrate with AI Agents?

The MCP Server empowers AI Agents to perform web searches and browsing using the RAG Web Browser Actor. For a comprehensive understanding of AI Agents, check out our blog post: What are AI Agents? and explore Apify's Agents.

Interested in building and monetizing your own AI agent on Apify? Check out our step-by-step guide for creating, publishing, and monetizing AI agents on the Apify platform.

πŸ”Œ Related MCP servers and clients by Apify

This server operates over standard input/output (stdio), providing a straightforward connection to AI Agents. Apify offers several other MCP-related tools:

Server Options

  • πŸ–₯️ This MCP Server – A local stdio-based server for direct integration with Claude Desktop
  • 🌐 RAG Web Browser Actor via SSE – Access the RAG Web Browser directly via Server-Sent Events without running a local server
  • πŸ‡¦ MCP Server Actor – MCP Server that provides AI agents with access to over 4,000 specialized Apify Actors

Client Options

  • πŸ’¬ Tester MCP Client – A user-friendly UI for interacting with any SSE-based MCP server

πŸ› οΈ Configuration

Prerequisites

  • MacOS or Windows
  • The latest version of Claude Desktop must be installed (or another MCP client)
  • Node.js (v18 or higher)
  • Apify API Token (APIFY_TOKEN)

Install

Follow the steps below to set up and run the server on your local machine: First, clone the repository using the following command:

git clone git@github.com:apify/mcp-server-rag-web-browser.git

Navigate to the project directory and install the required dependencies:

cd mcp-server-rag-web-browser
npm install

Before running the server, you need to build the project:

npm run build

Claude Desktop

Configure Claude Desktop to recognize the MCP server.

  1. Open your Claude Desktop configuration and edit the following file:

    • On macOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
    • On Windows: %APPDATA%/Claude/claude_desktop_config.json
    "mcpServers": {
      "rag-web-browser": {
        "command": "npx",
        "args": [
          "@apify/mcp-server-rag-web-browser"
        ],
        "env": {
           "APIFY_TOKEN": "your-apify-api-token"
        }
      }
    }
    
  2. Restart Claude Desktop

    • Fully quit Claude Desktop (ensure it's not just minimized or closed).
    • Restart Claude Desktop.
    • Look for the πŸ”Œ icon to confirm that the server is connected.
  3. Examples

    You can ask Claude to perform web searches, such as:

    What is an MCP server and how can it be used?
    What is an LLM, and what are the recent news updates?
    Find and analyze recent research papers about LLMs.
    

Debug the server using the MCP Inspector

export APIFY_TOKEN=your-apify-api-token
npx @modelcontextprotocol/inspector npx -y @apify/mcp-server-rag-web-browser

πŸ‘·πŸΌ Development

Local client (stdio)

To test the server locally, you can use example_client_stdio.ts:

export APIFY_TOKEN=your-apify-api-token
node dist/example_client_stdio.js

The script will start the MCP server, fetch available tools, and then call the search tool with a query.

Direct API Call

To test calling the RAG Web Browser Actor directly:

export APIFY_TOKEN=your-apify-api-token
node dist/example_call_web_browser.js

Debugging

Since MCP servers operate over standard input/output (stdio), debugging can be challenging. For the best debugging experience, use the MCP Inspector.

Build the mcp-server-rag-web-browser package:

npm run build

You can launch the MCP Inspector via npm with this command:

export APIFY_TOKEN=your-apify-api-token
npx @modelcontextprotocol/inspector node dist/index.js

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

mcp-server-rag-web-browser FAQ

How does the mcp-server-rag-web-browser communicate with the RAG Web Browser Actor?
It runs locally and communicates in standby mode by sending search queries and receiving extracted web content responses.
Can this MCP server be used with different LLM providers?
Yes, it is designed to work with various LLMs including OpenAI, Anthropic Claude, and Google Gemini by providing web browsing context.
Is the mcp-server-rag-web-browser suitable for real-time web data extraction?
Yes, it is optimized for fast responses to enable real-time interaction with web pages.
Does this server require internet access to function?
Yes, since it performs live web browsing and data extraction, internet access is necessary.
How does this MCP server enhance AI assistant capabilities?
It allows AI assistants to access and extract up-to-date information from the web, improving response relevance and accuracy.
Is the mcp-server-rag-web-browser limited to specific web content types?
No, it can extract structured data from a wide range of web pages as needed by the AI agent.
What is the role of standby mode in this MCP server?
Standby mode enables efficient communication with the RAG Web Browser Actor, allowing asynchronous query handling and response delivery.