Skrape MCP服务器
](https://smithery.ai/server/@skrapeai/skrape-mcp)
使用将网页转换为干净、LLM就绪的Markdown skrape.ai一个MCP服务器,将网络抓取与Claude Desktop和其他MCP兼容应用程序无缝集成。
主要特点
- 清洁输出:删除广告、导航和无关内容
- JavaScript支持:处理动态内容渲染
- LLM优化:结构化Markdown非常适合人工智能消费
- 一致格式:无论来源如何,结构统一
特性
工具
get_markdown-将任何网页转换为LLM就绪的Markdown
- 接受任何输入URL和可选参数 - 返回针对LLM消费优化的干净、结构化的Markdown - 支持动态内容的JavaScript渲染 - 用于高级集成的可选JSON响应格式
安装
通过Smithery安装
通过以下方式自动安装适用于Claude Desktop的Skrape MCP服务器 史密瑟里:
npx -y @smithery/cli install @skrapeai/skrape-mcp --client claude手动安装
- 从获取API密钥 skrape.ai
- 安装依赖项:
npm install- 构建服务器:
npm run build- 将服务器配置添加到Claude Desktop:
在MacOS上:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json在Windows上:
notepad %APPDATA%/Claude/claude_desktop_config.json添加此配置(使用您的值替换路径和API密钥):
{
"mcpServers": {
"skrape": {
"command": "node",
"args": ["path/to/skrape-mcp/build/index.js"],
"env": {
"SKRAPE_API_KEY": "your-key-here"
}
}
}
}与LLM一起使用
以下是如何将服务器与Claude或其他LLM模型一起使用:
- 首先,确保在LLM应用程序中正确配置了服务器
- 然后,您可以要求ALLMI获取和处理任何网页:
Convert this webpage to markdown: https://example.com
Claude will use the MCP tool like this:
skrape
get_markdown
{
"url": "https://example.com",
"options": {
"renderJs": true
}
}
由此产生的Markdown将是干净的、结构化的,并准备好进行LLM处理。
高级选项
这 get_markdown 工具接受以下参数:
url(必填):要转换的任何网页URLreturnJson(可选):设置为true获取完整的JSON响应,而不仅仅是markdownoptions(可选):其他刮擦选项
- renderJs:是否在抓取之前渲染JavaScript(默认值:true)
所有选项示例:
skrape
get_markdown
{
"url": "https://example.com",
"returnJson": true,
"options": {
"renderJs": false
}
}
发展
对于自动重建的开发:
npm run watch调试
由于MCP服务器通过stdio进行通信,调试可能具有挑战性。我们建议使用 MCP检查员:
npm run inspector检查器将提供一个URL,用于访问浏览器中的调试工具。
______________________________________________________________________
