fetch-url-raw
Click on "Install 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., "@fetch-url-rawfetch the HTML from https://example.com"
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.
fetch-url-raw
Short description: a stateless MCP server that exposes one tool, fetch_url_raw — a lightweight programmable HTTP client for LLM agents. Send arbitrary methods, headers, and bodies; control timeouts, redirects, response size, TLS verification, and DNS overrides. No cookies or session state between calls.
Requirements
Python 3.12+
Network access from the host that runs the server
Related MCP server: production-grade-mcp-agentic-system
Install
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .For tests:
pip install -e '.[dev]'Deployment
The server speaks MCP over stdio. Deploy it as a local process that your MCP client launches; it does not open a public HTTP port by default.
1. Install into a venv (recommended)
cd /path/to/fetch-url-raw
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Confirm the entry point (stdio by default; waits on stdin for MCP):
fetch-url-raw
# Stop with Ctrl+C.Or:
python -m fetch_url_rawHTTP mode is off by default. To enable it, see section 3 below.
2. Wire into an MCP client
Point the client at the venv interpreter (or the fetch-url-raw script) so dependencies resolve correctly.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"fetch-url-raw": {
"command": "/path/to/fetch-url-raw/.venv/bin/python",
"args": ["-m", "fetch_url_raw"],
"cwd": "/path/to/fetch-url-raw"
}
}
}Generic MCP host / Cursor-style config:
{
"mcpServers": {
"fetch-url-raw": {
"command": "/path/to/fetch-url-raw/.venv/bin/fetch-url-raw"
}
}
}Codex / other stdio MCP runners: use the same command + args pattern; no extra env is required for basic use.
3. Optional HTTP server mode (not enabled by default)
Default transport is stdio. To expose MCP over HTTP instead, pass --transport explicitly and set listen address/port:
# Streamable HTTP (recommended HTTP transport)
fetch-url-raw --transport streamable-http --host 127.0.0.1 --port 8000
# SSE transport
fetch-url-raw --transport sse --host 127.0.0.1 --port 8000
# Bind all interfaces (trusted networks only)
fetch-url-raw --transport streamable-http --host 0.0.0.0 --port 9000 --allow-remoteFlag | Default | Description |
|
|
|
|
| Listen IP (HTTP transports only) |
|
| Listen port (HTTP transports only) |
|
| Endpoint path ( |
| off | FastMCP stateless HTTP mode ( |
| off | Relax Host/Origin DNS-rebinding checks for non-local clients |
| off | Allow resolved private/local destination IPs (see below) |
|
| Uvicorn/server log level |
Endpoints:
streamable-http:http://<host>:<port>/mcp(or custom--path)sse:http://<host>:<port>/sse(messages under the default FastMCP message path)
Example MCP client config against a local HTTP server (client-specific; streamable HTTP):
{
"mcpServers": {
"fetch-url-raw": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}HTTP mode is optional. Prefer stdio for desktop/local agent integrations. Only bind
0.0.0.0or enable--allow-remoteon trusted networks; the tool can initiate arbitrary outbound HTTP.
Private / local destination blocking
By default the server blocks connections by resolved destination IP (not by DNS name):
DNS lookup is always allowed
After resolve (or
dns_override/ literal IP URL), the TCP destination must not fall in private/local rangesBlocked by default: RFC1918 (
10/8,172.16/12,192.168/16), loopback, link-local (169.254/16,fe80::/10), CGNAT (100.64/10), IPv6 ULA (fc00::/7)Always blocked: multicast / unspecified special-use ranges
IPv4-mapped IPv6 addresses are checked as their IPv4 form
Opt in when you intentionally need LAN/metadata/loopback targets:
fetch-url-raw --allow-private-network
# with HTTP mode:
fetch-url-raw --transport streamable-http --host 127.0.0.1 --port 8000 --allow-private-networkBlocked attempts return:
{
"success": false,
"error": {
"type": "DESTINATION_BLOCKED",
"message": "destination IP 192.168.1.1 is private/local (...)"
}
}4. Operational notes
Topic | Guidance |
State | Stateless — safe to restart anytime; no DB or disk cache |
Network | Outbound HTTP/HTTPS only; needs reachability to targets you fetch |
Security | Tool can hit arbitrary URLs — run only for trusted clients; consider host firewall / network policy |
Resources | Returned body is capped ( |
Proxies | System proxy env is ignored ( |
Logs | Server logs go to stderr; keep stdin/stdout for MCP framing in stdio mode |
HTTP listen | Not started unless |
5. Optional: install from wheel
pip install dist/fetch_url_raw-0.1.0-py3-none-any.whl
fetch-url-rawUsage
Once the MCP server is connected, call the fetch_url_raw tool from the client.
Parameters
Parameter | Type | Default | Description |
| string | required | Absolute |
| string |
| HTTP method (normalized to uppercase) |
| object | — | Request headers ( |
| string | object | array | number | bool | — | Request body: raw string as-is, or JSON value (object/array/number/bool) which is serialized and gets |
| number |
| Timeout in seconds |
| bool |
| Follow redirects |
| int |
| Max body bytes returned to the LLM. Internally buffers up to 16 MiB so large text can still be decoded, then truncates the returned |
| object | — | Hostname → IP map (like |
| bool |
| Verify TLS certificates |
| bool |
| Include TLS metadata + peer cert(s) in the result (HTTPS) |
| bool |
| Handshake only (no HTTP). Requires |
Example tool calls
GET
{
"url": "https://example.com/"
}POST JSON (LLM-friendly: pass a JSON object directly; string body still works)
{
"url": "https://httpbin.org/post",
"method": "POST",
"headers": {
"Authorization": "Bearer token"
},
"body": {"hello": "world"},
"timeout": 15
}Raw string body (no auto Content-Type):
{
"url": "https://httpbin.org/post",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"body": "hello=world&a=1"
}No redirects + small body cap
{
"url": "https://example.com/redirect",
"follow_redirect": false,
"max_response_bytes": 4096
}DNS override (connect to 1.2.3.4 while keeping Host/SNI as api.example.com)
{
"url": "https://api.example.com/health",
"dns_override": {
"api.example.com": "1.2.3.4"
},
"verify_tls": true
}Inspect TLS cert only (no HTTP request)
{
"url": "https://example.com/",
"include_tls": true,
"tls_only": true
}Fetch and include TLS info
{
"url": "https://example.com/",
"include_tls": true,
"max_response_bytes": 4096
}Success response
{
"success": true,
"status": 200,
"reason": "OK",
"http_version": "HTTP/1.1",
"headers": { "...": "..." },
"body": "...",
"body_json": null,
"body_base64": null,
"content_type": "text/html",
"encoding": "utf-8",
"elapsed_ms": 123,
"redirected": false,
"final_url": "https://example.com",
"truncated": false,
"received_bytes": 12345,
"content_length": 12345
}Text-like content types (
text/*,application/json, etc.) fillbody(string still kept).body_jsonis set only when the body is valid JSON (object/array/etc.); otherwisenull.Other non-text types set
bodytonulland put Base64 data inbody_base64.Internally the client may buffer up to 16 MiB so large text (e.g. JS bundles) can be decoded as text even when
max_response_bytesis smaller. The tool result is then truncated tomax_response_bytes.If the returned body is truncated,
truncatedistrueand only the first N bytes (or text whose UTF-8 size is N) are returned.received_bytesis how many body bytes were actually returned to the LLM (after truncation).Optional
tlsobject (wheninclude_tlsor on manyTLS_ERRORs): version, cipher, ALPN, SNI, peer IP, leaf cert PEM/fingerprint/SAN/dates, and chain.content_lengthis the full response body size when known: from theContent-Lengthheader if present, otherwise the full size if the body fit in the 16 MiB prefetch buffer, otherwisenullif the stream was cut at the prefetch ceiling without a header. Use this so agents know the real size (e.g. 1 MiB JS) while reading only the first 64 KiB of text.
Error response
Failures return a structured object instead of raising:
{
"success": false,
"error": {
"type": "TIMEOUT",
"message": "Operation timed out"
}
}
| Meaning |
| Missing/unsupported scheme or host |
| Bad method, headers, timeout, etc. |
| Hostname could not be resolved |
| Connect/read/write/pool timed out (message says which phase) |
| Certificate or TLS failure (message distinguishes expired, self-signed/untrusted, hostname/SAN mismatch, incomplete chain, outdated/unsupported protocol, malformed TLS) |
| TCP/connect failure (message distinguishes refused, reset/RST, network/host unreachable, broken pipe, etc.) |
| Resolved destination IP denied by private-network policy |
| HTTP protocol / too many redirects |
| Other HTTP or unexpected failure |
Example message values:
TIMEOUT:Connection timed out while establishing TCP/TLS,Timed out while reading the responseCONNECT_ERROR:Connection refused (no service listening or port closed),Connection reset by peer (TCP RST during connect or request),Network is unreachable (no route to destination network),No route to host (destination host unreachable)TLS_ERROR:TLS certificate has expired,TLS certificate is self-signed and not trusted (...),TLS certificate hostname mismatch: ... (wrong CNAME/SAN),TLS certificate chain incomplete or untrusted: unable to get local issuer certificate (...),TLS protocol version mismatch or unsupported/outdated TLS (...),TLS handshake failed: malformed or unexpected TLS data (...)
Features
Methods:
GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS,TRACECustom headers and body (raw string or JSON value for LLM-friendly POSTs)
Timeout, redirect control, response size limit
DNS override (SNI and Host header preserved)
TLS verification toggle
Stateless: no cookies, session cache, or filesystem writes
Default block of private/local destination IPs (post-resolve); opt-in with
--allow-private-networkStructured errors suitable for LLM tool loops
Development
pip install -e '.[dev]'
pytest
FETCH_URL_RAW_LIVE=1 pytest tests/test_live.py # optional live network testsDesign
See design.md for architecture, DNS override details, body decoding rules, and security considerations.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.Last updated42MIT
- Alicense-qualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.Last updated52MIT
- FlicenseAqualityBmaintenanceUniversal HTTP client tool for LLM agents. Enables Claude and other MCP-compatible agents to perform GET, POST, PUT, DELETE, and other HTTP requests to any URL, including localhost and internal network addresses.Last updated2
- FlicenseBqualityBmaintenanceA lightweight MCP server built on mitmproxy that lets LLMs capture, inspect, replay, and modify HTTP traffic through a set of focused tools.Last updated135
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cinit/fetch-url-raw'
If you have feedback or need assistance with the MCP directory API, please join our Discord server