TA

tokenizin-agency/mcp-npx-fetch

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

42 stars 9 forks 质量 66 趋势 0MIT

tokenizin-agency/mcp-npx-fetch 是从 https://github.com/tokenizin-agency/mcp-npx-fetch. 导入的 MCP 服务器候选

概览

tokenizin-agency/mcp-npx-fetch 是从 https://github.com/tokenizin-agency/mcp-npx-fetch. 导入的 MCP 服务器候选

概述(AI 翻译)

强大的MCP服务器,方便将网页内容获取和转换成多种格式(HTML、JSON、Markdown、纯文本)。

安装 • 特色 • 使用情况 • 文献资料 • 贡献


🚀 特色

  • 🌐 通用内容获取:支持 HTML、JSON、纯文本和 Markdown 格式
  • 🔒 自定义头部支持:为你的请求添加认证和自定义头部
  • 🛠 内置转换:格式间自动转换
  • ⚡ **高性能:采用现代JavaScript功能并优化速度
  • 🔌 MCP 兼容:可无缝集成 Claude Desktop 及其他 MCP 客户端
  • 🎯 Type-Safe:用TypeScript编写,带有完整的类型定义

📦 安装

NPM全球安装

NPX的直接使用

📚 文献资料

可用工具

fetch_html

从任意URL获取并返回原始HTML内容。

fetch_json

它从任意URL获取并解析JSON数据。

fetch_txt

获取并返回干净的纯文本内容,去除HTML标签和脚本。

fetch_markdown

获取内容并将其转换为格式良好的Markdown格式。

🔧 用途

CLI 使用

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP NPX Fetch


🚀 Features

  • 🌐 Universal Content Fetching: Supports HTML, JSON, plain text, and Markdown formats
  • 🔒 Custom Headers Support: Add authentication and custom headers to your requests
  • 🛠 Built-in Transformations: Automatic conversion between formats
  • ⚡ High Performance: Built with modern JavaScript features and optimized for speed
  • 🔌 MCP Compatible: Seamlessly integrates with Claude Desktop and other MCP clients
  • 🎯 Type-Safe: Written in TypeScript with full type definitions

📦 Installation

NPM Global Installation

npm install -g @tokenizin/mcp-npx-fetch

Direct Usage with NPX

npx @tokenizin/mcp-npx-fetch

📚 Documentation

Available Tools

fetch_html

Fetches and returns raw HTML content from any URL.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

fetch_json

Fetches and parses JSON data from any URL.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

fetch_txt

Fetches and returns clean plain text content, removing HTML tags and scripts.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

fetch_markdown

Fetches content and converts it to well-formatted Markdown.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

🔧 Usage

CLI Usage

Start the MCP server directly:

mcp-npx-fetch

Or via npx:

npx @tokenizin/mcp-npx-fetch

Claude Desktop Integration

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
在 GitHub 查看完整 README

安装

npx -y @tokenizin/mcp-npx-fetch
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "fetch": { "command": "npx", "args": ["-y", "@tokenizin/mcp-npx-fetch"], "env": {} } } }