Oxylabs MCP server
Project description
MCP Server for Oxylabs Scraper
The scraper tool is an asynchronous utility that leverages the Oxylabs Web Scraper API to fetch and process content from a given URL. This tool is designed to handle various scraping scenarios efficiently, with flexible options for parsing and rendering web pages.
Key Features
-
URL Scraping
- Fetches the content of a specified URL using Oxylabs' API.
-
HTML Parsing
- If parsing is enabled, the content is returned in a processed format, suitable for handling by downstream systems like language models (LLMs).
- If parsing is disabled, the tool strips unnecessary HTML tags and converts the cleaned content into a Markdown file for easier readability and compatibility.
-
JavaScript Rendering
- Offers an option to render pages using a headless browser, which ensures dynamic content (e.g., JavaScript-rendered pages) is included in the output.
- Supports the html rendering option or skipping rendering entirely.
Examples on how to query Claude or other LLM
- Could you scrape https://oxylabs.io page?
- Scrape https://www.amazon.de/-/en/Smartphone-Contract-Function-Manufacturer-Exclusive/dp/B0CNKD651V with parse enabled.
- Scrape https://www.amazon.de/-/en/gp/bestsellers/beauty/ref=zg_bs_nav_beauty_0 with parse and render enabled.
- Use web unblocker with render to scrape https://oxylabs.io/
Prerequisites
Install uv first.
https://docs.astral.sh/uv/getting-started/installation/#installation-methods
Setup Intructions
Installing via Smithery
To install Oxylabs MCP server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @oxylabs/oxylabs-mcp --client claude
Setup with Claude Desktop
# claude_desktop_config.json
# Can find location through:
# Claude -> Settings -> Developer -> Edit Config
{
"mcpServers": {
"oxylabs_scraper": {
"command": "uvx",
"args": ["oxylabs-mcp"],
"env": {
"OXYLABS_USERNAME": "YOUR_USERNAME_HERE",
"OXYLABS_PASSWORD": "YOUR_PASSWORD_HERE",
}
}
}
}
Local/Dev Setup Instructions
Clone repo
git clone <git:url>
Install dependencies
Install MCP server dependencies:
cd mcp-server-oxylabs
# Create virtual environment and activate it
uv venv
source .venv/bin/activate # MacOS/Linux
# OR
.venv/Scripts/activate # Windows
# Install dependencies
uv sync
Setup with Claude Desktop
# claude_desktop_config.json
# Can find location through:
# Claude -> Settings -> Developer -> Edit Config
{
"mcpServers": {
"oxylabs_scraper": {
"command": "uv",
"args": [
"--directory",
"/<Absolute-path-to-folder>/oxylabs-mcp",
"run",
"oxylabs-mcp"
],
"env": {
"OXYLABS_USERNAME": "YOUR_USERNAME_HERE",
"OXYLABS_PASSWORD": "YOUR_PASSWORD_HERE"
}
}
}
}
Debugging
Run:
make run
Then access MCP Inspector at http://localhost:5173
. You may need to add your username and password in the environment variables in the inspector under OXYLABS_USERNAME
and OXYLABS_PASSWORD
.
NOTE
Usage with the MCP inspector is affected by an ongoing issue with the Python SDK for MCP, see: https://github.com/modelcontextprotocol/python-sdk/pull/85. For Claude, a forked version of the SDK is used as a temporary fix.
License
This project is licensed under the MIT License.
About Oxylabs
Established in 2015, Oxylabs are a market-leading web intelligence collection platform, driven by the highest business, ethics, and compliance standards, enabling companies worldwide to unlock data-driven insights.
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
File details
Details for the file oxylabs_mcp-0.1.0.tar.gz
.
File metadata
- Download URL: oxylabs_mcp-0.1.0.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f4f62a4e22e00bb9f9ef95998912496d1cc08d35803fe2d9defa697a065617b4
|
|
MD5 |
738cd54c35c98d6bb19d20db674e8a42
|
|
BLAKE2b-256 |
06239c1c2a4c84ee8b812dcebfa1386299452f860b22a429f3188c00c1b1ea31
|
File details
Details for the file oxylabs_mcp-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: oxylabs_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
eed22b56c89f2ad865c1fb5c608b38987136923f43a633bc026a330539fd4c18
|
|
MD5 |
2db0e204ea2c29e5c5839ab559e1c480
|
|
BLAKE2b-256 |
edf84a7569cdef5c4ef0aece6d9984fef279d67358dbe7accbf2d4f1a3ffb428
|