Data as of

Fetch MCP Server for Claude Code: Setup & Config

Claude Code: Fetch MCP Server retrieves web pages as HTML, text, Markdown, JSON, or cleaned article content.

What you can do with Fetch in Claude Code

Choose format-specific web retrieval with readable articles, transcripts, and bounded output.

  • Bring a web article into an assistant as cleaned Markdown.
  • Extract a YouTube transcript in a selected language.

Before you start: Fetch in Claude Code

  • Node.js with npx
  • Optional yt-dlp for transcript extraction

This is the README MCP launch, not the mcp-fetch CLI invocation. The supplied structured tool catalog and README list different tools; verify the running server tool list.

Fetch Claude Code configuration

  1. Choose Claude Code configuration scope

    For Fetch MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add Fetch MCP Server to Claude Code

    Use the fetch-mcp-zcaceres entry below in mcpServers. Keep Fetch MCP Server's documented stdio connection fields and your other Claude Code entries.

  3. Check Fetch MCP Server in Claude Code

    Fetch MCP Server: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "fetch-mcp-zcaceres": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "mcp-fetch-server"
      ],
      "env": {
        "DEFAULT_LIMIT": "<Optional default response character limit>",
        "MAX_RESPONSE_BYTES": "<Optional response-body byte limit>"
      }
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'fetch-mcp-zcaceres' '{"type":"stdio","command":"npx","args":["mcp-fetch-server"],"env":{"DEFAULT_LIMIT":"<Optional default response character limit>","MAX_RESPONSE_BYTES":"<Optional response-body byte limit>"}}'

Fetch tools available to Claude Code

Fetch's stored tool list documents 11 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.

fetch_html

For Fetch's fetch_html, review the permission request and arguments in Claude Code before approval.

fetch_markdown

For Fetch's fetch_markdown, review the permission request and arguments in Claude Code before approval.

fetch_txt

For Fetch's fetch_txt, review the permission request and arguments in Claude Code before approval.

Return page text without HTML tags, scripts, or styles.

fetch_json

For Fetch's fetch_json, review the permission request and arguments in Claude Code before approval.

Retrieve a URL returning JSON.

fetch_readable

For Fetch's fetch_readable, review the permission request and arguments in Claude Code before approval.

Extract the main article body as Markdown using Readability.

fetch_youtube_transcript

For Fetch's fetch_youtube_transcript, review the permission request and arguments in Claude Code before approval.

fetch

For Fetch's fetch, review the permission request and arguments in Claude Code before approval.

Issue an HTTP request with configurable method, headers, body, and options.

get-rules

For Fetch's get-rules, review the permission request and arguments in Claude Code before approval.

graphql

For Fetch's graphql, review the permission request and arguments in Claude Code before approval.

puppeteer

For Fetch's puppeteer, review the permission request and arguments in Claude Code before approval.

Operate browser pages, execute JavaScript, and capture screenshots.

socket

For Fetch's socket, review the permission request and arguments in Claude Code before approval.

Open, inspect, use, or close WebSocket connections.

Fetch: full stored tool descriptions

Troubleshooting Fetch in Claude Code

  • If Fetch MCP Server fails to start, check npx mcp-fetch-server (Node.js/npm), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • Fetch MCP Server: check DEFAULT_LIMIT, MAX_RESPONSE_BYTES; keep credentials out of shared .mcp.json.
  • Fetch MCP Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Default response character and byte limits constrain large fetches.
  • Known limitation: Structured input tools differ from the README tool list.
  • Known limitation: Private and localhost targets are blocked by the documented SSRF protection.
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

Fetch MCP Server — details. Claude Code guide

Frequently asked questions

Register Fetch MCP Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.

Claude Code's fetch-mcp-zcaceres example uses stdio.

Fetch MCP Server's Claude Code configuration invokes npx mcp-fetch-server (Node.js/npm).

Claude Code's Fetch MCP Server example references DEFAULT_LIMIT, MAX_RESPONSE_BYTES. Check these names if startup or authentication fails; the example alone does not distinguish required from optional values.

Fetch MCP Server's stored list contains 11 tools, including fetch_html, fetch_markdown, fetch_txt. Compare those names with Claude Code's connected tool list; the stored list is not a live check.

No. The README says transcript retrieval falls back to direct page extraction when yt-dlp is unavailable.

The README describes SSRF protection that blocks private and localhost addresses.

The supplied structured facts list generic network tools, while the README documents format-specific fetch tools. Both are attributed to their respective source.