mcp-server-fetch-python
An MCP server for fetching and transforming web content into various formats. This server provides comprehensive tools for extracting content from web pages, including support for JavaScript-rendered content and media files.
Features
Tools
The server provides four specialized tools:
-
get-raw-text: Extracts raw text content directly from URLs without browser rendering
- Arguments:
url: URL of the target web page (text, JSON, XML, csv, tsv, etc.) (required)
- Best used for structured data formats or when fast, direct access is needed
- Arguments:
-
get-rendered-html: Fetches fully rendered HTML content using a headless browser
- Arguments:
url: URL of the target web page (required)
- Essential for modern web applications and SPAs that require JavaScript rendering
- Arguments:
-
get-markdown: Converts web page content to well-formatted Markdown
- Arguments:
url: URL of the target web page (required)
- Preserves structural elements while providing clean, readable text output
- Arguments:
-
get-markdown-from-media: Performs AI-powered content extraction from media files
- Arguments:
url: URL of the target media file (images, videos) (required)
- Utilizes computer vision and OCR for visual content analysis
- Requires a valid OPENAI_API_KEY to be set in environment variables
- Will return an error message if the API key is not set or if there are issues processing the media file
- Arguments:
Usage
Claude Desktop
To use with Claude Desktop, add the server configuration:
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"mcp-server-fetch-python": {
"command": "uvx",
"args": [
"mcp-server-fetch-python"
]
}
}
Environment Variables
The following environment variables can be configured:
- OPENAI_API_KEY: Required for using the
get-markdown-from-mediatool. This key is needed for AI-powered image analysis and content extraction. - PYTHONIOENCODING: Set to "utf-8" if you encounter character encoding issues in the output.
- MODEL_NAME: Specifies the model name to use. Defaults to "gpt-4o".
"mcpServers": {
"mcp-server-fetch-python": {
"command": "uvx",
"args": [
"mcp-server-fetch-python"
],
"env": {
"OPENAI_API_KEY": "sk-****",
"PYTHONIOENCODING": "utf-8",
"MODEL_NAME": "gpt-4o",
}
}
}
Local Installation
Alternatively, you can install and run the server locally:
git clone https://github.com/tatn/mcp-server-fetch-python.git
cd mcp-server-fetch-python
uv sync
uv build
Then add the following configuration to Claude Desktop config file:
"mcpServers": {
"mcp-server-fetch-python": {
"command": "uv",
"args": [
"--directory",
"path\\to\\mcp-server-fetch-python", # Replace with actual path to the cloned repository
"run",
"mcp-server-fetch-python"
]
}
}
Development
Debugging
You can start the MCP Inspector using npxwith the following commands:
npx @modelcontextprotocol/inspector uvx mcp-server-fetch-python
npx @modelcontextprotocol/inspector uv --directory path\\to\\mcp-server-fetch-python run mcp-server-fetch-python
Metadata
Release files for mcp-server-fetch-python 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_server_fetch_python-0.1.1.tar.gz | 72.0 kB | Without provenance | Details for mcp_server_fetch_python-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_server_fetch_python-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mcp_server_fetch_python-0.1.1-py3-none-any.whl |
Total release size: 78.5 kB
Release files / mcp_server_fetch_python-0.1.1.tar.gz
| Download URL | mcp_server_fetch_python-0.1.1.tar.gz |
|---|---|
| Size | 72.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b8bc86012f8d4c6d8a77a56260a7bb0ca15ab80728a32c076b4c2f8700c7d88
|
|
BLAKE2b-256 checksum How to use checksums |
2f3680d64cb9e8159a9237539513aae70323ff7005aa5f7921d7b006dd5db645
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.21
|
Release files / mcp_server_fetch_python-0.1.1-py3-none-any.whl
| Download URL | mcp_server_fetch_python-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88e467ff26db142d74930b705b49b75b2dad6fbc7324346a7df7a94eb5c781e3
|
|
BLAKE2b-256 checksum How to use checksums |
4d518401bafd1994494c3a95cfec788a3a42a21db348dc5d1ee1c464ef938029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.21
|
Security for mcp-server-fetch-python 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.