web-api-mcp
Self-hostable MCP server for the Oxylabs Web API
Install / Use
claude mcp add oxylabs -- npx -y github:oxylabs/web-api-mcpIf the server publishes to npm under a different name, use that package instead β check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of web-api-mcp
web-api-mcp scores 76/100 on our quality scale, 3709th of 4,604 Development & Engineering skills we index.
Its MCP Server is 11 KB long, well organised into 18 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 5 days ago, so web-api-mcp is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit β read the skill file before letting an agent act on it.
web-api-mcp compared with similar skills
All 4 of these similar skills score higher than web-api-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| web-api-mcp (this skill)by oxylabs | 76 | 10 | 5d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 100.2k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 99.8k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 76.7k | today | CLAUDE.md |
| ai-job-searchby MadsLorentzen | 100 | 60.2k | today | CLAUDE.md |
Frequently asked questions
- How do I install web-api-mcp?
- Run
claude mcp add oxylabs -- npx -y github:oxylabs/web-api-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does web-api-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is web-api-mcp safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is web-api-mcp still maintained?
- The repository was last updated 5 days ago, so web-api-mcp is actively maintained.
Skill content
View source on GitHubOxylabs Web API β MCP Server
mcp-name: io.oxylabs/web-api-mcp
Welcome to the official repository overview for Oxylabs' Web API MCP. This guide is a developer-focused, technical reference covering Web API MCP. A self-hostable Model Context Protocol server that gives any MCP-capable agent live web access through the Oxylabs Web API.
| Tool | What it does |
|---|---|
| search | Search the live web, returns ranked organic results (title, description, URL) |
| scrape | Read a single URL as Markdown by default, including JS-heavy and bot-protected pages. Ask for a screenshot, or pass json_prompt / json_schema to pull named fields off it as JSON |
| check_scrape | Collect the result of a scrape the API is running in the background |
| read_scraped | Read a large page that was offloaded to disk, in chunks |
| list_scrapers | List the scrape endpoints the API implements, grouped by parser support, or describe one's parameters |
| scrape_target | Call a target-specific scrape endpoint with its own parameters, as content or as structured JSON |
All six are annotated readOnlyHint β nothing here writes anything β so clients can run
them without prompting.
The skill ships with the server
Connecting the server is the whole install. The agent skill is bundled in the package and served as an MCP resource and a prompt, so a client that never adds the web-api-skills repo still gets the judgment for using these tools well β search to find and scrape to read, when JavaScript rendering earns its cost, what to do with an empty page, how to cite.
| | |
|---|---|
| oxylabs://skill/web-api | The skill itself, as Markdown |
| prompt web_research | Takes a question, hands the agent the task plus the skill |
scripts/sync-skill.sh refreshes the bundled copy from the skills repo β the canonical
copy lives there, and the two must not drift.
Fitting the client's context
Oversized content is measured in tokens, not characters: 40 000 characters of English
is about 10 000 tokens, but 40 000 characters of Chinese is about 40 000, and Claude Code,
Claude Desktop and Cursor all reject a tool result over 25 000. The estimate is script-aware
for that reason. The budget is OXYLABS_MAX_INLINE_TOKENS (default 10 000), and a client
that knows its own limit can override it per request with an X-MCP-Max-Tokens header β
0 opts out entirely.
Sync first, queued only on a timeout
Every scrape goes to the synchronous endpoint first. If it times out, the same request is
sent to the corresponding asynchronous endpoint (/v1/async/...) and the agent gets a request id to poll.
async/... endpoints passed to scrape_target are always queued.
{ "state": "pending", "request_id": "7504857924934611969", "note": "The synchronous call timed out (β¦), so the same request was queued instead. β¦ call check_scrape('7504857924934611969') β¦" }
The agent polls check_scrape(request_id) every 5s while it is pending. The API holds the
result, so nothing about a request lives in this process: restarts and extra replicas do not
lose it.
It says when a page needed rendering
The agent shouldn't have to guess whether an empty page is empty or just unrendered, and it
shouldn't pay for a render on every page to find out. So a plain scrape that comes back
with almost no visible text β or with a "please enable JavaScript" notice β is flagged:
{
"content": "# Loadingβ¦",
"content_thin": {
"visible_chars": 9,
"reason": "almost no text",
"note": "β¦renders client-side. Retry the same call with run_js=Trueβ¦"
}
}
HTML is measured on its text, not its markup, so a 3 KB shell of <meta> tags still reads
as thin. The flag is a hint, not a retry: rendering is slow and billed, and a genuinely
short page would pay for it on every fetch. The threshold is 500 visible characters.
Structured data
Request structured data and the server selects the parser for you:
- Dedicated parser β included at no extra cost. Available on selected target endpoints, it returns that endpoint's predefined structure.
- AI parser β billed on top of the scrape. Available on most endpoints, it returns exactly the fields your prompt or schema describes.
To keep costs down, the server tries the dedicated parser first and falls back to the AI parser only when the endpoint has no dedicated parser or the dedicated parse fails. Each result states which parser produced it, and the agent can request the AI parser directly when a dedicated result lacks the fields it needs.
Large pages
Web pages routinely exceed what is sensible to hand an agent in one response, so scrape
does not return oversized content inline:
- Running locally (stdio): the page is written to a temp file. The agent gets the first
2 000 characters plus a path, and pulls the rest through
read_scraped(path, offset)β reading only as far as it needs instead of paying for the whole page up front. - Running remotely (HTTP): there is no shared filesystem, so a path would be useless. The content is truncated with a note stating the full length.
The threshold is OXYLABS_MAX_INLINE_TOKENS (default 10 000). read_scraped can only read
files in the spill directory β it is deliberately not a general file reader.
Full API documentation: Oxylabs Web API docs
Requirements
- Python 3.10+ (built on FastMCP, installed with the package)
- An Oxylabs Web API key β in the Oxylabs dashboard, create a Web API instance and generate a key for it
Install
uv tool install git+https://github.com/oxylabs/web-api-mcp
That puts oxylabs-web-api-mcp on your PATH in its own environment. pipx install git+https://github.com/oxylabs/web-api-mcp does the same. Installing into a system Python
usually fails β most are marked externally managed and refuse. To work on the server
itself:
git clone https://github.com/oxylabs/web-api-mcp.git
cd web-api-mcp
pip install -e .
server.json is the MCP registry
manifest. It has no packages block yet β add one once the server is published somewhere
installable, since a registry entry pointing at nothing is worse than no entry.
Use it locally (stdio)
Point your client at the installed command. Claude Code:
claude mcp add oxylabs-web-api \
--env OXYLABS_WEB_API_KEY=your_api_key_here \
-- oxylabs-web-api-mcp
Claude Desktop / Cursor / any client that reads a JSON config:
{
"mcpServers": {
"oxylabs-web-api": {
"command": "oxylabs-web-api-mcp",
"env": { "OXYLABS_WEB_API_KEY": "your_api_key_here" }
}
}
}
Self-host it (HTTP)
The HTTP transport is for running one shared server for a team or for agents that can't spawn local processes.
export OXYLABS_WEB_API_KEY=your_api_key_here
export MCP_ALLOWED_HOSTS='mcp.internal.example.com,localhost:*'
oxylabs-web-api-mcp --transport http --host 0.0.0.0 --port 8080
The endpoint is then http://<host>:8080/mcp.
Docker
docker build -t oxylabs-web-api-mcp .
docker run --rm -p 8080:8080 \
-e OXYLABS_WEB_API_KEY=your_api_key_here \
-e MCP_ALLOWED_HOSTS='localhost:*,mcp.internal.example.com' \
oxylabs-web-api-mcp
MCP_ALLOWED_HOSTSis not optional. The HTTP transport turns on DNS-rebinding protection, so a server that doesn't declare its own hostname rejects every request with aHostheader it doesn't recognise (421 Misdirected Request). List the hostname clients actually connect to.host:*matches any port on that host.
Configuration
| Variable | Default | Purpose |
|---|---|---|
| OXYLABS_WEB_API_KEY | (required on stdio) | Web API key, sent as Authorization: Bearer <key>. Over HTTP a per-request Authorization: Bearer header takes precedence |
| OXYLABS_BASE_URL | https://webapi.oxylabs.io | Override the API base URL, e.g. to go through a proxy |
| OXYLABS_RETRIES | 2 | Retries on a transient 429/500/502/503/504 |
| OXYLABS_RATE_LIMIT | (off) | Cap this server's own spend, e.g. 100/1h, 50/30m |
| OXYLABS_MAX_INLINE_TOKENS | 10000 | Above this, content is offloaded or truncated |
| OXYLABS_SPILL_DIR | system temp | Where offloaded pages are written (stdio only) |
| OXYLABS_SPILL | 1 | Set to 0 to keep everything inline even on stdio |
| MCP_TRANSPORT | stdio | stdio or http |
| HOST / PORT | 127.0.0.1 / 8080 | HTTP transport bind address |
| MCP_ALLOWED_HOSTS | localhost:*,127.0.0.1:* | Comma-separated Host allowlist (HTTP only) |
| MCP_ALLOWED_ORIGINS | (empty) | Comma-separated Origin allowlist (browser clients) |
Copy .env.example to .env for local use. On stdio the server reads that .env from
its working directory: any OXYLABS_* name not already set in the environment is filled
from there, so a project that keeps its key in .env needs no launcher wrapper. Real environment variables always win, and
only OXYLABS_* names are read. Point it elsewhere with OXYLABS_ENV_FILE=/path/to/.env.
The key is read at request time and is never written to disk or logged.
Security notes
- Callers can bring their own key over HTTP. Send
Authorization: Bearer <key>with each request and the server uses it for that call, so one deployment serves several callers on their own quota.OXYLABS_WEB_API_KEYin the server environment is the fallback when no header arrives. - Cap the spend.
OXYLABS_RATE_LIMIT=100/1hrefuses tool calls past a sliding window, so a runaway agent loop cannot drain the key. Off by default. - If you rely on that fallback, treat the endpoint as privileged. The server does no authentication of its own β anyone who can reach it spends the key it holds. Put it behind your VPN, an ingress with auth, or a service mesh. Don't expose it to the public internet.
scrapefetches whatever URL it is given. If you expose this server to untrusted prompts, restrict egress at the network layer rather than trusting the caller.read_scrapedis restricted to the spill directory. Don't pointOXYLABS_SPILL_DIRat a directory holding anything else β it would make those files readable by the agent.
Development
pip install -e '.[dev]'
ruff check . && ruff format --check .
pytest # or: python tests/test_server.py
./scripts/sync-skill.sh # refresh the bundled skill from web-api-skills
The tests are offline: error parsing, input validation, envelope trimming, endpoint-name handling, sync-first scraping with the queued fallback and polling, and the dedicated/AI parser selection. CI runs the same on 3.10, 3.12 and 3.13.
Learn More
For detailed configuration, advanced usage, and code examples in multiple languages, check the official documentation:
License
MIT
Contact Us
If you have questions or need support, reach out to us at support@oxylabs.io, or through live chat in the Oxylabs Dashboard. For enterprise inquiries, contact your dedicated account manager.
Related Skills
Agent-Reach
100.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu β one CLI, zero API fees.
taste-skill
99.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
headroom
76.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
60.2kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
