- Home
- MCP servers
- URL Fetch
URL Fetch
- python
2
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": {
"aelaguiz-mcp-url-fetch": {
"command": "python",
"args": [
"-m",
"url_fetch_mcp",
"run"
]
}
}
}You set up a Python-based MCP server that lets a language model fetch content from URLs. It exposes tools to retrieve raw text, JSON, or images from any URL, with controllable headers and timeouts. You run the server locally or expose it over a transport, then call its tools from your MCP client to fetch and format content for downstream tasks.
How to use
Launch the URL Fetch MCP server and connect your MCP client to it. Start by running the server in stdio mode for local use or expose it over a transport for remote connections.
Available tools let you fetch different kinds of content from URLs. Use the text fetch tool to retrieve and return content as text, the fetch_json tool to retrieve and parse JSON, and fetch_image to obtain image data. You can pass optional headers and set a request timeout to fine-tune requests.
After starting the server, your MCP client can call tools by name with the required parameters. For example, you provide the target URL and optionally headers and a timeout, and you receive the formatted result from the server.
How to install
Prerequisites: you need Python 3.8+ and a working Python packaging environment.
pip install -e .
pip install -e ".[dev]"
Run the MCP server in stdio transport (recommended for Claude Code or local use):
python -m url_fetch_mcp run
If you want to expose the server over HTTP+SSE for remote connections, start the server with a port:
python -m url_fetch_mcp run --transport sse --port 8000
Additional content
Core capabilities include three tools that your client can call from the MCP session: fetch_url, fetch_image, and fetch_json.
Tool overview:
-
fetch_url fetches content from a URL and returns it as text. Parameters: url (required), headers (optional), timeout (default 10 seconds).
-
fetch_image fetches an image from a URL and returns it as image data. Parameters: url (required), timeout (default 10 seconds).
-
fetch_json fetches JSON from a URL, parses it, and returns formatted JSON. Parameters: url (required), headers (optional), timeout (default 10 seconds).
Examples show how you can call these tools from a client session to fetch page content, JSON data, or images and then use the results directly in your downstream processing.
Testing and quick-start scripts are provided to help you validate basic functionality and experiment with the client API.
Available tools
fetch_url
Fetches content from a URL and returns it as text. Optional headers and timeout control the request.
fetch_image
Fetches an image from a URL and returns it as image data. Timeout control is available.
fetch_json
Fetches JSON from a URL, parses it, and returns formatted JSON.