web2mcp
web2mcp is an MCP server that exposes read-only public web/API connectors as tools for AI agents.
Search and read English Wikipedia articles (search + summary).
Browse the Hacker News front page and search HN stories.
Convert place names to coordinates and get weather forecasts.
Fetch latest ECB currency exchange rates.
Search public GitHub repositories and retrieve repo metadata.
Fetch public web pages as cleaned Markdown.
Look up npm package details and weekly download counts.
Search arXiv research papers.
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., "@web2mcp look up the Apollo 11 mission on Wikipedia and summarize it"
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.
web2mcp
Turn any website or REST API into MCP tools — one tiny Cloudflare Worker, zero dependencies.
GitHub's 665 REST endpoints → 2 MCP tools, ~147,000 tokens of tool definitions → ~300 (catalog mode)
Every AI agent (Claude, ChatGPT, Cursor, your own bots…) now speaks the Model Context Protocol. But most websites and apps don't. web2mcp is the glue: describe an HTTP API in a few lines of config and it instantly becomes an MCP tool that any agent can call — hosted for free on Cloudflare's edge.
Claude / Cursor / any MCP client
│ MCP (Streamable HTTP, JSON-RPC)
▼
┌──────────────────────────┐
│ web2mcp (CF Worker) │ connectors/*.js or CONNECTORS_JSON
└──────────────────────────┘
│ │ │
Wikipedia GitHub any REST API / web page …
Try it in 30 seconds
No install, no account. A public demo runs at:
https://web2mcp.cwei59969.workers.dev/mcp1. List the tools with the official MCP Inspector (CLI mode, works over SSH):
npx -y @modelcontextprotocol/inspector --cli https://web2mcp.cwei59969.workers.dev/mcp \
--transport http --method tools/list2. Call one:
npx -y @modelcontextprotocol/inspector --cli https://web2mcp.cwei59969.workers.dev/mcp \
--transport http --method tools/call --tool-name wikipedia_summary --tool-arg title=CloudflareOr with plain curl:
curl -s https://web2mcp.cwei59969.workers.dev/mcp \
-H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"weather_forecast","arguments":{"latitude":35.68,"longitude":139.69}}}'Prefer a UI? Run npx @modelcontextprotocol/inspector, pick Streamable HTTP, paste the URL.
The demo runs on the Workers free plan: it is rate-limited,
reader_readis disabled,bilibili_*is not available (Bilibili blocks Cloudflare IPs), and thegithub_*tools often hit GitHub's anonymous rate limit (HTTP 403). Deploy your own, or run it locally, for real use.
Related MCP server: Remote MCP Server Authless
Who is this for
You want an agent to use a public REST API today and don't want to write an MCP server for it. Describe the endpoint in ~15 lines of config; web2mcp turns it into a typed MCP tool.
You have a big API (hundreds of endpoints) and tool definitions are eating your context. Catalog mode exposes it as 2 tools (
search_api+call_api).You want free, always-on hosting with no servers: one Cloudflare Worker, zero runtime dependencies.
You want to run it locally with no cloud account:
npx -y github:charleswei118/web2mcp(stdio).
Not a fit if you need browser automation / logged-in scraping, or OAuth on behalf of end users.
Why
Config, not code. A connector is a plain object: base URL, path, query, params. No SDK to learn.
Zero runtime dependencies. ~800 lines of readable JavaScript. Audit it in 10 minutes.
Token-friendly output.
pickandfieldstrim giant JSON responses down to what the model needs.Free hosting. Runs on the Cloudflare Workers free plan. Deploy in one click.
Safe by default. Requests are locked to each connector's host, arguments are type-checked, secrets stay server-side, optional bearer auth.
OpenAPI import. Convert any OpenAPI 3 spec into a connector with one command.
Built-in connectors (no API keys)
Tool | What it does |
| Search Wikipedia, read article summaries |
| Hacker News stories |
| Place name → coordinates (Open-Meteo) |
| Current weather + daily forecast (Open-Meteo) |
| ECB exchange rates (Frankfurter) |
| Public GitHub repositories (set |
| Any web page → clean Markdown (Jina Reader) |
| npm package info and weekly downloads |
| Search arXiv research papers |
| Public holidays by country and year (Nager.Date) |
| Mainland China holidays and make-up workdays (调休) for a year |
| Baidu real-time hot search (百度热搜) |
| A random line of classical Chinese poetry (今日诗词) |
| Bilibili trending / ranking videos (stdio & self-hosted only: Bilibili blocks Cloudflare IPs) |
Deploy your own in one click
Click Deploy to Cloudflare above. Cloudflare copies this repo into your GitHub account, asks for an AUTH_TOKEN (any long random string, e.g. openssl rand -hex 32), then builds and deploys it. A minute later your server is live at https://web2mcp.<your-subdomain>.workers.dev/mcp, and every push to your copy redeploys it. The free Workers plan is enough.
Quick start
git clone https://github.com/charleswei118/web2mcp && cd web2mcp
npm test # unit tests, no install needed (Node 20+)
npm run smoke # calls the built-in tools against the real APIs
npx wrangler dev # local server at http://localhost:8787/mcp (no Cloudflare login needed)
npx wrangler deploy # your own https://web2mcp.<you>.workers.dev/mcpwrangler dev serves /mcp without auth unless you create .dev.vars: cp .dev.vars.example .dev.vars and set AUTH_TOKEN.
Optional: protect your deployed endpoint
npx wrangler secret put AUTH_TOKENConnect your client
Use the demo URL to try it; swap in https://web2mcp.<you>.workers.dev/mcp once you deploy.
The demo needs no token. Add the Authorization header only if you set AUTH_TOKEN on your own deployment.
Claude Code
claude mcp add --transport http web2mcp https://web2mcp.cwei59969.workers.dev/mcp
# your own, protected deployment:
claude mcp add --transport http web2mcp https://web2mcp.<you>.workers.dev/mcp \
--header "Authorization: Bearer $WEB2MCP_TOKEN"Cursor (~/.cursor/mcp.json, remote URL supported natively)
{
"mcpServers": {
"web2mcp": { "url": "https://web2mcp.cwei59969.workers.dev/mcp" }
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"web2mcp": { "type": "http", "url": "https://web2mcp.cwei59969.workers.dev/mcp" }
}
}Claude Desktop / Windsurf / any stdio-only client (bridge with mcp-remote)
{
"mcpServers": {
"web2mcp": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://web2mcp.cwei59969.workers.dev/mcp"]
}
}
}With a protected deployment, add the header:
"args": ["-y", "mcp-remote", "https://web2mcp.<you>.workers.dev/mcp",
"--header", "Authorization: Bearer ${WEB2MCP_TOKEN}"],
"env": { "WEB2MCP_TOKEN": "your-token" }No cloud at all: run it locally over stdio
{
"mcpServers": {
"web2mcp": {
"command": "npx",
"args": ["-y", "github:charleswei118/web2mcp"],
"env": { "ENABLED_CONNECTORS": "wikipedia,hackernews,weather" }
}
}
}Or with Docker: docker build -t web2mcp . && docker run -i --rm web2mcp. Environment variables work the same as Worker bindings (ENABLED_CONNECTORS, CONNECTORS_JSON, MAX_OUTPUT_CHARS, TOOL_MODE=catalog).
Claude.ai / ChatGPT connectors / OpenAI Responses API / Cloudflare AI Playground: paste the URL directly.
Write a connector
Create connectors/myapi.js and add it to connectors/index.js:
export default {
name: "openlibrary", // tool names become openlibrary_<tool>
description: "Search books on Open Library.",
baseUrl: "https://openlibrary.org",
headers: { /* "authorization": "Bearer ${MY_API_KEY}" */ },
tools: [
{
name: "search",
description: "Search books by title or author.",
method: "GET", // GET | POST | PUT | PATCH | DELETE
path: "/search.json", // "{arg}" in the path is URL-encoded
query: { q: "{query}", limit: "{limit}" },
params: {
query: { type: "string", required: true, description: "Title or author" },
limit: { type: "integer", minimum: 1, maximum: 20, default: 5 },
},
pick: "docs", // dotted path into the JSON response
fields: ["title", "author=author_name", "year=first_publish_year"],
},
],
};Template rules:
Syntax | Meaning |
| Tool argument. As a whole value it keeps its type; missing optional args are dropped. |
| Read from a Worker secret / var — never exposed to the model. |
| Optional secret: the value is dropped when it is not set. |
| Select part of the response ( |
| Keep only these fields. |
| Truncate arrays. |
| Reject localhost, private/intranet IPs, cloud metadata, embedded credentials and odd ports before any request is made (SSRF guard). Used by |
| Parse an XML/Atom/RSS response into JSON first, so |
No-code option: put connectors in the CONNECTORS_JSON secret (a JSON array of the same objects) and they appear without touching the code. Use ENABLED_CONNECTORS="wikipedia,weather" to expose only some.
From an OpenAPI spec
node scripts/openapi2connector.js https://petstore3.swagger.io/api/v3/openapi.json petstore --only GET > connectors/petstore.jsCatalog mode: 665 endpoints, 2 tools
Exposing every endpoint as its own tool floods the model's context. In catalog mode web2mcp exposes just two tools:
search_api— find operations by keywords; returns their names and argument schemascall_api— run one operation by name with an arguments object
Measured with GitHub's full REST OpenAPI spec (GET operations only, converted with scripts/openapi2connector.js):
Mode | Tools in | Approx. context |
Default (one tool per endpoint) | 665 | ~147,000 tokens |
Catalog | 2 | ~300 tokens |
Turn it on per request with /mcp?mode=catalog, or for the whole deployment with the variable TOOL_MODE = "catalog" (?mode=tools switches back). Try it on the demo: https://web2mcp.cwei59969.workers.dev/mcp?mode=catalog.
Endpoints
Path | |
| MCP Streamable HTTP endpoint (JSON responses, batch supported) |
| Same, in catalog mode ( |
| Human-readable list of tools |
| Tool list as JSON |
| Health check |
Supported MCP methods: initialize, ping, tools/list, tools/call, plus empty resources/list and prompts/list. Protocol versions 2025-06-18, 2025-03-26, 2024-11-05.
Roadmap
Catalog mode (
search_api+call_api) — v0.2Load OpenAPI specs at runtime from a URL
One-click “Deploy to Cloudflare” — v0.2
HTML scraping connectors (CSS selectors via
HTMLRewriter)Per-tool rate limits and KV caching
OAuth for connectors that need user accounts
Connector registry: share connectors as JSON files
Agent-to-agent (A2A) chat rooms on Durable Objects
PRs with new connectors are very welcome — see CONTRIBUTING.md.
Troubleshooting
You see | Why | Fix |
| You opened | MCP clients POST to |
HTTP 401 on |
| Send |
| GitHub's anonymous limit, shared by all Cloudflare IPs |
|
| Tool not enabled ( | Run |
| Bilibili blocks Cloudflare IPs | Use stdio / Docker / self-hosted Node. |
| Disabled on the public demo to prevent abuse | Deploy your own. |
| SSRF guard: localhost, private IPs, metadata hosts and odd ports are refused | Use a public |
Response cut off |
| Raise it, or use |
wrangler: | You're behind | Harmless; wrangler uses the proxy for upstream fetches. |
| Node < 20 | Upgrade to Node 20+. |
Responsible use
Only connect APIs and sites you are allowed to use. Respect each service's terms, robots rules and rate limits, and keep credentials in Worker secrets.
License
If web2mcp saves you time, please ⭐ the repo — it helps others find it.
Available Tools
13 toolsarxiv_searcharXiv: searchARead-onlyInspect
[arxiv] Search arXiv research papers by keyword across title, abstract and authors, ranked by relevance. Use it for academic preprints; use wikipedia_search for general background. Returns id/link, title, publication date, authors and abstract.
Inputs: query (required), limit.
currency_latestFrankfurter exchange rates: latestARead-onlyInspect
[currency] Get the latest European Central Bank reference exchange rates (updated once per working day) from a base currency. Omit symbols to get all ~30 currencies. Returns an object with base, date and a rates map, e.g. rates.CNY.
Inputs: base, symbols.
geocode_searchOpen-Meteo Geocoding: searchARead-onlyInspect
[geocode] Turn a city or place name into coordinates. Use this before weather_forecast, which needs latitude/longitude. A name can match several places, so up to limit candidates are returned, best match first, each with name, country, region, latitude, longitude and timezone.
Inputs: name (required), limit, language.
github_repoGitHub: repoARead-onlyInspect
[github] Get metadata for one public repository you already know by owner and name: description, stars, forks, language, license, topics, url and last push time. Use github_search_repos first if you only have keywords. Returns an error if the repo does not exist or is private.
Inputs: repo (required), owner (required).
github_search_reposGitHub: search_reposARead-onlyInspect
[github] Find public GitHub repositories matching a query. Use this when you don't know the exact repo; use github_repo when you already have owner and name. Supports GitHub qualifiers like 'mcp language:rust stars:>100'. Returns up to limit repos (full_name, description, stars, language, url, updated_at). Unauthenticated calls share a low rate limit.
Inputs: query (required), sort, limit.
hackernews_front_pageHacker News: front_pageARead-onlyInspect
[hackernews] List the stories currently on the Hacker News front page, ranked as on the site. Use this to see what is trending now; use hackernews_search to find stories on a topic. Returns title, url, points, comment count and story id.
Inputs: limit.
hackernews_searchHacker News: searchARead-onlyInspect
[hackernews] Full-text search of Hacker News stories (not comments) by keyword, ranked by relevance. Use this to find discussions about a product, project or topic; use hackernews_front_page for what is trending now. Returns title, url, points, comment count, date and story id.
Inputs: query (required), limit.
npm_packagenpm: packageARead-onlyInspect
[npm] Get the latest version, description, license and homepage of an npm package. For download counts use npmstats_downloads instead. Returns an error if the package does not exist.
Inputs: name (required).
npmstats_downloadsnpm stats: downloadsARead-onlyInspect
[npmstats] Get how many times an npm package was downloaded in the last 7 days, as a popularity signal. For version or license info use npm_package instead. Returns package, downloads, start and end dates.
Inputs: name (required).
reader_readWeb reader: readARead-onlyInspect
[reader] Fetch any public web page and return its main content as Markdown, with navigation and ads stripped. Use it as a fallback for sites without a dedicated tool (prefer wikipedia_summary, github_repo etc. when they fit). Pages behind logins or paywalls may come back empty; long pages are truncated.
Inputs: url (required).
weather_forecastOpen-Meteo Weather: forecastARead-onlyInspect
[weather] Get current conditions and a daily forecast for a location given by coordinates. If you only have a place name, call geocode_search first. Returns temperature (°C), humidity, wind (km/h), WMO weather code, and per-day max/min temperature and precipitation (mm) in the location's local timezone.
Inputs: latitude (required), longitude (required), days.
wikipedia_searchWikipedia: searchARead-onlyInspect
[wikipedia] Full-text search of English Wikipedia. Use this to find the right article title, then call wikipedia_summary with it. Returns titles, short descriptions and excerpts, best match first.
Inputs: query (required), limit.
wikipedia_summaryWikipedia: summaryARead-onlyInspect
[wikipedia] Get the lead summary of an English Wikipedia article by its exact title (redirects are followed). If you are unsure of the title, use wikipedia_search first. Returns title, short description, the lead extract and the article url.
Inputs: title (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool is tied to a distinct source and operation, with clear distinctions between search vs retrieval tools such as wikipedia_search/wikipedia_summary, hackernews_front_page/hackernews_search, and github_search_repos/github_repo. reader_read is explicitly positioned as a fallback, so it does not create meaningful ambiguity.
Tool names consistently use snake_case with service/source prefixes, making the set easy to scan. There are minor deviations such as noun-only names like npm_package and github_repo, plus the separate npmstats namespace, but the convention remains predictable.
With 13 tools spanning several lightweight web data sources, the count is well within a reasonable range and each tool has a clear role. There is no obvious bloat or duplicate operation.
The surface covers the core read paths for each included source and provides a generic reader_read fallback for arbitrary pages. Some gaps exist, such as HN item/comment retrieval, GitHub code/issues/PRs, currency conversion/history, npm search, and a general web search tool, but agents can often work around them via the reader or dedicated tools where provided.
Maintenance
Related MCP Connectors
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA serverless MCP implementation on Cloudflare Workers that allows connecting AI models to custom tools without authentication requirements.-
- FlicenseNot gradedqualityNot gradedmaintenanceA serverless MCP implementation on Cloudflare Workers that allows connecting AI models to custom tools without requiring authentication.-
- FlicenseNot gradedqualityDmaintenanceExposes any REST API as MCP tools, enabling AI agents to discover and call existing HTTP endpoints without modifying the original API.-
- AlicenseNot gradedqualityDmaintenanceExpose any API to an LLM agent as two sandboxed MCP tools (search + execute) on Cloudflare Workers.11 npm2MIT