hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrations
Converts scraped web content into markdown format for easier processing by Claude
Explicitly mentioned as an example website whose content can be fetched and summarized using the web_scrape tool
Provides a UI for connecting to and testing MCP servers, including viewing available tools and executing them
MCP Web 工具服务器
模型上下文协议 (MCP) 服务器,提供与 Web 相关的操作工具。该服务器允许 LLM 通过标准化工具与 Web 内容进行交互。
当前工具
- web_scrape :将 URL 转换为使用 r.jina.ai 作为前缀并返回 markdown 内容
安装
- 克隆此存储库:Copy
- 安装所需的依赖项:或者,您可以使用uv进行更快的安装:CopyCopy
运行服务器和 UI
该存储库包含运行 MCP 服务器或 Streamlit UI 的便捷脚本。
使用运行脚本
在 macOS/Linux 上:
在 Windows 上:
手动运行
或者,您可以直接运行服务器:
使用 stdio(默认)
使用 SSE
这将在localhost:5000
上启动一个接受 MCP 连接的 HTTP 服务器。
并手动运行 Streamlit UI:
使用 MCP Inspector 进行测试
MCP 检查器是一款用于测试和调试 MCP 服务器的工具。您可以使用它来与您的服务器进行交互:
- 安装 MCP 检查器:Copy
- 使用您的服务器运行检查器:Copy
- 使用 Inspector 界面通过提供类似
example.com
URL 并查看返回的 markdown 内容来测试web_scrape
工具。
与 Claude 桌面版集成
要将此服务器与 Claude for Desktop 一起使用:
- 确保您已安装Claude for Desktop 。
- 打开 Claude for Desktop 配置文件:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Mac:
- 添加以下配置(根据需要调整路径):
- 重新启动 Claude 桌面版。
- 现在您应该可以在 Claude 的界面中看到 web_scrape 工具了。您可以让 Claude 从网站抓取内容,它会使用该工具。
示例用法
与 Claude 集成后,您可以提出以下问题:
- “example.com 的主页上有什么?”
- “您能从 mozilla.org 获取并总结内容吗?”
- “从 wikipedia.org/wiki/Model_Context_Protocol 获取内容并向我解释。”
Claude 将使用 web_scrape 工具来获取内容并在其响应中提供。
添加更多工具
要向此服务器添加更多工具:
- 在
tools/
目录中创建一个新的 Python 文件,例如tools/new_tool.py
。 - 按照与现有工具类似的模式实现您的工具功能。
- 在
server.py
中导入您的工具并将其注册到 MCP 服务器:
- 重新启动服务器以应用更改。
Streamlit UI
该存储库包含一个 Streamlit 应用程序,允许您连接并测试在 Claude for Desktop 中配置的所有 MCP 服务器。
运行 Streamlit UI
这将启动 Streamlit 服务器并打开带有 UI 的 Web 浏览器。
特征
- 加载并解析 Claude for Desktop 配置文件
- 查看所有已配置的 MCP 服务器
- 连接到任何服务器并查看其可用工具
- 通过提供输入参数和查看结果来测试工具
- 查看可用资源和提示
用法
- 启动 Streamlit 应用
- 输入 Claude for Desktop 配置文件的路径(默认路径已预填)
- 点击“加载服务器”查看所有可用的 MCP 服务器
- 选择一个服务器选项卡并单击“连接”以加载其工具
- 选择工具并提供所需参数
- 单击“执行”运行该工具并查看结果
故障排除
- 缺少依赖项:确保
requirements.txt
中的所有依赖项都已安装。 - 连接问题:检查服务器是否正在运行以及 Claude for Desktop 中的配置是否指向正确的路径。
- 工具执行错误:在服务器输出中查找错误消息。
- Streamlit UI 问题:确保 Streamlit 已正确安装并且配置文件路径正确。
执照
本项目遵循 MIT 许可证。更多详情请参阅许可证文件。
This server cannot be installed
模型上下文协议服务器允许 LLM 通过标准化工具与 Web 内容进行交互,目前支持 Web 抓取功能。
- Current Tools
- Installation
- Running the Server and UI
- Testing with MCP Inspector
- Integrating with Claude for Desktop
- Example Usage
- Adding More Tools
- Streamlit UI
- Troubleshooting
- License