MCP Node Fetch

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Uses the Node.js undici library to fetch web content from any URL with various HTTP methods, headers, and request body options

MCP 节点获取

一个 MCP 服务器,可使用 Node.js undici库来获取 Web 内容。

特征

  • 使用各种 HTTP 方法从任意 URL 获取内容
  • 支持标头和请求正文
  • 以各种格式返回内容(文本、JSON、二进制、HTML 片段)
  • 优雅地处理错误
  • 配置超时和重定向行为

MCP 工具

该服务器提供以下 MCP 工具:

fetch-url

从 URL 获取内容并返回。

参数:

  • url (字符串,必需):要获取的 URL
  • method (字符串,可选):HTTP 方法(默认值:“GET”)
  • headers (对象,可选):要包含的 HTTP 标头
  • body (字符串,可选):POST/PUT 请求的请求正文
  • timeout (数字,可选):请求超时(以毫秒为单位)
  • responseType (字符串,可选):如何解析响应(“文本”,“json”,“二进制”,“html片段”)
  • fragmentSelector (字符串,可选):CSS 选择器用于提取特定的 HTML 片段(当 requestType 为“html-fragment”时)
  • followRedirects (布尔值,可选):是否遵循重定向(默认值:true)

extract-html-fragment

使用 CSS 选择器从网页中提取特定的 HTML 内容,并选择性地导航到锚点。

参数:

  • url (字符串,必需):要获取的 URL
  • selector (字符串,必需):要提取的 HTML 片段的 CSS 选择器
  • anchorId (字符串,可选):用于定位特定片段的可选锚点 ID
  • method (字符串,可选):HTTP 方法(默认值:“GET”)
  • headers (对象,可选):要包含的 HTTP 标头
  • body (字符串,可选):POST 请求的请求正文
  • timeout (数字,可选):请求超时(以毫秒为单位)
  • followRedirects (布尔值,可选):是否遵循重定向(默认值:true)

check-status

检查 URL 是否可以访问而无需下载完整内容。

参数:

  • url (字符串,必需):要检查的 URL
  • timeout (数字,可选):请求超时(以毫秒为单位)

Claude 用于桌面配置

要与 Claude for Desktop 一起使用,请将其添加到您的claude_desktop_config.json中:

{ "mcpServers": { "node-fetch": { "command": "node", "args": ["dist/index.js"] } } }

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP 服务器可以使用 Node.js undici 库来获取 Web 内容,支持各种 HTTP 方法、内容格式和请求配置。

  1. Features
    1. MCP Tools
      1. fetch-url
      2. extract-html-fragment
      3. check-status
    2. Claude for Desktop Configuration
      1. License
        ID: ji7r8nq9wk