home / mcp / fetch mcp server

Fetch MCP Server

Provides web content fetching and markdown conversion to enable LLMs to retrieve and process online pages securely.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "eivs-mcp-fetch": {
      "url": "http://localhost:8000"
    }
  }
}

Fetch MCP Server lets you fetch and convert web page content into markdown so your models can read and process online information efficiently. It supports HTTP/Streamable HTTP transport for remote use or local stdio communication for tight integration with your tooling.

How to use

You connect to the Fetch MCP Server using either HTTP transport or local stdio. The core tool you’ll use is fetch, which retrieves a URL and returns its contents as markdown suitable for model consumption.

How to install

Prerequisites you should have before starting:

Option A: Install via Python (pip) and run locally

pip install mcp-server-fetch
```
```python
python -m mcp_server_fetch

Additional setup notes

Option B: Run a HTTP transport endpoint (port 8000 or your chosen port) and optionally secure with a Bearer token. This exposes the fetch capability over HTTP for MCP clients.

# Basic HTTP server (no authentication)
python -m mcp_server_fetch --transport http --port 8000

# With Bearer token authentication
python -m mcp_server_fetch --transport http --port 8000 --auth-token your-secret-token

# With custom host and port
python -m mcp_server_fetch --transport http --host 0.0.0.0 --port 3000 --auth-token your-secret-token
```

When using HTTP transport with authentication, include the token in the Authorization header as:

```
Authorization: Bearer your-secret-token

Security considerations

Expose the HTTP server only to trusted networks. If you open it beyond localhost, use authentication and monitor access to prevent unintended data exposure.

Configuration for clients

Configure your MCP client to connect to the server’s HTTP endpoint or use the local stdio flow. The examples below show how to point a client to an HTTP URL or to run the local stdio server via uvx.

# HTTP client configuration example (URL-based)
{
  "mcpServers": {
    "fetch": {
      "url": "http://localhost:8000",
      "transport": "http"
    }
  }
}
```

If using a Bearer token:

```
{
  "mcpServers": {
    "fetch": {
      "url": "http://localhost:8000",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

Troubleshooting and tips

If content is chunked, you can use the start_index argument to continue reading from a specific character position. This helps fetch long pages in controlled segments.

Notes and examples

The server exposes two transport modes: stdio for local process communication and HTTP for remote usage. When running locally with uvx, you typically start the fetch server with a command that invokes the mcp-server-fetch entry point.

Available tools

fetch

Fetches a URL and extracts its contents as markdown, with options to limit length, start from a specific index, or retrieve raw content.