This MCP server provides HTTP request and web content fetching capabilities with content processing options to optimize token usage.
Core Tools:
fetch- Retrieve web content with multiple processing formats: raw HTML, basic cleaned HTML (removes scripts/styles), strict cleaned HTML (removes non-visual elements and attributes), or Markdown conversionfetch_to_file- Download and save web content locally with the same processing options, automatic directory creation, and UTF-8 encodinghttp_request- Execute full HTTP requests supporting all major methods (GET, POST, PUT, PATCH, DELETE) with custom headers, query parameters, and request bodies in text or JSON format
Key Features:
Content filtering - Automatically removes non-visual elements to reduce token consumption
User-Agent customization - Configure custom, randomly generated, or browser/OS-filtered User-Agent strings with priority control
Workspace integration - Optional MCP Root capability for relative path operations within workspace and configurable external file access control
Complete responses - Returns full HTTP response information including status, headers, and body content
Enables conversion of web pages to Markdown format, allowing for cleaner and more readable text representation of online content.
mcp-server-requests
An MCP server that provides HTTP request capabilities, enabling LLMs to fetch and process web content.
Features
Supports converting web content to Markdown format
Supports filtering out content useless for LLMs
Supports custom User-Agent headers
Supports random User-Agent headers
Supports custom request headers in HTTP requests
Supports full HTTP methods (GET, POST, PUT, DELETE, PATCH)
LLMs can access complete HTTP response header information
Related MCP server: Fetch MCP Server
Installation
Usage
MCP Server Configuration
Command Line
0. Start MCP Server
Start the MCP server directly:
Options
--user-agent TEXT: Specify custom User-Agent string--random-user-agent [browser=xxx;os=xxx]: Use randomly generated User-Agent--force-user-agent: Force using command line specified User-Agent, ignoring LLM provided UA--list-os-and-browser: List available browsers and OS for random User-Agent generation
Option Details
--user-agentand--random-user-agentare mutually exclusive and cannot be used togetherUser-Agent setup methods:
Custom string:
--user-agent "Mozilla/5.0 (...)"Fully random:
--random-user-agentConditional random generation:
Specify browser type:
--random-user-agent browser=chromeSpecify OS:
--random-user-agent os=windowsBoth browser and OS:
--random-user-agent browser=chrome;os=windowsNote: Browser and OS parameters are case insensitive
Use
--list-os-and-browserto view available browsers and OS for--random-user-agent.--force-user-agentcontrols User-Agent priority:When enabled: Prioritize command line specified User-Agent (via
--user-agentor--random-user-agent), ignoring LLM provided UAWhen disabled:
If LLM provides User-Agent, use that
Otherwise use command line specified User-Agent
1. fetch - Fetch Web Content
The fetch subcommand is equivalent to the fetch tool functionality, demonstrating fetch capabilities.
Options:
--return-content: Return content type (default: markdown)raw: Return raw unprocessed HTML content
basic_clean: Basic cleanup, removing non-display tags like script, style
strict_clean: Strict cleanup, removing non-display tags and most HTML attributes
markdown: Convert HTML to clean Markdown format
Example:
2. get - Execute HTTP GET Request
The get subcommand is equivalent to the http_get tool functionality, demonstrating http_get capabilities.
Options:
--headers: Custom request headers (format: "key1=value1;key2=value2")
3. post - Execute HTTP POST Request
The post subcommand is equivalent to the http_post tool functionality, demonstrating http_post capabilities.
Options:
--headers: Custom request headers--data: Request body data
4. put - Execute HTTP PUT Request
The put subcommand is equivalent to the http_put tool functionality, demonstrating http_put capabilities.
Options: Same as POST method
5. delete - Execute HTTP DELETE Request
The delete subcommand is equivalent to the http_delete tool functionality, demonstrating http_delete capabilities.
Options: Same as POST method
Functionality
Available Tools
fetch - Fetch web content
Parameters:
url (required): Target URL
return_content (optional): Return content type ('raw', 'basic_clean', 'strict_clean', 'markdown')
raw: Return raw HTML content
basic_clean: Return filtered HTML content, removing non-display tags like script, style
strict_clean: Return filtered HTML content, removing non-display tags and most useless HTML attributes
markdown: Return HTML converted to Markdown
http_get - Execute HTTP GET request
Parameters:
url (required): Target URL
query (optional): Query parameter key-value pairs
headers (optional): Custom request headers
LLM may specify User-Agent in headers, whether to use it is controlled by
--force-user-agent(same applies to other tools)
http_post - Execute HTTP POST request
Parameters:
url (required): Target URL
query (optional): Query parameter key-value pairs
headers (optional): Custom request headers
data (optional): Request body data (text)
json (optional): Request body data (JSON)
data and json cannot be used together
http_put - Execute HTTP PUT request
Parameters: Same as http_post
http_patch - Execute HTTP PATCH request
Parameters: Same as http_post
http_delete - Execute HTTP DELETE request
Parameters: Same as http_post
License
MIT