web2md-mcp
by seaair-t
README.md
# web2md-mcp
MCP server that fetches any web URL and converts it to clean Markdown via the
[web2md](https://seaair-web2md.ms.show) service (Crawl4AI backend). Designed to
be hosted on the **ModelScope MCP Hub** so any pure-network MCP client can call
it without running anything locally.
## What it does
Exposes one tool `fetch(url, quality, anti_bot)` → returns
`{success, markdown, html, metadata}`. It does **not** bundle Crawl4AI; it
calls the already-deployed web2md REST API (`/v1/fetch`), so the hosted image
stays tiny and deploys fast.
## ModelScope MCP Hub — 可托管部署 (recommended)
Per the official MCP creation doc, hosted deployment of a Python server requires
a **PyPI package invoked via `uvx`** (GitHub/Docker sources are NOT supported
for hosted deployment). This package is published to PyPI as `web2md-mcp`.
Create the MCP service (自定义创建 → 可托管部署) and paste this **STDIO** config.
The Hub auto-extracts the `env` block into its env-var form:
```json
{
"mcpServers": {
"web2md": {
"command": "uvx",
"args": ["web2md-mcp"],
"env": {
"WEB2MD_BASE": "https://seaair-web2md.ms.show",
"WEB2MD_API_KEY": "<WEB2MD_API_KEY>"
}
}
}
}
```
The Hub runs `uvx web2md-mcp` inside its FC runtime (STDIO transport), connects,
and exposes a public endpoint `https://mcp.api-inference.modelscope.net/<id>/mcp`.
Fill the real key in `<WEB2MD_API_KEY>` when creating.
> Note: the config JSON must contain **no comments** — the Hub's validator
> rejects commented JSON.
## Self-host (local / Docker, optional)
```bash
pip install web2md-mcp
WEB2MD_API_KEY=web2md-bcce3f564124cb40ff41244b6597a209 web2md-mcp
# then point your client at the resulting MCP server (stdio)
```
Or build the Docker image (for your own registry / FC custom image):
```dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY web2md_mcp.py .
CMD ["python", "web2md_mcp.py"]
```
## Env vars
| Key | Default | Description |
|---|---|---|
| `WEB2MD_BASE` | `https://seaair-web2md.ms.show` | web2md REST base URL |
| `WEB2MD_API_KEY` | (empty) | your web2md API key |
## Tool
`fetch(url, quality="fast", anti_bot="auto")` → `{success, markdown, html, metadata}`
TDQS
A4.1/5.0
Scored across 1 tool
Disambiguation5/5
Only one tool exists, so there is no possibility of confusion or overlap. The tool's purpose is clearly defined and distinct.
Naming Consistency5/5
With a single tool named 'fetch', there is no inconsistency or mixed conventions. The name is a clear verb that matches its action.
Tool Count3/5
A single tool is on the thin side, but it is appropriate for a focused web-to-Markdown service. The minimal surface aligns with the server's narrow scope, though more tools could be added for broader utility.
Completeness5/5
The fetch tool fully covers the stated purpose of converting a web page to clean Markdown. There are no obvious gaps for the core use case, as the operation is self-contained.
Maintenance
ActivityStale
ResponsivenessNo issues