
MCP Web Tools Server

2025.03.12
0
Python网页内容抓取Markdown转换浏览器自动化开发效率
MCP Web Tools Server 是一个基于模型上下文协议(MCP)的服务器,提供与网页操作相关的工具。它允许大型语言模型(LLMs)通过标准化工具与网页内容进行交互。核心功能包括网页内容抓取和转换为Markdown格式。适用于需要自动化网页内容获取和处理的场景,如内容摘要、信息提取等。
View on GitHub
Overview
基本能力
产品定位
MCP Web Tools Server 是一个为大型语言模型(LLMs)提供网页操作工具的服务,通过标准化协议实现与网页内容的交互。
核心功能
- web_scrape: 将URL转换为使用r.jina.ai作为前缀,并返回Markdown格式的内容。
适用场景
- 自动化网页内容抓取
- 网页内容转换为Markdown格式
- 与Claude for Desktop集成,实现网页内容的获取和处理
工具列表
- web_scrape: 将URL转换为Markdown内容,便于后续处理和分析。
常见问题解答
- Missing dependencies: 确保所有依赖项已安装。
- Connection issues: 检查服务器是否运行,以及Claude for Desktop的配置是否正确。
- Tool execution errors: 查看服务器输出中的错误消息。
- Streamlit UI issues: 确保Streamlit已正确安装,配置文件路径正确。
使用教程
使用依赖
- 克隆仓库:
bash git clone <repository-url> cd MCP
- 安装依赖:
bash pip install -r requirements.txt
或使用uv:bash uv pip install -r requirements.txt
安装教程
- 运行服务器(默认stdio传输):
bash ./run.sh server
或使用SSE传输:bash ./run.sh server --transport sse --host localhost --port 5000
- 运行Streamlit UI:
bash ./run.sh ui
调试方式
- 安装MCP Inspector:
bash npm install -g @modelcontextprotocol/inspector
- 运行Inspector:
bash npx @modelcontextprotocol/inspector python server.py
- 使用Inspector界面测试
web_scrape
工具。