Skip to main content
Glama
dmitriiweb

article-scraper-mcp

by dmitriiweb
README.md
# 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:

```bash
uvx article-scraper-mcp
```

## Usage

Add to your MCP client configuration:

```json
{
  "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 title
- `text`: Article content text
- `author`: 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 parsed
- `requests.RequestException`: If HTTP request fails

## Requirements

- Python 3.11+
- newspaper3k
- requests
- loguru
- mcp[cli]

## License

MIT

TDQS

A4.1/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no possibility of confusion between tools. The purpose is singular and clear.

Naming Consistency5/5

With only one tool, naming consistency is not an issue. The name 'fetch_article' follows a clear verb_noun pattern.

Tool Count3/5

One tool is minimal for a server named 'article-scraper-mcp', which might imply more features like batch fetching or source listing. However, the tool is functional and well-defined, so it is borderline acceptable.

Completeness4/5

The single tool covers the core operation of fetching a structured article from a URL. Minor gaps exist, such as lack of support for multiple articles or error handling variations, but the basic use case is fully addressed.

Maintenance

ActivityInactive
ResponsivenessUnresponsive