Skip to main content
Glama
xiaocang

mcp-fetch-ya

by xiaocang
README.md
# mcp-fetch-ya

A Model Context Protocol (MCP) server for fetching web content and converting HTML to markdown.

## Features

- **HTML to Markdown** - Automatically extracts main content using Readability and converts to clean markdown
- **robots.txt Compliance** - Respects robots.txt by default (configurable)
- **Custom User-Agent** - Configurable User-Agent string
- **Proxy Support** - Optional HTTP/HTTPS proxy configuration

## Installation

```bash
npm install -g mcp-fetch-ya@latest
```

Or use directly with npx:

```bash
npx mcp-fetch-ya@latest
```

## Usage with Claude Desktop

Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["mcp-fetch-ya@latest"]
    }
  }
}
```

### With options

```json
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": [
        "mcp-fetch-ya@latest",
        "--ignore-robots-txt",
        "--user-agent", "MyBot/1.0"
      ]
    }
  }
}
```

### With proxy

```json
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": [
        "mcp-fetch-ya@latest",
        "--proxy-url", "http://proxy.example.com:8080"
      ]
    }
  }
}
```

## Tool: fetch_ya

If the built-in web fetch tool fails, you can retry with this MCP tool as a fallback. Fetches a URL and returns the content. HTML pages are converted to markdown for easier reading.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | string | Yes | - | The URL to fetch |
| `raw` | boolean | No | false | Return raw content without markdown conversion |

### CLI Options

| Option | Description |
|--------|-------------|
| `--user-agent <agent>` | Custom User-Agent string |
| `--proxy-url <url>` | Proxy URL for requests |
| `--ignore-robots-txt` | Ignore robots.txt restrictions |

## License

MIT

TDQS

A4.4/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so no possible confusion between tools. The purpose is clear: it fetches a URL as a fallback.

Naming Consistency5/5

With a single tool, there is no inconsistency in naming. 'fetch_ya' follows a simple verb-based convention and is recognizable.

Tool Count3/5

One tool is extremely minimal and may feel thin, but it exactly matches the narrow fallback-fetch scope. It sits in the borderline range for tool count.

Completeness5/5

For its stated purpose of acting as a fallback URL fetcher, the tool fully covers the operation: fetch, convert to markdown, and return content. No obvious gaps exist for this narrow domain.

Maintenance

ActivityInactive
ResponsivenessNo issues