@kazuph/mcp-fetch
MCPフェッチ
ウェブコンテンツの取得と画像処理のためのモデルコンテキストプロトコル(MCP)サーバー。これにより、Claude Desktop(または任意のMCPクライアント)はウェブコンテンツを取得し、画像を適切に処理できるようになります。
クイックスタート(ユーザー向け)
このツールを Claude Desktop で使用するには、Claude Desktop の構成 ( ~/Library/Application Support/Claude/claude_desktop_config.json ) に以下を追加するだけです。
{
"tools": {
"fetch": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-fetch"]
}
}
}これにより、必要に応じてツールの最新バージョンが自動的にダウンロードされ、実行されます。
必要な設定
Claude のアクセシビリティを有効にする:
システム設定を開く
「プライバシーとセキュリティ」>「アクセシビリティ」へ移動
「+」ボタンをクリック
アプリケーションフォルダからClaudeを追加します
クロードのトグルをオンにする
自動クリップボード操作 (Cmd+V) が適切に機能するには、このアクセシビリティ設定が必要です。
Related MCP server: OpenAI Agents MCP Server
特徴
Webコンテンツ抽出:Webコンテンツを自動的に抽出し、マークダウンとしてフォーマットします
記事タイトル抽出:記事のタイトルを抽出して表示します
画像処理: ウェブページからの画像を最適化してオプションで処理します (デフォルトでは無効、
enableFetchImages: trueで有効)ページネーションのサポート: テキストと画像の両方のページネーションをサポートします
JPEG 最適化: パフォーマンス向上のため、画像を JPEG として自動的に最適化します。
GIFサポート:アニメーションGIFから最初のフレームを抽出します
開発者向け
次のセクションは、ツールを開発または変更したい人向けです。
前提条件
Node.js 18歳以上
macOS(クリップボード操作用)
Claude Desktop ( https://claude.ai/desktopからインストール)
tsx (
npm install -g tsxでインストール)
インストール
git clone https://github.com/kazuph/mcp-fetch.git
cd mcp-fetch
npm install
npm run build画像処理仕様
Web コンテンツから画像を処理する場合、次の最適化が適用されます。
画像は品質管理されたJPEG形式に変換されます
最大幅はデフォルトで1200ピクセルに制限されています
デフォルトでは最大高さは1600ピクセルに制限されています
圧縮率を向上させるクロマサブサンプリング(4:2:0)
ファイルサイズを小さくするためのMozJPEGの最適化
構成
Claude Desktop がインストールされ、実行されていることを確認してください。
まだインストールしていない場合は、tsx をグローバルにインストールします。
npm install -g tsx
# or
pnpm add -g tsxClaude Desktop の設定を変更してください:
~/Library/Application Support/Claude/claude_desktop_config.json
これは、Claude Desktop メニューから簡単に見つけることができます。
クロードデスクトップを開く
MacのメニューバーでClaudeをクリック
「設定」をクリック
「開発者」をクリック
MCP クライアントの構成に以下を追加します。
{
"tools": {
"fetch": {
"args": ["tsx", "/path/to/mcp-fetch/index.ts"]
}
}
}利用可能なパラメータ
url(必須): 取得するURLmaxLength(デフォルト: 20000): 返されるコンテンツの最大長startIndex(デフォルト: 0): コンテンツ内の開始位置imageStartIndex(デフォルト: 0): 画像コレクションの開始位置raw(デフォルト: false): 処理済みのマークダウンではなく生のコンテンツを返すimageMaxCount(デフォルト: 3): リクエストごとに処理する画像の最大数imageMaxHeight(デフォルト: 4000): 結合された画像の最大高さimageMaxWidth(デフォルト: 1000): 結合画像の最大幅imageQuality(デフォルト:80):JPEG品質(1~100)enableFetchImages(デフォルト: false): 画像の取得と処理を有効にします。CLAUDE ユーザーのみ: この機能を有効にすることができます。CLAUDE は画像を取得して処理できます。この機能をお楽しみください。ignoreRobotsTxt(デフォルト: false): robots.txt の制限を無視します
例
基本的なコンテンツの取得(画像なし)
{
"url": "https://example.com"
}画像を有効にして取得する
{
"url": "https://example.com",
"enableFetchImages": true,
"imageMaxCount": 3
}画像のページ区切り
{
"url": "https://example.com",
"enableFetchImages": true,
"imageStartIndex": 3,
"imageMaxCount": 3
}注記
このツールは、macOS 固有のクリップボード操作に依存しているため、macOS 専用に設計されています。
画像は、最適なパフォーマンスと品質を実現するために Sharp を使用して処理されます。
複数の画像が見つかった場合は、サイズ制限を考慮して垂直に結合されます。
アニメーション GIF は、最初のフレームを抽出することによって自動的に処理されます。
変更履歴
バージョン1.1.3
デフォルトの動作を変更しました: デフォルトでは画像は取得されません (
enableFetchImages: false)enableFetchImagesパラメータを優先してdisableImagesを削除しました
バージョン1.1.0
記事タイトル抽出機能を追加
記事のタイトルを含むように回答のフォーマットを改善しました
MCP 応答コンテンツのタイプに関する問題を修正しました
バージョン1.0.0
初回リリース
Webコンテンツの抽出
画像処理と最適化
ページネーションのサポート
Available Tools
1 toolimageFetchA
画像取得に強いMCPフェッチツール。記事本文をMarkdown化し、ページ内の画像を抽出・最適化して返します。
新APIの既定(imagesを指定した場合)
画像: 取得してBASE64で返却(最大3枚を縦結合した1枚JPEG)
保存: しない(オプトイン)
クロスオリジン: 許可(CDN想定)
パラメータ(新API)
url: 取得先URL(必須)
images: true | { output, layout, maxCount, startIndex, size, originPolicy, saveDir }
output: "base64" | "file" | "both"(既定: base64)
layout: "merged" | "individual" | "both"(既定: merged)
maxCount/startIndex(既定: 3 / 0)
size: { maxWidth, maxHeight, quality }(既定: 1000/1600/80)
originPolicy: "cross-origin" | "same-origin"(既定: cross-origin)
text: { maxLength, startIndex, raw }(既定: 20000/0/false)
security: { ignoreRobotsTxt }(既定: false)
旧APIキー(enableFetchImages, returnBase64, saveImages, imageMax*, imageStartIndex 等)は後方互換のため引き続き受け付けます(非推奨)。
Examples(新API) { "url": "https://example.com", "images": true }
{ "url": "https://example.com", "images": { "output": "both", "layout": "both", "maxCount": 4 } }
Examples(旧API互換) { "url": "https://example.com", "enableFetchImages": true, "returnBase64": true, "imageMaxCount": 2 }
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| maxLength | No | ||
| startIndex | No | ||
| imageStartIndex | No | ||
| raw | No | ||
| imageMaxCount | No | ||
| imageMaxHeight | No | ||
| imageMaxWidth | No | ||
| imageQuality | No | ||
| enableFetchImages | No | ||
| allowCrossOriginImages | No | ||
| ignoreRobotsTxt | No | ||
| saveImages | No | ||
| returnBase64 | No | ||
| images | No | ||
| text | No | ||
| security | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It details behavioral traits: images are fetched, base64 returned (default), max 3 images merged into one JPEG, no save unless opted in, cross-origin allowed, and old API compatibility. Absent are rate limits or auth needs, but core behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is lengthy (≈250 words) but well-structured with sections for defaults, parameters, and examples. It is front-loaded with purpose but contains redundant details (e.g., repeating default values in both text and examples). Could be more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (17 parameters, nested objects, no output schema), the description provides extensive detail on new API behavior, defaults, and legacy support. Includes examples. Does not explicitly explain return format beyond base64 and Markdown, but contextually sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must compensate. It lists parameters for the new API (images object with output, layout, maxCount, etc.) and mentions old keys. It covers defaults and options, though some top-level schema parameters (e.g., maxLength, startIndex) are explained only under the text object, causing slight ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it is an MCP fetch tool specialized for image acquisition, converting article text to Markdown and extracting/optimizing images. It specifies verb+resource (fetch and process web pages with images) and no sibling tools exist, so no differentiation needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use (for fetching pages with images) and provides detailed parameter behavior for both new and legacy APIs. It does not explicitly exclude scenarios but offers enough context for appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.6.2- Changed
imageFetch4 fields changed- added
Input schema / properties / allowCrossOriginImagesAdded value: +{ + "default": true, + "type": [ + "boolean", + "string" + ] +} - added
Input schema / properties / imagesAdded value: +{ + "anyOf": [ + { + "type": "boolean" + }, + { + "additionalProperties": false, + "properties": { + "layout": { + "enum": [ + "merged", + "individual", + "both" + ], + "type": "string" + }, + "maxCount": { + "maximum": 10, + "minimum": 0, + "type": "integer" + }, + "originPolicy": { + "enum": [ + "cross-origin", + "same-origin" + ], + "type": "string" + }, + "output": { + "enum": [ + "base64", + "file", + "both" + ], + "type": "string" + }, + "saveDir": { + "type": "string" + }, + "size": { + "additionalProperties": false, + "properties": { + "maxHeight": { + "maximum": 10000, + "minimum": 100, + "type": "integer" + }, + "maxWidth": { + "maximum": 10000, + "minimum": 100, + "type": "integer" + }, + "quality": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + "type": "object" + }, + "startIndex": { + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + } + ] +} - added
Input schema / properties / securityAdded value: +{ + "additionalProperties": false, + "properties": { + "ignoreRobotsTxt": { + "type": "boolean" + } + }, + "type": "object" +} - added
Input schema / properties / textAdded value: +{ + "additionalProperties": false, + "properties": { + "maxLength": { + "exclusiveMinimum": 0, + "maximum": 1000000, + "type": "integer" + }, + "raw": { + "type": "boolean" + }, + "startIndex": { + "minimum": 0, + "type": "integer" + } + }, + "type": "object" +}
1 tool update
v1.0.0- First observed
imageFetch
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between tools. The tool's purpose is clearly defined and distinct.
The single tool name 'imageFetch' is descriptive and follows a verb_noun pattern. There is no inconsistency since only one tool exists.
While the server has only one tool, it is a complex and well-documented tool that handles a wide range of functionality appropriate for its fetch-image purpose. The count is slightly below the typical range but not insufficient.
The tool comprehensively covers fetching web pages, extracting images, and outputting them in various formats (base64, file, merged, individual). It includes parameters for text extraction and security, leaving no apparent gaps for its stated purpose.
Maintenance
Related MCP Connectors
MCP server for Firecrawl — web search, scraping, and biomedical/arXiv paper search.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.1162MIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude users to access specialized OpenAI agents (web search, file search, computer actions) and a multi-agent orchestrator through the MCP protocol.410-
- AlicenseAqualityDmaintenanceModel Context Protocol server that enables Claude Desktop (or any MCP client) to fetch web content and process images appropriately.1141 npmMIT
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server that enables Claude or other LLMs to fetch content from URLs, supporting HTML, JSON, text, and images with configurable request parameters.33MIT