webtools-mcp
Uses Cloudflare as the web-access backbone: Cloudflare Access provides OAuth sign-in and Access JWT verification, AI Gateway and the Web Search API back the web_search tool, Browser Run's /markdown Quick Action backs web_render, and Workers AI Markdown Conversion turns HTML, PDF, and Office documents into Markdown/text for web_fetch.
Deploys as a Cloudflare Worker that serves the streamable HTTP MCP endpoint at /mcp on a Custom Domain (DNS record and certificate created on deploy), using Worker bindings for Web Search, Browser Run, and rate limiting, with deploys driven by cf deploy from GitHub Actions or locally.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@webtools-mcpSearch the web for the latest Cloudflare Workers MCP docs and summarize them."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
webtools-mcp
A remote MCP server on Cloudflare Workers that gives coding agents web access: search the web, read pages, and render pages that need JavaScript. Cloudflare Access signs clients in with OAuth, so only you can use it.
flowchart LR
client["MCP client"] -- "OAuth (Managed OAuth)" --> access["Cloudflare Access"]
access -- "Access JWT" --> worker["Worker<br>/mcp"]
worker -- "web_search" --> gateway["AI Gateway"] --> search["Web Search API"]
worker -- "web_fetch" --> site["Web pages"]
worker -- "web_render" --> browser["Browser Run"] --> siteTools
Tool | What it does | Backed by |
| Searches the public web and returns URLs, titles, and short descriptions. | Web Search API through AI Gateway |
| Reads a URL as Markdown (HTML, PDF, and Office documents are converted), JSON, or text. Long pages are read in windows with |
|
| Loads a page in a headless browser, runs its JavaScript, and reads the result as Markdown. Use it when | Browser Run |
web_search and web_fetch wrap the AI SDK adapters from agents (agents/websearch/ai-sdk and agents/webfetch/ai-sdk), so they keep the adapters' descriptions and result formats.
Related MCP server: URLpipe MCP server
Features
Behind Access, the Worker still verifies the Access JWT's signature, issuer, and audience on every request, and rejects the request if any check fails.
The Worker allows 30 searches, 60 fetches, and 10 renders a minute. AI Gateway's spend limits don't stop searches, so the rate limit is what holds their cost down.
Fetched and rendered pages reach the model inside
<untrusted_web_content>, and a page can't close that tag early.Each tool declares an
outputSchema, so clients that call tools from code, such as Pi's codemode, get typed results.The server
instructionsdescribe all three tools on one line, for clients that list a server by that line instead of declaring its tools.
Connect a client
The endpoint is https://<your-hostname>/mcp, served over streamable HTTP. Clients sign in with OAuth: they find the authorization server from the WWW-Authenticate header that Access returns, register themselves, and open a browser for you to sign in.
For example, in Pi, add the server to ~/.pi/agent/mcp.json:
{
"mcpServers": {
"webtools": { "url": "https://<your-hostname>/mcp" }
}
}Then run pi mcp login webtools and check it with pi mcp list.
Pi doesn't declare MCP tools to the model by default. Add"exposure": "direct" to the entry so the model sees the three tools without searching for them.
Deploy your own
Prerequisites
A Cloudflare account on the Workers Paid plan, with a domain on Cloudflare
mise, which installs the Node.js and pnpm versions pinned in
package.jsonA GitHub repository with Actions, for production deploys
1. Set up Cloudflare
Create an Access application of type
mcpfor the hostname the Worker will serve. Turn on Managed OAuth with dynamic client registration, and allow loopback redirect URIs so CLI clients can sign in. Add a policy that allows only you. Note the application's AUD tag.Create an AI Gateway named
webtoolsand turn on authentication. Searches are paid from your AI Gateway credits, so add some.
2. Point the code at your resources
src/auth.ts: setACCESS_ISSUERto your Zero Trust team domain,https://<team>.cloudflareaccess.com.cloudflare.config.ts: setACCESS_AUDto the AUD tag anddomainsto your hostname. The Worker creates the Custom Domain, its DNS record, and its certificate on deploy.
3. Deploy
.github/workflows/deploy.yaml runs cf deploy on every push to main. It reads two secrets from the production environment:
Secret | Value |
| An account API token with Workers Scripts: Edit and Account Settings: Read on the account, and Workers Routes: Edit and Zone: Read on the zone |
| Your account ID |
Restrict theproduction environment to the main branch before you add the secrets. The workflow has no pull_request trigger, so pull requests never reach them.
To deploy from your machine instead, sign in with cf auth login and run pnpm run deploy.
Local development
mise install
pnpm install
pnpm devpnpm dev runs cf dev, which serves the MCP endpoint at http://localhost:5173/mcp. Access isn't in front of it, so in development mode the Worker skips JWT verification for requests to localhost. Production builds never include that bypass.
Web Search and Browser Run have no local mode.cf dev connects their bindings to your Cloudflare account, so local searches and renders are real and billed.
Before every commit, run:
pnpm fmt
pnpm run typecheck
pnpm testThe unit tests cover the auth module and web_render, which they hand a fake Browser Run binding. Check the other tools against a running Worker.
Costs
Besides the Workers Paid subscription, you pay for searches and renders. Each search draws down your AI Gateway credits at the search provider's list price. AI Gateway's spend limits don't stop searches, so only the Worker's rate limit holds search spend down. Browser Run bills renders by browser time: Workers Paid includes 10 hours a month, and each hour beyond that costs $0.09.
Requests, logs, Markdown conversion, rate limiting, and Access stay within the plan's included usage for personal use.
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search and page reading for AI agents with zero API credits
Web search and page-reading for AI agents. One-click OAuth connect, or a Caesar API key.
Web data for agents: YouTube transcripts, screenshots, Google News, WHOIS, jobs, tech stack, more.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search the web, read and extract content from webpages, fetch JSON from REST APIs, and collect links while bypassing anti-bot protections.22 npmISC

URLpipe MCP serverofficial
AlicenseNot gradedqualityBmaintenanceGives AI agents a hosted browser that renders JavaScript, returning Markdown, screenshots, metadata, console errors, and Lighthouse audits for any URL.MIT
JsonLink MCP Serverofficial
AlicenseAqualityCmaintenanceEnables AI agents to read any web page as clean Markdown, pull title/description/preview metadata, capture desktop, mobile, or full-page screenshots, and list every link or image on a URL. JavaScript-heavy pages are rendered in a real browser and blocked requests retried through a proxy, so agents can reach content they'd otherwise miss.5257 npmMIT- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search the web through configured providers and crawl single pages or entire sites into clean, deduplicated Markdown or JSON, including authenticated pages.-