Are you the author? Sign in to claim
mcp-web-url-reader
An MCP server that exposes a single tool, read_web_url, which fetches absolute URLs with curl -sL after prepending a configurable CUSTOM_PREFIX on the server side. This server uses the MCP TypeScript/JavaScript SDK and serves a Streamable HTTP endpoint at /mcp for compatibility across many AI applications. Perfect for routing AI web requests through proxies, caching layers, or custom gateways.
The AI thinks it's reading a normal URL:
curl -sL https://www.example.com
But the server actually executes:
curl -sL CUSTOM_PREFIX/https://www.example.com
This allows you to:
See docker-compose.yml for a working example service mapping 8080:8080 and injecting both environment variables.
The MCP server will be available at http://localhost:8080
| Variable | Description | Default |
|---|---|---|
CUSTOM_PREFIX | URL prefix to prepend to all requests | "" (empty) |
INTERNAL_PORT | Internal server port | 80800 |
environment:
- CUSTOM_PREFIX=
- PORT=3000
environment:
- CUSTOM_PREFIX=https://proxy.myserver.com
- INTERNAL_PORT=8080
environment:
- CUSTOM_PREFIX=http://cache-server:8000/fetch
- INTERNAL_PORT=8080
The server exposes tools over Streamable HTTP: initialize a session with a POST to /mcp, reuse Mcp-Session-Id from the response, then call tools/call with { name: "read_web_url", arguments: { url: "https://example.com" } }. The server will run curl -sL CUSTOM_PREFIX/https://example.com and return text content. Ensure the Mcp-Session-Id header is included in subsequent requests and allowed via CORS.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"web-url-reader": {
"url": "http://localhost:8080/mcp"
}
}
}
Use the MCP Server node and point it to http://localhost:8080/mcp
Connect to the MCP endpoint at http://localhost:8080/mcp
The server exposes one tool:
read_web_url
url (string, required) - The complete URL to fetchExample tool call:
{
"name": "read_web_url",
"arguments": {
"url": "https://www.example.com"
}
}
Route all AI web requests through your caching server to reduce external calls:
CUSTOM_PREFIX=http://cache-server/proxy
Add authentication to web requests:
CUSTOM_PREFIX=http://auth-gateway/fetch
Route through your own infrastructure to manage rate limits:
CUSTOM_PREFIX=https://ratelimit-proxy.myserver.com
Log and monitor all AI web access:
CUSTOM_PREFIX=http://monitoring-gateway/fetch
http://localhost:8080/ for a basic health probe and connect your MCP client to http://localhost:8080/mcp.http://localhost:8080/mcp with Streamable HTTP semantics for POST/GET/DELETE and CORS exposure for Mcp-Session-Id.docker-compose logs -fdocker exec -it mcp-web-reader curl -sL YOUR_URLMIT License - Feel free to use and modify as needed.
Pull requests welcome! Please ensure:
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows