MCP server that fetches article data (title, text, author, date) from a URL using newspaper3k
Project description
Article Scraper MCP
A Model Context Protocol (MCP) server that fetches article data from URLs using newspaper3k.
Features
- Extract article title, text, author, and publication date
- Robust error handling and URL validation
- Structured data output
- Built with FastMCP for easy integration
Installation
Install directly from PyPI:
uvx article-scraper-mcp
Usage
Add to your MCP client configuration:
{
"mcpServers": {
"article-scraper": {
"command": "uvx",
"args": ["article-scraper-mcp"]
}
}
}
API
fetch_article(url: str) -> dict[str, Any]
Fetches and parses a news article from the given URL.
Parameters:
url: The URL of the news article to fetch
Returns: A dictionary containing:
title: Article titletext: Article content textauthor: Author name(s) (may be None)date: Publication date in ISO format (may be None)
Raises:
ValueError: If URL is invalid or article cannot be parsedrequests.RequestException: If HTTP request fails
Requirements
- Python 3.11+
- newspaper3k
- requests
- loguru
- mcp[cli]
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file article_scraper_mcp-1.0.0.tar.gz.
File metadata
- Download URL: article_scraper_mcp-1.0.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8472faf8b417bb922458b1fb0b68f5c488b476ab932092227656c38a744d37ef
|
|
| MD5 |
2da083cc93e0beb282dd5bfed9260d7e
|
|
| BLAKE2b-256 |
30f1d87ac63cc6e0b433a5d5c062cef230cf07f55b637d1ad6eaa1b9d0c384aa
|
File details
Details for the file article_scraper_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: article_scraper_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a5eb3fb01b6a8eaf8aa24604ed34de973768012a1aab9227f20542b73e5d87b
|
|
| MD5 |
d7ba52be1cf3632eadbdb9bf2be07015
|
|
| BLAKE2b-256 |
4c327b43817cf157701438f0815339c755182690a3f05a9be1ccb9ae98b6ac64
|