what is mcp-server-local-web-search?
The mcp-server-local-web-search is a server designed to perform local web searches using the Model Context Protocol, allowing users to search and extract content from web pages efficiently.
how to use mcp-server-local-web-search?
To use the server, install the necessary dependencies with bun install
, then run the setup script with bun run setup.ts
to configure the server. You can perform searches using the local_web_search
tool by providing a search query and an optional limit on the number of results.
key features of mcp-server-local-web-search?
- Customizable result limits for web searches
- Content extraction and processing from web pages
- Structured results including titles, URLs, and descriptions
- Support for content truncation and domain filtering
- Clean content extraction using Readability
use cases of mcp-server-local-web-search?
- Searching for specific information on the web and extracting relevant content.
- Filtering search results based on domains to focus on specific sources.
- Integrating with other applications to provide web search capabilities.
FAQ from mcp-server-local-web-search?
- What is the Model Context Protocol?
The Model Context Protocol is a framework that allows for structured communication between different components in a system, facilitating tasks like web searches.
- Is there a limit to the number of search results?
Yes, you can set a limit on the number of results returned by the search query.
- What technologies does this project use?
The project uses Bun as the JavaScript runtime, TypeScript for type safety, and various libraries for web search and content extraction.
mcp-server-local-web-search
An MCP server for performing local web searches. This server provides tools to search and extract content from web pages through the Model Context Protocol.
Features
- Perform web searches with customizable result limits
- Extract and process content from web pages
- Return structured results with titles, URLs, and descriptions
- Support for content truncation and domain filtering
- Clean content extraction using Readability
- Headless browser operation for improved performance
Installation
To install dependencies:
bun install
Setup
Run the setup script to configure the MCP server:
bun run setup.ts
This will add the server to your Claude MCP configuration.
Available Tools
local_web_search
- Performs web search and returns results with title, URL and description
- 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)
Requirements
- Bun runtime
- Node.js TypeScript support
Development
This project uses:
- Bun as the JavaScript runtime
- TypeScript for type safety
- Model Context Protocol SDK for server implementation
- @egoist/local-web-search for web search (using playwright-core)
- Readability for content extraction
Contributors
- egoist - Original local web search author
- FradSer - Original author
- TheSethRose - Playwright integration and performance improvements
License
MIT License
This project was created using bun init
in bun v1.2.2. Bun is a fast all-in-one JavaScript runtime.