- Home
- MCP servers
- MCP Server Requests
MCP Server Requests
- python
7
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"coucya-mcp-server-requests": {
"command": "python",
"args": [
"-m",
"mcp_server_requests"
]
}
}
}You run an MCP server that provides HTTP request capabilities for LLMs. The server can fetch web content in various forms, save content to files with controlled access, and perform generic HTTP requests while returning full response details. It’s useful for integrating live web data into your LLM workflows with flexible content processing and robust request options.
How to use
To use this MCP server, you run it locally or in your MCP environment and connect your MCP client to the server using the provided stdio command. The server exposes three primary tools: fetch, fetch_to_file, and http_request. You can fetch and transform web content, save fetched content to files with workspace-aware or absolute paths, and perform any HTTP request while receiving status, headers, and body in the response.
How to install
Prerequisites: Python must be installed on your system.
-
Clone the project repository.
-
Change into the project directory.
-
Install the Python package dependencies.
-
Start the MCP server with the provided command.
git clone https://github.com/coucya/mcp-server-requests.git
cd mcp-server-requests
pip install .
Configuration and start command
Use the following MCP server configuration to run the server as an MCP backend. This configuration starts the server using Python and loads the mcp_server_requests module.
{
"mcpServers": {
"mcp_server_requests": {
"command": "python",
"args": [
"-m",
"mcp_server_requests"
]
}
}
}
What you can do with the server
Fetch content from a URL and return it in various formats. The fetch command supports returning raw HTML, cleaned content, or Markdown-formatted content.
Save fetched content to a file with fetch_to_file. If you enable workspace root support, paths can be relative to the workspace root; otherwise you must provide absolute paths.
Send versatile HTTP requests with http_request. You can specify the method, include query parameters, custom headers, and a request body in either text or JSON form. The response includes the status line, headers, and body.
Usage notes
Environment and options are provided through command line flags when starting the server and through the MCP client when invoking tools. The server supports a custom User-Agent, random User-Agent generation, and workspace-root-based file operations via the --use-root flag.
Additional notes
The server exposes three tools for your MCP client: fetch, fetch_to_file, and http_request. Each tool has its own parameters and return values, and you can combine them with your MCP workflows to access live web content and perform HTTP interactions.
Security and best practices
When enabling file operations outside the workspace with --use-root and --allow-external-file-access, ensure your MCP client has the proper root capability to prevent unauthorized access. Use explicit file paths and validate content before feeding fetched data into LLM contexts to manage token usage and content safety.
Available tools
fetch
Fetch web content from a given URL and return it in a chosen format (raw, basic_clean, strict_clean, or markdown).
fetch_to_file
Fetch web content from a URL and save it to a file with UTF-8 encoding. Supports relative paths when workspace root is enabled and absolute paths otherwise.
http_request
Send an HTTP request with a chosen method, optional query parameters, headers, and body (text or JSON). Returns the full HTTP response including status, headers, and body.