Fetch-Save MCP Server

by gregberns
Integrations
  • Converts fetched HTML content to Markdown format for better readability and processing by language models.

获取-保存 MCP 服务器

提供 Web 内容获取和本地文件保存功能的模型上下文协议 (MLM) 服务器。该服务器使 LLM 能够从网页检索内容,将 HTML 转换为 Markdown 以便于使用,并将检索到的内容保存到本地文件。

与标准获取 MCP 服务器的主要区别在于,该服务器提供了一个获取-保存工具,既可以检索内容,又可以在本地将其存储在永久文件中,以便以后访问或处理数据。

此服务器可访问本地/内部 IP 地址,可能存在安全风险。使用此 MCP 服务器时请务必小心,确保不会泄露任何敏感数据。

补充说明:本 Readme 文件和部分代码使用 Claude Code 编写/编辑,因此部分内容可能存在错误。如需修改,请提交 PR。

可用工具

  • fetch-save - 从互联网获取 URL,将其内容提取为 markdown,然后将其保存到本地文件。
    • url (字符串,必需):获取并下载的 URL
    • filepath (字符串,必需):下载内容将保存的本地文件路径

提示

  • 获取-保存
    • 获取 URL 并将其内容保存到本地文件
    • 参数:
      • url (字符串,必需):获取并下载的 URL
      • filepath (字符串,必需):将保存内容的本地文件路径

安装

可选:安装 node.js,这将导致 fetch 服务器使用更强大的不同 HTML 简化器。

使用 uv(推荐)

使用uv时无需特殊安装。我们将使用uvx直接运行mcp-server-fetch-save

使用 PIP

或者,您可以通过 pip 安装mcp-server-fetch-save

pip install mcp-server-fetch-save

安装后,您可以使用以下命令将其作为脚本运行:

python -m mcp_server_fetch_save

配置

为 Claude.app 配置

添加到您的 Claude 设置:

"mcpServers": { "fetch-save": { "command": "uvx", "args": ["mcp-server-fetch-save"] } }
"mcpServers": { "fetch-save": { "command": "python", "args": ["-m", "mcp_server_fetch_save"] } }

配置 VS Code

如需手动安装,请将以下 JSON 块添加到 VS Code 中的“用户设置 (JSON)”文件中。您可以按下Ctrl + Shift + P并输入Preferences: Open User Settings (JSON)来执行此操作。

或者,您可以将其添加到工作区中名为.vscode/mcp.json的文件中。这样您就可以与其他人共享该配置。

请注意,使用mcp.json文件时需要mcp密钥。

{ "mcp": { "servers": { "fetch-save": { "command": "uvx", "args": ["mcp-server-fetch-save"] } } } }

自定义 - robots.txt

默认情况下,如果请求来自模型(通过工具),服务器将遵循网站 robots.txt 文件的规则;但如果请求是由用户发起的(通过提示)。可以通过在配置文件的args列表中添加参数--ignore-robots-txt来禁用此功能。

定制 - 用户代理

默认情况下,根据请求是来自模型(通过工具)还是用户发起(通过提示),服务器将使用用户代理

ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)

或者

ModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)

可以通过将参数--user-agent=YourUserAgent添加到配置中的args列表来进行定制。

定制 - 代理

可以使用--proxy-url参数将服务器配置为使用代理。

调试

您可以下载此 repo,并将其添加到您的.mcp.json文件以在本地运行/测试。

{ "mcpServers": { "fetch_save": { "command": "uv", "args": [ "--directory", "/path/to/clone/of/project/mcp-server-fetch-save/src/mcp_server_fetch_save", "run", "__main__.py" ] } } }

您可以使用 MCP 检查器来调试服务器。对于 uvx 安装:

npx @modelcontextprotocol/inspector uvx mcp-server-fetch-save

或者,如果您已将软件包安装在特定目录中或正在其上进行开发:

cd path/to/mcp-server-fetch-save npx @modelcontextprotocol/inspector uv run mcp-server-fetch-save

贡献

我们鼓励您为扩展和改进 mcp-server-fetch-save 做出贡献。无论您是想添加新工具、增强现有功能还是改进文档,您的贡献都弥足珍贵。

有关其他 MCP 服务器和实现模式的示例,请参阅: https://github.com/modelcontextprotocol/servers

欢迎提交 Pull 请求!欢迎贡献新想法、错误修复或改进,让 mcp-server-fetch-save 更加强大实用。

执照

mcp-server-fetch-save 采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。

谢谢

该服务器是基于原始modelcontextprotocol/servers获取服务器开发的,并增加了将内容保存到本地文件的功能。

You must be authenticated.

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

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器使 LLM 能够检索 Web 内容并将其保存到本地文件以供永久存储和以后访问。

  1. 可用工具
    1. 提示
      1. 安装
        1. 使用 uv(推荐)
        2. 使用 PIP
      2. 配置
        1. 为 Claude.app 配置
        2. 配置 VS Code
        3. 自定义 - robots.txt
        4. 定制 - 用户代理
        5. 定制 - 代理
      3. 调试
        1. 贡献
          1. 执照
            1. 谢谢

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.
                Last updated -
                10
                53
                Python
                MIT License
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.
                Last updated -
                Python
                MIT License
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables LLMs to extract and use content from unstructured documents across a wide variety of file formats.
                Last updated -
                2
                Python
                • Apple
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables LLMs to fetch and process web content in multiple formats (HTML, JSON, Markdown, text) with automatic format detection.
                Last updated -
                TypeScript
                • Apple

              View all related MCP servers

              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/gregberns/mcp-server-fetch-save'

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