MCP server providing web search (DuckDuckGo), HTTP fetch, browser fetch (Playwright), and file download.
Project description
www-search-mcp
MCP (Model Context Protocol) server providing web search, HTTP fetch, browser-based fetch (Playwright), file download, and package search (PyPI, GitHub).
Gives AI assistants (Qoder, Claude Desktop, Cursor, etc.) the ability to search the web, read web pages, download files, and discover Python packages — all through a single MCP server with 7 tools.
System Requirements
| Requirement | Version |
|---|---|
| uv | Install guide |
| Python | 3.10+ (managed automatically by uv) |
| Playwright | Chromium browser (installed via post-install script) |
Install uv
macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS (Homebrew):
brew install uv
Installation
Option 1: Run directly with uvx (recommended)
No clone needed. Runs from PyPI:
uvx www-search-mcp
MCP client config:
{
"mcpServers": {
"www-search-mcp": {
"command": "uvx",
"args": ["www-search-mcp"]
}
}
}
Option 2: Install as a uv tool
# From PyPI
uv tool install www-search-mcp
# After installation, the command is available globally:
www-search-mcp
To reinstall after code changes:
uv tool install --force www-search-mcp
MCP client config (global tool):
{
"mcpServers": {
"www-search-mcp": {
"command": "www-search-mcp"
}
}
}
Option 3: Run from local source (for development)
git clone https://github.com/naifs/www-search-mcp.git
cd www-search-mcp
uv sync
uv run www-search-mcp
MCP client config (local source):
{
"mcpServers": {
"www-search-mcp": {
"command": "uv",
"args": [
"run",
"--project",
"/absolute/path/to/www-search-mcp",
"www-search-mcp"
]
}
}
}
Option 4: Install from built wheel
cd /path/to/www-search-mcp
uv build
uv tool install dist/*.whl
Note: After any installation method, Playwright Chromium is installed automatically via the post-install script. If it fails, run manually:
uv run python -m playwright install chromium
Environment Variables
| Variable | Description | Default |
|---|---|---|
WEB_TIMEOUT |
HTTP request timeout in seconds | 30 |
WEB_MAX_RESULTS |
Default max search results per query (1..10) | 5 |
WEB_MAX_FETCH_CHARS |
Max characters returned in fetch body | 200000 |
WEB_RETRIES |
Retry attempts on timeout/rate-limit (0..5) | 2 |
WEB_MIN_INTERVAL |
Minimum seconds between outbound requests (throttle) | 1.0 |
WEB_MAX_DOWNLOAD_BYTES |
Max bytes per downloaded file | 50000000 |
WEB_DEBUG |
Enable debug logging (1/true/yes/on) |
false |
WEB_SESSION_ENABLED |
Enable persistent cookies/session by default | false |
WEB_PROXY |
HTTP proxy URL (e.g. http://proxy:8080) |
— |
WEB_USER_AGENT |
Custom User-Agent string for HTTP requests | Chrome 135 UA |
Provided Tools
Search Tools
-
web_search- Input:
query: strmax_results: int = 5(1..10)
- Output:
status,query,result_countresults[]withtitle,url,snippet
- Note: safe search is always disabled
- Input:
-
web_search_images- Input:
query: strmax_results: int = 5(1..10)
- Output:
status,query,result_countresults[]withtitle,image,url,thumbnail,height,width,source
- Note: safe search is always disabled
- Input:
-
web_search_github- Input:
query: strmax_results: int = 5(1..10)
- Output:
status,query,result_countresults[]withtitle,url,description,stars,forks,language
- Note: uses GitHub REST API (no token needed, but rate-limited to ~10 req/min)
- Input:
-
web_search_pypi- Input:
query: strmax_results: int = 5(1..10)
- Output:
status,query,result_countresults[]withname,version,summary,author,license,requires_python,url,repository,py_versions,dependencies
- Note: uses DuckDuckGo discovery + PyPI JSON API for enriched metadata
- Input:
Fetch & Download Tools
-
web_fetch- Input:
url: str(http/httpsonly)fetch_div: str = ""— optional CSS selector (e.g.article,.post-body)save_file: str = ""— optional absolute file path with extensionuse_session: bool = False— reuse cookies from previous requests
- Output:
status,http_status,url,truncated,title?,content_type?,body(orsaved_to/bytes_writtenwhensave_fileis used)
- Input:
-
web_fetch_browser- Input:
url: str(http/httpsonly)fetch_div: str = ""— optional CSS selectorsave_file: str = ""— optional absolute file path with extensionheadless: bool = True— show browser window or run hiddenwait_seconds: int = 0— extra wait after page loaduse_session: bool = False— reuse browser cookies/context
- Output: same as
web_fetchplustitle - Use for JS-heavy pages or sites that block plain HTTP clients
- Input:
-
web_download- Input:
url: str(http/httpsonly)save_file: str— required absolute file path with extensionuse_session: bool = False— reuse cookies from previous requests
- Output:
status,url,saved_to,bytes,content_type
- Input:
Quick Verification
# Search the web
uv run python -c "from www_search_mcp.server import web_search; r=web_search('python mcp protocol', max_results=3); print(r['status'], r['result_count'])"
# Fetch a page
uv run python -c "import asyncio; from www_search_mcp.server import web_fetch; r=asyncio.run(web_fetch('https://example.com')); print(r['status'], r['http_status'])"
# Search GitHub
uv run python -c "from www_search_mcp.server import web_search_github; r=web_search_github('fastapi', max_results=3); print(r['status'], r['result_count'])"
# Search PyPI
uv run python -c "from www_search_mcp.server import web_search_pypi; r=web_search_pypi('httpx', max_results=3); print(r['status'], r['result_count'])"
Troubleshooting
uv not found
Install uv and reopen your terminal. See System Requirements.
Dependencies missing
uv sync
Playwright browser not found
uv run python -m playwright install chromium
GitHub API rate limit exceeded
The GitHub API allows ~10 requests/minute without authentication. To increase the limit, set a GitHub token:
export WEB_GITHUB_TOKEN=ghp_your_token_here
Binary content error in web_fetch
web_fetch rejects binary content (images, PDFs, etc.). Use web_download instead to save binary files to disk.
MCP tools not appearing in client
- Check that the MCP client config JSON is valid.
- Ensure the
--projectpath is absolute and correct. - Reload the MCP client after config changes.
- Check
WEB_DEBUG=truefor detailed logs.
Wrong project path in config
The --project argument must point to the root directory of www-search-mcp (where pyproject.toml is located), not to the src/ subdirectory.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file www_search_mcp-1.0.1.tar.gz.
File metadata
- Download URL: www_search_mcp-1.0.1.tar.gz
- Upload date:
- Size: 98.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c88e528891805245e2abd8660ce96c4ae374a98eef6ec87ae4637a0392fc487
|
|
| MD5 |
fcd6338aeaceac10069a17640ff01be1
|
|
| BLAKE2b-256 |
4bcb003fe55280f3404c6cefc404ad996dd76ac1a53a4c2d7e3757acfeec9bfe
|
Provenance
The following attestation bundles were made for www_search_mcp-1.0.1.tar.gz:
Publisher:
ci-cd.yml on Naifs/www-search-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
www_search_mcp-1.0.1.tar.gz -
Subject digest:
2c88e528891805245e2abd8660ce96c4ae374a98eef6ec87ae4637a0392fc487 - Sigstore transparency entry: 1417806251
- Sigstore integration time:
-
Permalink:
Naifs/www-search-mcp@4f6729cc699605076307c70f83344d5d2ab9fc91 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Naifs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@4f6729cc699605076307c70f83344d5d2ab9fc91 -
Trigger Event:
push
-
Statement type:
File details
Details for the file www_search_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: www_search_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6f0817bddea2d5a15f393482cc85a42a741f77705a2ca4ab319b7478413bbd
|
|
| MD5 |
80cf7dc55c7954a66639c85dd36bd659
|
|
| BLAKE2b-256 |
365ca93b8fb0cb9b87605892d87d478fd85efe4d39a6a69a4012bf8e97ed1a88
|
Provenance
The following attestation bundles were made for www_search_mcp-1.0.1-py3-none-any.whl:
Publisher:
ci-cd.yml on Naifs/www-search-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
www_search_mcp-1.0.1-py3-none-any.whl -
Subject digest:
5b6f0817bddea2d5a15f393482cc85a42a741f77705a2ca4ab319b7478413bbd - Sigstore transparency entry: 1417806255
- Sigstore integration time:
-
Permalink:
Naifs/www-search-mcp@4f6729cc699605076307c70f83344d5d2ab9fc91 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Naifs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@4f6729cc699605076307c70f83344d5d2ab9fc91 -
Trigger Event:
push
-
Statement type: