首页
学习
活动
专区
圈层
工具
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
首页
学习
活动
专区
圈层
工具
MCP广场
MCP广场 >详情页
mcp-npx-fetch云托管模式2025-06-160分享
github
为 Cursor、Windsurf、Cline 和其他 AI 驱动的编码工具提供访问飞书文档的能力
By tokenizin-agency
2025-06-160
github
详情内容

MCP NPX Fetch

npm version
License: MIT
TypeScript
Model Context Protocol

一个强大的MCP服务器,可以轻松地将网页内容抓取并转换为各种格式(HTML、JSON、Markdown、纯文本)。

安装
特性
使用
文档
贡献

NPX Fetch MCP 服务器


🚀 特性

  • 🌐 通用内容抓取: 支持HTML、JSON、纯文本和Markdown格式
  • 🔒 自定义头部支持: 在请求中添加身份验证和自定义头部
  • 🛠 内置转换: 自动在不同格式之间进行转换
  • 高性能: 使用现代JavaScript特性和优化以提高速度
  • 🔌 MCP兼容: 无缝集成Claude Desktop和其他MCP客户端
  • 🎯 类型安全: 用TypeScript编写,具有完整的类型定义

📦 安装

NPM 全局安装

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

直接通过NPX使用

npx @tokenizin/mcp-npx-fetch

📚 文档

可用工具

fetch_html

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

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

fetch_json

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

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

fetch_txt

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

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

fetch_markdown

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

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

🔧 使用

CLI 使用

直接启动MCP服务器:

mcp-npx-fetch

或者通过npx:

npx @tokenizin/mcp-npx-fetch

Claude Desktop 集成

  1. 找到你的Claude Desktop配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. 在你的mcpServers对象中添加以下配置:

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

💻 本地开发

  1. 克隆仓库:
git clone https://github.com/tokenizin-agency/mcp-npx-fetch.git
cd mcp-npx-fetch
  1. 安装依赖项:
npm install
  1. 启动开发模式:
npm run dev
  1. 运行测试:
npm test

🛠 技术栈

🤝 贡献

希望这符合您的要求!如果有任何需要进一步调整的地方,请告诉我。

欢迎贡献!请随时提交 Pull Request。对于重大更改,请先打开一个 issue 来讨论您想要进行的更改。

  1. 叉取仓库
  2. 创建您的功能分支 (git checkout -b feature/AmazingFeature)
  3. 提交您的更改 (git commit -m 'Add some AmazingFeature')
  4. 将更改推送到分支 (git push origin feature/AmazingFeature)
  5. 打开一个 Pull Request

📄 许可证

本项目根据 MIT 许可证授权 - 详情请参阅 LICENSE 文件。


PT Tokenizin Technology Agency 用 ❤️ 制作
通过SSE URL连接服务
Server已在腾讯云托管,可在连接后免费调用和在线进行工具测试~
工具测试
已支持Server下的4个工具,可选择工具进行在线测试
fetch_html
Fetch a website and return the content as HTML
fetch_markdown
Fetch a website and return the content as Markdown
fetch_txt
Fetch a website, return the content as plain text (no HTML)
fetch_json
Fetch a JSON file from a URL
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档