Skip to main content
Glama

MCP NPX 获取

npm 版本 许可证:MIT TypeScript 模型上下文协议

强大的 MCP 服务器,可轻松获取 Web 内容并将其转换为各种格式(HTML、JSON、Markdown、纯文本)。

安装功能使用文档贡献


🚀 功能

  • 🌐通用内容获取:支持 HTML、JSON、纯文本和 Markdown 格式

  • 🔒自定义标头支持:向您的请求添加身份验证和自定义标头

  • 🛠内置转换:格式之间的自动转换

  • 高性能:采用现代 JavaScript 功能构建并针对速度进行了优化

  • 🔌 MCP 兼容:与 Claude Desktop 和其他 MCP 客户端无缝集成

  • 🎯类型安全:用 TypeScript 编写,具有完整的类型定义

Related MCP server: MCP Server Fetch Python

📦安装

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 桌面集成

  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 请求。对于重大变更,请先提交一个 issue 来讨论您想要修改的内容。

  1. 分叉存储库

  2. 创建你的功能分支( git checkout -b feature/AmazingFeature

  3. 提交您的更改( git commit -m 'Add some AmazingFeature'

  4. 推送到分支( git push origin feature/AmazingFeature

  5. 打开拉取请求

📄 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。


Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tokenizin-agency/mcp-npx-fetch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server