Metadata-Version: 2.5
Name: url-content-extractor
Version: 0.1.4
Summary: An MCP server that extracts text content from web pages
Requires-Python: >=3.14
Requires-Dist: beautifulsoup4>=4.15.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: mcp[cli]<3,>=2.2.0
Description-Content-Type: text/markdown

# URL Content Extractor

A local MCP server providing the `fetch_url_content` tool. It fetches HTTP/HTTPS pages, removes common non-content HTML elements, and returns text with a source URL.

## Requirements

Python 3.14 or later. This release uses the official MCP Python SDK 2.x.

## Run

```sh
uvx url-content-extractor
```

The server uses stdio and waits for an MCP client; it is not an interactive terminal application.

## MCP client configuration

```json
{
  "mcpServers": {
    "url-content-extractor": {
      "command": "uvx",
      "args": ["url-content-extractor"]
    }
  }
}
```

## Tool

`fetch_url_content(url: str)` accepts an HTTP or HTTPS URL. Requests follow redirects and use a 30-second timeout for network operations. Normal results are limited to 5000 characters including the source URL. Failures return a short Chinese error message.

This is basic HTML text extraction, not a browser: JavaScript is not executed, and navigation or advertising text may remain. The return limit does not limit download size. URLs are fetched from the machine running the server; use it with trusted callers and URLs.

## 0.1.4

Updated implementation based on MCP Python SDK 2.x; URL validation, content-type checks, text cleanup, concise errors, and a packaged stdio command entry point.
