A powerful MCP server to equip LLMs with web access, search, and content extraction capabilities
Project description
MCP Web Tools
This package provides a powerful MCP server to equip LLMs with web access, going beyond naive methods of searching, fetching and extracting content.
Introduction
I created this package out of the frustration that most MCP servers enabling web access to LLMs, didn't perform as well as I hoped. Some of these shortcomings I wanted fix, include:
- Good search results without requiring an API key
- Sophisticated fetching for more complex JavaScript sites
- Extracting content in nicely formatted Markdown
- Support for extracting content from PDFs
- Support for loading and displaying images
- Capture rendered webpage screenshots for visual context
- Usage options for advanced cases like loading raw HTML
Installation
Claude Desktop
</code></pre>
<h3>Claude Code</h3>
<pre lang="bash"><code>claude mcp add web-tools uvx mcp-web-tools
Or to also set the Brave Search API key:
claude mcp add web-tools uvx mcp-web-tools -e BRAVE_SEARCH_API_KEY=<key>
Provide a Perplexity Search API key to prioritize their fresh, citation-rich index:
claude mcp add web-tools uvx mcp-web-tools -e PERPLEXITY_API_KEY=<key>
You can mix both environment variables to fall back from Perplexity to Brave seamlessly.
Internals
The package is written in Python using powerful libraries and services under the hood to improve results.
Searching
We use the Perplexity Search API when a PERPLEXITY_API_KEY is configured. It delivers ranked snippets with citations from Perplexity's continuously refreshed index. If no Perplexity key is available, we fall back to the Brave Search API (via BRAVE_SEARCH_API_KEY), then a lightweight Google workaround, and finally DuckDuckGo. While we recommend adding at least one API key, the chained fallbacks continue working for most workloads.
Fetching
The fetching of web content is based on Zendriver, a fork of nodriver for next level webscraping and performance. It should stay undetected for most anti-bot solutions and fetch content even from complex JS-based sites.
Extracting
For web extraction, we use Trafilatura which consistently outperforms other alternatives for extracting content from HTML pages. For PDFs, we use PyMuPDF4LLM which similarly extracts content in an easy-to-read format for LLMs, with advanced layout support.
Screenshots
Rendered page previews are powered by Zendriver. The view_website tool navigates to a URL in a headless Chromium session and returns the resulting page as a PNG screenshot. By default only the current viewport is captured, but callers can request a full-page image by setting the full_page argument to true.
Contributing
While it's impossible to support all pages and layouts, we thrive to make this package better over time. For unsupported sites, problems, or feature requests open an issue.
CI, Releases, and Publishing
This repo includes a GitHub Actions workflow that:
- Runs tests via
uvon PRs and pushes tomain. - On push to
main, ifproject.versioninpyproject.tomlchanged, it:- Builds distributions with
uv build. - Creates a GitHub Release tagged
v<version>with autogenerated notes. - Publishes the package to PyPI using
uv publish.
- Builds distributions with
- Merge a PR that bumps
project.versioninpyproject.tomlto trigger a release.
Rollback:
- If a release was created erroneously, delete the GitHub Release and tag
v<version>. - Yank the version on PyPI if needed.
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 iflow_mcp_pietz_mcp_web_tools-0.9.1.tar.gz.
File metadata
- Download URL: iflow_mcp_pietz_mcp_web_tools-0.9.1.tar.gz
- Upload date:
- Size: 74.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e57f615f83c136e8e34796f6e3998d4cb408bd951754532fcc43cf37ca504819
|
|
| MD5 |
809fd2bd93a4943ab6389d076a970ca2
|
|
| BLAKE2b-256 |
9849a7f97295980b3b27f0482f54388e4aaeaa8dc7d5b8d06ba8128ee435bd51
|
File details
Details for the file iflow_mcp_pietz_mcp_web_tools-0.9.1-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_pietz_mcp_web_tools-0.9.1-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77d86e9935c1b931b67479976738da982a4984cabe8819c6c4c97f1d4d5d00e
|
|
| MD5 |
44e656a2014c56c2abdc0e85782cd863
|
|
| BLAKE2b-256 |
16953d1c83a4ef86106be16b2ff83109af3dd994fd56425ecfc39feee22eb94d
|