
zcaceres/fetch-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
柔軟なHTTPフェッチモデルコンテキストプロトコルサーバーです。
概要
HTML、JSON、プレーンテキスト、Markdown、読みやすい記事内容、YouTubeトランスクリプトなど複数のフォーマットでウェブコンテンツを取得するためのMCPサーバーです。 すべてのツールは以下の共通パラメータを受け入れています: - — ウェブサイトを取得し、その生のHTMLコンテンツを返します。 - — ウェブサイトを取得し、そのコンテンツをMarkdownに変換して返送します。 - — ウェブサイトを取得し、HTMLタグ、スクリプト、スタイルを削除したプレーンテキストを返します。 - — URLを取得してJSON応答を返します。 - — ウェブサイトを取得し、Mozilla Readabilityを使ってメイン記事の内容を抽出し、Markdownとして返す。ナビゲーション、広告、定型文を除外する。記事やブログ投稿に最適です。 - — YouTube動画のキャプション/文字起こしを取得する。利用可能な場合はyt-dlpを使用し、それ以外はページから直接抽出する。キャプション言語を選択するための追加のlangパラメータ(デフォルト:「en」)を受け入れる。
概要(AI 翻訳)
HTML、JSON、プレーンテキスト、Markdown、読みやすい記事内容、YouTubeトランスクリプトなど複数のフォーマットでウェブコンテンツを取得するためのMCPサーバーです。
道具
すべてのツールは以下の共通パラメータを受け入れています:
| パラメータ | タイプ | 必要 | 説明 |
|---|---|---|---|
url |
文字列 | はい | 取るURLを |
headers |
オブジェクト | いいえ | リクエストに含まれるカスタムヘッダー |
max_length |
番号 | いいえ | 戻す文字数(デフォルト:5000) |
start_index |
番号 | いいえ | この文字インデックスから始めます(デフォルト:0) |
proxy |
文字列 | いいえ | プロキシURL(例:http://proxy:8080) |
-
fetch_html — ウェブサイトを取得し、その生のHTMLコンテンツを返します。
-
fetch_markdown — ウェブサイトを取得し、そのコンテンツをMarkdownに変換して返送します。
-
fetch_txt — ウェブサイトを取得し、HTMLタグ、スクリプト、スタイルを削除したプレーンテキストを返します。
-
fetch_json — URLを取得してJSON応答を返します。
-
fetch_readable — ウェブサイトを取得し、Mozillaの可読性を使ってメイン記事の内容を抽出し、Markdownとして返す。ナビゲーション、広告、定型文を剥がす。記事やブログ投稿に最適です。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Fetch MCP Server
An MCP server for fetching web content in multiple formats — HTML, JSON, plain text, Markdown, readable article content, and YouTube transcripts.
Tools
All tools accept the following common parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
url |
string | Yes | URL to fetch |
headers |
object | No | Custom headers to include in the request |
max_length |
number | No | Maximum characters to return (default: 5000) |
start_index |
number | No | Start from this character index (default: 0) |
proxy |
string | No | Proxy URL (e.g. http://proxy:8080) |
-
fetch_html — Fetch a website and return its raw HTML content.
-
fetch_markdown — Fetch a website and return its content converted to Markdown.
-
fetch_txt — Fetch a website and return plain text with HTML tags, scripts, and styles removed.
-
fetch_json — Fetch a URL and return the JSON response.
-
fetch_readable — Fetch a website and extract the main article content using Mozilla Readability, returned as Markdown. Strips navigation, ads, and boilerplate. Ideal for articles and blog posts.
-
fetch_youtube_transcript — Fetch a YouTube video’s captions/transcript. Uses
yt-dlpif available, otherwise extracts directly from the page. Accepts an additionallangparameter (default:"en") to select the caption language.
Installation
As an MCP server
Add to your MCP client configuration:
{
"mcpServers": {
"fetch": {
"command": "npx",
"args": ["mcp-fetch-server"]
}
}
}
As a CLI
npx mcp-fetch [flags]
Or install globally:
npm install -g mcp-fetch-server
mcp-fetch [flags]
CLI Usage
mcp-fetch [flags]
Commands
| Command | Description |
|---|---|
html |
Fetch a URL and return raw HTML |
markdown |
Fetch a URL and return Markdown |
readable |
Fetch a URL and return article content as Markdown (via Readability) |
txt |
Fetch a URL and return plain text |
json |
Fetch a URL and return JSON |
youtube |
Fetch a YouTube video transcript |
Flags
| Flag | Description |
|---|---|
--max-length |
Maximum characters to return |
--start-index |
Start from this character index |
--proxy |
Proxy URL |
--lang |
Language code for YouTube transcripts (default: en) |
--help |
Show help message |
--version |
Show version |
Examples
# Fetch a page as markdown
インストール
npx mcp-fetch-server設定
{
"mcpServers": {
"fetch": {
"command": "npx",
"args": ["mcp-fetch-server"]
}
}
}