Server del Protocollo di Contesto del Modello (mcp) per l'Attore del Browser Web Rag 🌐
Panoramica
Cos'è il Server MCP per il Browser Web RAG?
Il Server MCP per il Browser Web RAG è uno strumento potente progettato per migliorare la funzionalità delle attività di web scraping e automazione. Funziona come un server backend che facilita l'operazione dell'Attore del Browser Web RAG (Retrieval-Augmented Generation), consentendo agli utenti di raccogliere e elaborare dati web in modo efficiente. Questo server è particolarmente utile per sviluppatori e scienziati dei dati che necessitano di una soluzione robusta per l'estrazione e la manipolazione dei dati web.
Caratteristiche del Server MCP per il Browser Web RAG
- Integrazione senza soluzione di continuità: Il Server MCP si integra senza sforzo con il Browser Web RAG, consentendo un'operazione fluida e il recupero dei dati.
- Scalabilità: Progettato per gestire più richieste simultaneamente, il server può scalare in base alle esigenze degli utenti, rendendolo adatto sia per progetti piccoli che grandi.
- Interfaccia user-friendly: Il server fornisce un'interfaccia intuitiva che semplifica la configurazione e la gestione delle attività di web scraping.
- Prestazioni robuste: Con algoritmi ottimizzati, il Server MCP garantisce un'elaborazione dei dati veloce e affidabile, riducendo al minimo i tempi di inattività e massimizzando l'efficienza.
- Supporto per vari formati di dati: Il server può gestire diversi formati di dati, rendendolo versatile per varie applicazioni nell'analisi e reporting dei dati.
Come utilizzare il Server MCP per il Browser Web RAG
- Installazione: Inizia installando il Server MCP sul tuo computer locale o server. Segui le istruzioni di installazione fornite nella documentazione.
- Configurazione: Configura le impostazioni del server per adattarle ai requisiti del tuo progetto. Questo include la configurazione delle chiavi API, dei formati di dati e di altre preferenze.
- Integrazione: Collega il Server MCP con l'Attore del Browser Web RAG. Questo passaggio è cruciale per abilitare le capacità di recupero e elaborazione dei dati.
- Esecuzione: Avvia il server ed esegui le tue attività di web scraping. Monitora le prestazioni e regola le impostazioni secondo necessità per ottimizzare i risultati.
- Gestione dei dati: Una volta raccolti i dati, utilizza gli strumenti del server per gestire, analizzare ed esportare i dati nel formato desiderato.
Domande Frequenti
D: Qual è l'uso principale del Server MCP per il Browser Web RAG?
R: Il Server MCP è principalmente utilizzato per attività di web scraping e automazione, consentendo agli utenti di raccogliere ed elaborare dati in modo efficiente da vari siti web.
D: Il Server MCP è adatto per progetti su larga scala?
R: Sì, il Server MCP è progettato per essere scalabile, rendendolo adatto sia per progetti piccoli che su larga scala.
D: Posso personalizzare le impostazioni del server?
R: Assolutamente! Il Server MCP consente un'ampia personalizzazione delle impostazioni per soddisfare le esigenze specifiche del progetto.
D: Quali tipi di formati di dati supporta il server?
R: Il Server MCP supporta vari formati di dati, tra cui JSON, CSV e XML, rendendolo versatile per diverse applicazioni.
D: Dove posso trovare ulteriori informazioni sul Server MCP?
R: Per ulteriori informazioni dettagliate, puoi visitare la documentazione ufficiale di Apify o il repository GitHub per il Server MCP.
Dettaglio
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.
<a href="https://glama.ai/mcp/servers/sr8xzdi3yv"><img width="380" height="200" src="https://glama.ai/mcp/servers/sr8xzdi3yv/badge" alt="mcp-server-rag-web-browser MCP server" /></a>
🎯 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 URLmaxResults
(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.
-
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" } } }
- On macOS:
-
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.
-
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.
Configurazione Server
{
"mcpServers": {
"mcp-server-rag-web-browser": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--apify--mcp-server-rag-web-browser--mcp-server-rag-web-browser",
"npm run start"
],
"env": {
"APIFY_TOKEN": "apify-token"
}
}
}
}