websearch
MCP server for agent web search
claude mcp add --transport stdio howe829-websearch-mcp-server python server.py \ --env CC="us" \ --env HOST="127.0.0.1" \ --env PORT="8002" \ --env LANGUAGE="en" \ --env IMPERSONATE="edge" \ --env SERVER_MODE="streamable-http" \ --env BING_SEARCH_BASE_URL="https://www.bing.com"
How to use
WebSearch MCP Server provides a multi-tool web search framework with built-in capabilities to perform web searches across multiple providers, convert web pages to Markdown, retrieve content from WeChat official account articles, and perform GitHub searches. Once running, you can leverage these features via the server's endpoints (documented in the project documentation). The server supports providers like Bing, Baidu, and Google (when browser_use is enabled), and includes a Markdown converter that turns URL content into Markdown format. It also includes a WeChat account article retriever and a convenient GitHub search interface for repositories, users, issues, and more. To operate, start the server with the recommended Python/uv workflow: you can run the server with uv or directly with Python after activating the virtual environment. After startup, configure your environment (.env) to tailor the search behavior (e.g., language, region, and host/port).
How to install
Prerequisites: - Python 3.12 or higher - uv for dependency management (or pip) Step-by-step: 1. Clone the repository:
git clone https://github.com/Howe829/websearch-mcp-server.git
cd websearch-mcp-server
``` 2. Set up dependencies (recommended via uv):
```bash
uv venv && uv sync
Or install via pip from requirements.txt:
pip install -r requirements.txt
``` 3. Create and configure environment:
```bash
cp .env.example .env
Edit .env to set BING_SEARCH_BASE_URL, LANGUAGE, CC, IMPERSONATE, HOST, PORT, SERVER_MODE as needed. 4. Run the server:
uv run python server.py
or simply:
source .venv/bin/activate
python server.py
Additional notes
Tips and notes: - The server relies on a .env file for configuration. Copy .env.example to .env and customize values like BING_SEARCH_BASE_URL, LANGUAGE, CC, IMPERSONATE, HOST, PORT, and SERVER_MODE. - If you prefer pip, you can install dependencies with pip install -r requirements.txt but uv is the recommended workflow in this project. - When testing, you can run tests with pytest via uv: uv pip install pytest followed by uv run pytest. - Code style can be checked with Ruff: uv pip install ruff and ruff format .. - For debugging MCP integration, you can use the MCP inspector: uv run fastmcp dev server.py. - Ensure your environment provides network access to external search providers and that any API keys or access tokens required by providers are configured in the .env file if needed.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP