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.
To get started with the MCP server for local web searching, you'll need to install the required dependencies:
bun install
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.
Before installation, ensure you have:
The primary tool provided by this server is local_web_search
, which performs web searches and returns structured results.
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)To perform a basic web search, use the local_web_search
tool with a query parameter:
{
"query": "climate change latest research"
}
For more refined searches, use additional parameters:
{
"query": "electric vehicle market statistics",
"excludeDomains": ["pinterest.com", "reddit.com"],
"limit": 3,
"truncate": 2000
}
If you need to debug the search process, enable the browser window:
{
"query": "quantum computing advances",
"show": true
}
For searches that require accessing region-restricted content:
{
"query": "local news",
"proxy": "http://your-proxy-server:port"
}
The MCP server provides several useful features:
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.
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 > 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"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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