Local Web Search MCP server

Integrates with a headless browser to perform Google searches and extract web content, enabling local web search capabilities for up-to-date information retrieval and research tasks.
Back to servers
Setup instructions
Provider
Frad Lee
Release date
Feb 16, 2025
Language
TypeScript
Stats
7 stars

This MCP server enables local web searches directly through the Model Context Protocol. It allows you to search the web, extract content from web pages, and return structured results with titles, URLs, and descriptions - all within your AI interactions.

Installation

To get started with the MCP server for local web searching, you'll need to install the required dependencies:

bun install

Setup

After installing dependencies, run the setup script to configure the MCP server:

bun run setup.ts

This script will automatically add the server to your Claude MCP configuration.

Requirements

Before installation, ensure you have:

  • Bun runtime installed
  • Node.js with TypeScript support

Available Tools

Local Web Search

The primary tool provided by this server is local_web_search, which performs web searches and returns structured results.

Parameters

  • query: Search query to find relevant content (required)
  • excludeDomains: List of domains to exclude from search results (default: [])
  • limit: Maximum number of results to return (default: 5)
  • truncate: Maximum length of content to return per result (default: 4000)
  • show: Show browser window for debugging (default: false)
  • proxy: Proxy server to use for requests (optional)

Usage Examples

Basic Search

To perform a basic web search, use the local_web_search tool with a query parameter:

{
  "query": "climate change latest research"
}

Advanced Search

For more refined searches, use additional parameters:

{
  "query": "electric vehicle market statistics",
  "excludeDomains": ["pinterest.com", "reddit.com"],
  "limit": 3,
  "truncate": 2000
}

Debugging

If you need to debug the search process, enable the browser window:

{
  "query": "quantum computing advances",
  "show": true
}

Using a Proxy

For searches that require accessing region-restricted content:

{
  "query": "local news",
  "proxy": "http://your-proxy-server:port"
}

Features

The MCP server provides several useful features:

  • Customizable search results: Limit the number of results returned
  • Content extraction: Clean extraction of content using Readability
  • Domain filtering: Exclude specific domains from your search results
  • Content truncation: Control the length of returned content
  • Headless browser operation: Improved performance for most searches
  • Structured results: Returns organized data with titles, URLs, and descriptions

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "local-web-search" '{"command":"bun","args":["run","setup.ts"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "local-web-search": {
            "command": "bun",
            "args": [
                "run",
                "setup.ts"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "local-web-search": {
            "command": "bun",
            "args": [
                "run",
                "setup.ts"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later