Fetch MCP Server
OfficialFetch MCPサーバー
Webコンテンツ取得機能を提供するModel Context Protocolサーバーです。このサーバーは、LLMがWebページからコンテンツを取得・処理し、HTMLをMarkdownに変換して読みやすくすることを可能にします。
[!CAUTION] このサーバーはローカル/内部IPアドレスにアクセスできるため、セキュリティ上のリスクとなる可能性があります。このMCPサーバーを使用する際は、機密データが漏洩しないよう十分注意してください。
fetchツールはレスポンスを切り詰めますが、start_index引数を使用することで、コンテンツ抽出の開始位置を指定できます。これにより、モデルは必要な情報が見つかるまで、Webページをチャンク単位で読み取ることができます。
利用可能なツール
fetch- インターネットからURLを取得し、その内容をMarkdownとして抽出します。url(文字列、必須): 取得するURLmax_length(整数、オプション): 返す最大文字数 (デフォルト: 5000)start_index(整数、オプション): この文字インデックスからコンテンツを開始 (デフォルト: 0)raw(ブール値、オプション): Markdown変換を行わずに生のコンテンツを取得 (デフォルト: false)
プロンプト
fetch
URLを取得し、その内容をMarkdownとして抽出します
引数:
url(文字列、必須): 取得するURL
インストール
オプション: node.jsをインストールすると、fetchサーバーはより堅牢な別のHTML簡略化ツールを使用するようになります。
uvを使用する場合 (推奨)
uvを使用する場合、特別なインストールは不要です。uvxを使用して直接mcp-server-fetchを実行します。
PIPを使用する場合
あるいは、pip経由でmcp-server-fetchをインストールすることもできます:
pip install mcp-server-fetchインストール後、以下のスクリプトとして実行できます:
python -m mcp_server_fetchRelated MCP server: MCP Fetch
設定
Claude.appの設定
Claudeの設定に追加してください:
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}{
"mcpServers": {
"fetch": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/fetch"]
}
}
}{
"mcpServers": {
"fetch": {
"command": "python",
"args": ["-m", "mcp_server_fetch"]
}
}
}VS Codeの設定
クイックインストールには、以下のワンクリックインストールボタンを使用してください...
手動インストールを行う場合は、VS Codeのユーザー設定 (JSON) ファイルに以下のJSONブロックを追加してください。Ctrl + Shift + Pを押してPreferences: Open User Settings (JSON)と入力することで開けます。
オプションとして、ワークスペース内の.vscode/mcp.jsonというファイルに追加することもできます。これにより、設定を他のユーザーと共有できるようになります。
mcp.jsonファイルを使用する場合は、mcpキーが必要であることに注意してください。
{
"mcp": {
"servers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
}{
"mcp": {
"servers": {
"fetch": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/fetch"]
}
}
}
}カスタマイズ - robots.txt
デフォルトでは、サーバーはリクエストがモデルから(ツール経由で)行われた場合はWebサイトのrobots.txtに従いますが、ユーザーが開始した(プロンプト経由の)リクエストの場合は従いません。これは、設定のargsリストに--ignore-robots-txt引数を追加することで無効にできます。
カスタマイズ - User-agent
デフォルトでは、リクエストがモデルから(ツール経由で)行われたか、ユーザーが開始した(プロンプト経由の)かによって、サーバーは以下のいずれかのユーザーエージェントを使用します。
ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)または
ModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)これは、設定のargsリストに--user-agent=YourUserAgent引数を追加することでカスタマイズできます。
カスタマイズ - プロキシ
サーバーは、--proxy-url引数を使用してプロキシを使用するように設定できます。
Windowsの設定
Windowsでタイムアウトの問題が発生する場合は、適切な文字エンコーディングを確保するためにPYTHONIOENCODING環境変数を設定する必要があるかもしれません:
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}{
"mcpServers": {
"fetch": {
"command": "python",
"args": ["-m", "mcp_server_fetch"],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}これにより、Windowsシステムでサーバーがタイムアウトする原因となる文字エンコーディングの問題に対処できます。
デバッグ
MCPインスペクターを使用してサーバーをデバッグできます。uvxインストールの場合は以下を使用します:
npx @modelcontextprotocol/inspector uvx mcp-server-fetchまたは、パッケージを特定のディレクトリにインストールしている場合や、開発中の場合は以下を使用します:
cd path/to/servers/src/fetch
npx @modelcontextprotocol/inspector uv run mcp-server-fetch貢献
mcp-server-fetchの拡張と改善にご協力ください。新しいツールの追加、既存機能の強化、ドキュメントの改善など、どのような貢献も歓迎します。
他のMCPサーバーの例や実装パターンについては、以下を参照してください: https://github.com/modelcontextprotocol/servers
プルリクエストをお待ちしています!mcp-server-fetchをより強力で便利なものにするための新しいアイデア、バグ修正、機能強化をぜひお寄せください。
ライセンス
mcp-server-fetchはMITライセンスの下でライセンスされています。これは、MITライセンスの条件に従う限り、ソフトウェアを自由に使用、変更、配布できることを意味します。詳細については、プロジェクトリポジトリ内のLICENSEファイルを参照してください。
Available Tools
1 toolfetchBRead-onlyIdempotent
Fetches a URL from the internet and optionally extracts its contents as markdown.
Although originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.
Inputs: url (required), raw, max_length, timeout_ms, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of confusion with another operation. The tool's purpose (fetch a URL, optionally convert to markdown) is unambiguous.
The single name 'fetch' is a clear verb that directly describes the action, and there are no competing conventions to clash with it. Nothing inconsistent exists in the namespace.
The server's scope (retrieve web content) is genuinely served by a single tool, so one tool is defensible rather than bloated. It is still thinner than a typical 3-15 tool surface, leaving little room for specialized variants.
A fetch tool covers the core operation of an internet-access server, including raw and markdown output modes. Minor gaps exist around request customization (headers, methods, or batching multiple URLs) that an agent cannot work around.
Maintenance
Related MCP Connectors
Turn web page URLs into clean, LLM-ready Markdown. Plain HTTP, no browser.
Turn public web pages into clean Markdown for LLMs, RAG and AI agents
Turn any web page URL or HTML into clean Markdown or plain text for an LLM to read.
Web scraping for AI agents. Converts URLs to clean, LLM-ready Markdown with anti-bot bypass.
Related MCP Servers
AlicenseBqualityDmaintenanceThis server converts webpages into clean, structured Markdown optimized for language model consumption, removing unnecessary content and supporting JavaScript rendering.112MIT- AlicenseBqualityDmaintenanceA Model Context Protocol server that allows LLMs to retrieve and convert web content to markdown without robots.txt restrictions.12MIT
- AlicenseAqualityDmaintenanceAn MCP server that fetches web pages and extracts clean, AI-friendly Markdown content using Mozilla Readability. It provides secure web access for LLMs with built-in SSRF protection and automated content cleaning for improved context retrieval and summarization.1221 npmMIT
- AlicenseNot gradedqualityBmaintenanceConverts web pages to Markdown for MCP clients like Claude, with support for single and batch reads, caching, fallback rendering, and SSRF protection.35 npmMIT