A Model Context Protocol server that provides web content

Fetch MCP Server

by modelcontextprotocol · MIT license · ★ 90,538 on GitHub · updated Sep 3

Fetch MCP Server cover

A Model Context Protocol server that provides web content fetching capabilities.

# Fetch MCP Server

<!-- mcp-name: io.github.modelcontextprotocol/server-fetch -->

A Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.

Source: https://github.com/modelcontextprotocol/servers/tree/main/src/fetch

Requires MCP Python SDK 1.x (`mcp>=1.29.0,<2`). SDK 2.0 renamed APIs this server uses. The port to v2 is in progress.

> [!CAUTION]
> This server can access local/internal IP addresses and may represent a security risk. Exercise caution when using this MCP server to ensure this does not expose any sensitive data.

The fetch tool will truncate the response, but by using the `start_index` argument, you can specify where to start the content extraction. This lets models read a webpage in chunks, until they find the information they need.

### Available Tools

- `fetch` - Fetches a URL from the internet and extracts its contents as markdown.

Overview

A Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.

Manual install (npx, ZIP)
Claude Codemkdir -p ~/.claude/agents && curl -sL https://raw.githubusercontent.com/modelcontextprotocol/servers/f46d9578190b476b3501923ea8977d899e8db2cb/src/fetch/README.md \ -o ~/.claude/agents/README.md
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\agents" | Out-Null; Invoke-WebRequest "https://raw.githubusercontent.com/modelcontextprotocol/servers/f46d9578190b476b3501923ea8977d899e8db2cb/src/fetch/README.md" -OutFile "$HOME\.claude\agents\README.md"

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • README.md7.5 KB
Read the files here
modelcontextprotocol/f46d9571 file
README.md
Show the full text246 lines

Fetch MCP Server

A Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.

Source: https://github.com/modelcontextprotocol/servers/tree/main/src/fetch

Requires MCP Python SDK 1.x (mcp>=1.29.0,<2). SDK 2.0 renamed APIs this server uses. The port to v2 is in progress.

[!CAUTION] This server can access local/internal IP addresses and may represent a security risk. Exercise caution when using this MCP server to ensure this does not expose any sensitive data.

The fetch tool will truncate the response, but by using the start_index argument, you can specify where to start the content extraction. This lets models read a webpage in chunks, until they find the information they need.

Available Tools
  • fetch - Fetches a URL from the internet and extracts its contents as markdown.
    • url (string, required): URL to fetch
    • max_length (integer, optional): Maximum number of characters to return (default: 5000)
    • start_index (integer, optional): Start content from this character index (default: 0)
    • raw (boolean, optional): Get raw content without markdown conversion (default: false)
Prompts
  • fetch
    • Fetch a URL and extract its contents as markdown
    • Arguments:
      • url (string, required): URL to fetch

Installation

Optionally: Install node.js, this will cause the fetch server to use a different HTML simplifier that is more robust.

When using uv no specific installation is needed. We will use uvx to directly run mcp-server-fetch.

Using PIP

Alternatively you can install mcp-server-fetch via pip:

pip install mcp-server-fetch

After installation, you can run it as a script using:

python -m mcp_server_fetch

Configuration

Configure for Claude.app

Add to your Claude settings:

Using uvx
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}
Using docker
{
  "mcpServers": {
    "fetch": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/fetch"]
    }
  }
}
Using pip installation
{
  "mcpServers": {
    "fetch": {
      "command": "python",
      "args": ["-m", "mcp_server_fetch"]
    }
  }
}
Configure for VS Code

For quick installation, use one of the one-click install buttons below...

Install with UV in VS Code Install with UV in VS Code Insiders

Install with Docker in VS Code Install with Docker in VS Code Insiders

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is needed when using the mcp.json file.

Using uvx
{
  "mcp": {
    "servers": {
      "fetch": {
        "command": "uvx",
        "args": ["mcp-server-fetch"]
      }
    }
  }
}
Using Docker
{
  "mcp": {
    "servers": {
      "fetch": {
        "command": "docker",
        "args": ["run", "-i", "--rm", "mcp/fetch"]
      }
    }
  }
}
Customization - robots.txt

By default, the server will obey a websites robots.txt file if the request came from the model (via a tool), but not if the request was user initiated (via a prompt). This can be disabled by adding the argument --ignore-robots-txt to the args list in the configuration.

Customization - User-agent

By default, depending on if the request came from the model (via a tool), or was user initiated (via a prompt), the server will use either the user-agent

ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)

or

ModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)

This can be customized by adding the argument --user-agent=YourUserAgent to the args list in the configuration.

Customization - Proxy

The server can be configured to use a proxy by using the --proxy-url argument.

Windows Configuration

If you're experiencing timeout issues on Windows, you may need to set the PYTHONIOENCODING environment variable to ensure proper character encoding:

Windows configuration (uvx)
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"],
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}
Windows configuration (pip)
{
  "mcpServers": {
    "fetch": {
      "command": "python",
      "args": ["-m", "mcp_server_fetch"],
      "env": {
        "PYTHONIOENCODING": "utf-8"
      }
    }
  }
}

This addresses character encoding issues that can cause the server to timeout on Windows systems.

Debugging

You can use the MCP inspector to debug the server. For uvx installations:

npx @modelcontextprotocol/inspector uvx mcp-server-fetch

Or if you've installed the package in a specific directory or are developing on it:

cd path/to/servers/src/fetch
npx @modelcontextprotocol/inspector uv run mcp-server-fetch

Contributing

We encourage contributions to help expand and improve mcp-server-fetch. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.

For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers

Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-fetch even more powerful and useful.

License

mcp-server-fetch is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

1# Fetch MCP Server
2 
3<!-- mcp-name: io.github.modelcontextprotocol/server-fetch -->
4 
5A Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.
6 
7Source: https://github.com/modelcontextprotocol/servers/tree/main/src/fetch
8 
9Requires MCP Python SDK 1.x (`mcp>=1.29.0,<2`). SDK 2.0 renamed APIs this server uses. The port to v2 is in progress.
10 
11> [!CAUTION]
12> This server can access local/internal IP addresses and may represent a security risk. Exercise caution when using this MCP server to ensure this does not expose any sensitive data.
13 
14The fetch tool will truncate the response, but by using the `start_index` argument, you can specify where to start the content extraction. This lets models read a webpage in chunks, until they find the information they need.
15 
16### Available Tools
17 
18- `fetch` - Fetches a URL from the internet and extracts its contents as markdown.
19 - `url` (string, required): URL to fetch
20 - `max_length` (integer, optional): Maximum number of characters to return (default: 5000)
21 - `start_index` (integer, optional): Start content from this character index (default: 0)
22 - `raw` (boolean, optional): Get raw content without markdown conversion (default: false)
23 
24### Prompts
25 
26- **fetch**
27 - Fetch a URL and extract its contents as markdown
28 - Arguments:
29 - `url` (string, required): URL to fetch
30 
31## Installation
32 
33Optionally: Install node.js, this will cause the fetch server to use a different HTML simplifier that is more robust.
34 
35### Using uv (recommended)
36 
37When using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed. We will
38use [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-fetch*.
39 
40### Using PIP
41 
42Alternatively you can install `mcp-server-fetch` via pip:
43 
44```
45pip install mcp-server-fetch
46```
47 
48After installation, you can run it as a script using:
49 
50```
51python -m mcp_server_fetch
52```
53 
54## Configuration
55 
56### Configure for Claude.app
57 
58Add to your Claude settings:
59 
60<details>
61<summary>Using uvx</summary>
62 
63```json
64{
65 "mcpServers": {
66 "fetch": {
67 "command": "uvx",
68 "args": ["mcp-server-fetch"]
69 }
70 }
71}
72```
73</details>
74 
75<details>
76<summary>Using docker</summary>
77 
78```json
79{
80 "mcpServers": {
81 "fetch": {
82 "command": "docker",
83 "args": ["run", "-i", "--rm", "mcp/fetch"]
84 }
85 }
86}
87```
88</details>
89 
90<details>
91<summary>Using pip installation</summary>
92 
93```json
94{
95 "mcpServers": {
96 "fetch": {
97 "command": "python",
98 "args": ["-m", "mcp_server_fetch"]
99 }
100 }
101}
102```
103</details>
104 
105### Configure for VS Code
106 
107For quick installation, use one of the one-click install buttons below...
108 
109[![Install with UV in VS Code](https://img.shields.io/badge/VS_Code-UV-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=fetch&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22mcp-server-fetch%22%5D%7D) [![Install with UV in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-UV-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=fetch&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22mcp-server-fetch%22%5D%7D&quality=insiders)
110 
111[![Install with Docker in VS Code](https://img.shields.io/badge/VS_Code-Docker-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=fetch&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Ffetch%22%5D%7D) [![Install with Docker in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Docker-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=fetch&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Ffetch%22%5D%7D&quality=insiders)
112 
113For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`.
114 
115Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others.
116 
117> Note that the `mcp` key is needed when using the `mcp.json` file.
118 
119<details>
120<summary>Using uvx</summary>
121 
122```json
123{
124 "mcp": {
125 "servers": {
126 "fetch": {
127 "command": "uvx",
128 "args": ["mcp-server-fetch"]
129 }
130 }
131 }
132}
133```
134</details>
135 
136<details>
137<summary>Using Docker</summary>
138 
139```json
140{
141 "mcp": {
142 "servers": {
143 "fetch": {
144 "command": "docker",
145 "args": ["run", "-i", "--rm", "mcp/fetch"]
146 }
147 }
148 }
149}
150```
151</details>
152 
153### Customization - robots.txt
154 
155By default, the server will obey a websites robots.txt file if the request came from the model (via a tool), but not if
156the request was user initiated (via a prompt). This can be disabled by adding the argument `--ignore-robots-txt` to the
157`args` list in the configuration.
158 
159### Customization - User-agent
160 
161By default, depending on if the request came from the model (via a tool), or was user initiated (via a prompt), the
162server will use either the user-agent
163```
164ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)
165```
166or
167```
168ModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)
169```
170 
171This can be customized by adding the argument `--user-agent=YourUserAgent` to the `args` list in the configuration.
172 
173### Customization - Proxy
174 
175The server can be configured to use a proxy by using the `--proxy-url` argument.
176 
177## Windows Configuration
178 
179If you're experiencing timeout issues on Windows, you may need to set the `PYTHONIOENCODING` environment variable to ensure proper character encoding:
180 
181<details>
182<summary>Windows configuration (uvx)</summary>
183 
184```json
185{
186 "mcpServers": {
187 "fetch": {
188 "command": "uvx",
189 "args": ["mcp-server-fetch"],
190 "env": {
191 "PYTHONIOENCODING": "utf-8"
192 }
193 }
194 }
195}
196```
197</details>
198 
199<details>
200<summary>Windows configuration (pip)</summary>
201 
202```json
203{
204 "mcpServers": {
205 "fetch": {
206 "command": "python",
207 "args": ["-m", "mcp_server_fetch"],
208 "env": {
209 "PYTHONIOENCODING": "utf-8"
210 }
211 }
212 }
213}
214```
215</details>
216 
217This addresses character encoding issues that can cause the server to timeout on Windows systems.
218 
219## Debugging
220 
221You can use the MCP inspector to debug the server. For uvx installations:
222 
223```
224npx @modelcontextprotocol/inspector uvx mcp-server-fetch
225```
226 
227Or if you've installed the package in a specific directory or are developing on it:
228 
229```
230cd path/to/servers/src/fetch
231npx @modelcontextprotocol/inspector uv run mcp-server-fetch
232```
233 
234## Contributing
235 
236We encourage contributions to help expand and improve mcp-server-fetch. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
237 
238For examples of other MCP servers and implementation patterns, see:
239https://github.com/modelcontextprotocol/servers
240 
241Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-fetch even more powerful and useful.
242 
243## License
244 
245mcp-server-fetch is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
246 
View all files on GitHub →

Details

Updated
Sep 3, 2026
License
MIT
Stars on the repo
★ 90,538
Checked
Source
modelcontextprotocol/servers ↗
Creator
modelcontextprotocol · 7 listings
View creator

Similar MCP servers

See all →
SkillTests in real browsers via Chrome DevTools MCPBrowser testing with devtoolsaddyosmani/agent-skills · by addyosmaniTests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.★ 98.7k GitHub starsMCPThis MCP server attempts to exercise all the featuresEverything MCP Servermodelcontextprotocol/servers · by modelcontextprotocolThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test…★ 90.5k GitHub starsMCPNode.js server implementing Model Context ProtocolFilesystem MCP Servermodelcontextprotocol/servers · by modelcontextprotocolNode.js server implementing Model Context Protocol (MCP) for filesystem operations.★ 90.5k GitHub starsSkillAbout libraries, frameworks, API referencesContext7 MCPupstash/context7 · by upstashThis skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.★ 62.3k GitHub starsSkillUses Chrome DevTools via MCP for efficient debuggingChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsUses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to `--slim` mode (MCP configuration).★ 52.4k GitHub starsMCPLets your AI drive a real Chrome with DevTools: performanceChrome devtools MCPChromeDevTools/chrome-devtools-mcp · by ChromeDevToolsLets your AI drive a real Chrome with DevTools: performance traces, network requests, console and screenshots.★ 52.4k GitHub stars

More from modelcontextprotocol

MCPThis MCP server attempts to exercise all the featuresEverything MCP Servermodelcontextprotocol/servers · by modelcontextprotocolThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test…★ 90.5k GitHub starsMCPNode.js server implementing Model Context ProtocolFilesystem MCP Servermodelcontextprotocol/servers · by modelcontextprotocolNode.js server implementing Model Context Protocol (MCP) for filesystem operations.★ 90.5k GitHub starsMCPA basic implementation of persistent memory using a localKnowledge Graph Memory Servermodelcontextprotocol/servers · by modelcontextprotocolA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across…★ 90.5k GitHub starsMCPA Model Context Protocol server for Git repositorymcp-server-git: A git MCP servermodelcontextprotocol/servers · by modelcontextprotocolA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate…★ 90.5k GitHub starsMCPAn MCP server implementation that provides a toolSequential Thinking MCP Servermodelcontextprotocol/servers · by modelcontextprotocolAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.★ 90.5k GitHub starsMCPA Model Context Protocol server that provides timeTime MCP Servermodelcontextprotocol/servers · by modelcontextprotocolA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time…★ 90.5k GitHub stars