This MCP server acts as a bridge between AI models and the web, enabling them to search for information and extract content from websites. It integrates with the RAG Web Browser Actor on Apify to provide AI assistants with web browsing capabilities similar to ChatGPT's web search feature.
Before installing the MCP server, ensure you have:
git clone [email protected]:apify/mcp-server-rag-web-browser.git
cd mcp-server-rag-web-browser
npm install
npm run build
Edit your Claude Desktop configuration file:
~/Library/Application\ Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration to the file:
"mcpServers": {
"rag-web-browser": {
"command": "npx",
"args": [
"@apify/mcp-server-rag-web-browser"
],
"env": {
"APIFY_TOKEN": "your-apify-api-token"
}
}
}
You can ask Claude to perform web searches with prompts like:
The MCP server provides the following tool:
query
(string, required): Search term or URLmaxResults
(number, optional): Maximum search results to scrape (default: 1)scrapingTool
(string, optional): Tool for extracting web pages ('browser-playwright' or 'raw-http', default: 'raw-http')outputFormats
(array, optional): Output formats ('text', 'markdown', 'html', default: ['markdown'])requestTimeoutSecs
(number, optional): Maximum request time in seconds (default: 40)You can 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
To test the server locally without Claude:
export APIFY_TOKEN=your-apify-api-token
node dist/example_client_stdio.js
This script starts the MCP server, fetches available tools, and calls the search
tool with a query.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.