MCP server that converts URLs to clean Markdown/Text for LLM agents
한국어 · Website · Dashboard
⚡ 快速可靠 --基于8年多的网络抓取专业知识、1900多个生产爬虫和久经考验的反机器人处理。
这是什么?
一 MCP(模型上下文协议) 允许AI代理获取和读取网页的服务器。只需给它一个URL,它就会快速返回干净、LLM就绪的内容。
之前: AI无法直接读取网页\ 之后: “总结这篇文章”很有效✨
______________________________________________________________________
特性
- 🌐 URL → 标记语言:保留标题、列表、链接
- 📄 URL → Text:纯文本提取
- 🏷️ 元数据:标题、作者、日期、图片
- 🧹 清洁输出:没有广告,没有导航,没有脚本
- ⚡ JavaScript渲染:适用于SPA
- 💳 内置计费:信用跟踪、订阅管理、使用分析(MCP密钥)
- 🔄 自动重试:429个速率限制响应自动重试,并使用Retry After
- 🌍 双重运输:Stdio(npx)+可流式HTTP,实现灵活部署
______________________________________________________________________
运输方式
Scrapi-MCP服务器支持两种传输模式:
| 模式 | 最适合 | 需要Node.js |
|---|---|---|
| 工作室 | 克劳德桌面、光标、鼠标、克劳德代码 | 是(通过npx自动) |
| 可流式传输的HTTP | 所有客户端,无Node.js环境 | 否 |
______________________________________________________________________
先决条件
- Scrapi-MCP 账户(与Scrapii主账户分开)
- 已安装Claude Desktop、Cline或Cursor
- Node.js 20+
______________________________________________________________________
安装
选项A:npx(推荐)
无需安装。只需配置您的MCP客户端即可使用 npx.
{
"mcpServers": {
"scrapi": {
"command": "npx",
"args": ["-y", "@scrapi.ai/mcp-server"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}提示: 您还可以通过CLI参数而不是env var传递API密钥: ``json "args": ["-y", "@scrapi.ai/mcp-server", "--api-key", "your-api-key"] ``看 步骤2 关于将此配置放置在何处。
选项B:从源代码安装
# Clone the repository
git clone https://github.com/bamchi/scrapi-mcp-server.git
cd scrapi-mcp-server
# Install dependencies and build
npm install && npm run build______________________________________________________________________
步骤1:获取API密钥
- 首选 https://scrapi.ai
- 注册或登录
- 访问 MCP仪表板 -您的免费计划(每月500个学分)和API密钥将自动创建
- 复制您的
hsmcp_API密钥
______________________________________________________________________
步骤2:配置MCP服务器
克劳德桌面版
选项A:通过设置(推荐)
- 打开克劳德桌面
- 点击设置(左下角的齿轮图标)
- 选择“开发人员”选项卡
- 点击“编辑配置”按钮
- 添加mcpServers配置(见下文)
- 保存并重新启动Claude Desktop(Cmd+Q,然后重新打开)
选项B:直接编辑配置文件
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json
配置(npx):
{
"mcpServers": {
"scrapi": {
"command": "npx",
"args": ["-y", "@scrapi.ai/mcp-server"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}配置(来源):
{
"mcpServers": {
"scrapi": {
"command": "node",
"args": ["/absolute/path/to/scrapi-mcp-server/dist/index.js"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}注:更换 /absolute/path/to/ 使用克隆存储库的实际路径。克莱恩
配置文件位置:
- macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - 窗户:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
配置(npx):
{
"mcpServers": {
"scrapi": {
"command": "npx",
"args": ["-y", "@scrapi.ai/mcp-server"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}配置(来源):
{
"mcpServers": {
"scrapi": {
"command": "node",
"args": ["/absolute/path/to/scrapi-mcp-server/dist/index.js"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}光标
创建或编辑 .cursor/mcp.json 在项目根目录中:
配置(npx):
{
"mcpServers": {
"scrapi": {
"command": "npx",
"args": ["-y", "@scrapi.ai/mcp-server"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}配置(来源):
{
"mcpServers": {
"scrapi": {
"command": "node",
"args": ["/absolute/path/to/scrapi-mcp-server/dist/index.js"],
"env": {
"SCRAPI_API_KEY": "your-api-key"
}
}
}
}克劳德代码
选项1:CLI命令(推荐)
claude mcp add scrapi-ai -s user -e SCRAPI_API_KEY=your-api-key -- npx -y @scrapi.ai/mcp-server或与 --api-key:
claude mcp add scrapi-ai -s user -- npx -y @scrapi.ai/mcp-server --api-key your-api-key选项2:编辑配置文件
编辑 ~/.claude.json 或项目 .mcp.json:
{
"mcpServers": {
"scrapi": {
"command": "npx",
"args": ["-y", "@scrapi.ai/mcp-server", "--api-key", "your-api-key"]
}
}
}可流式传输的HTTP
通过Streamable HTTP连接——客户端不需要安装Node.js。
端点: https://scrapi.ai/mcp
光标 (.cursor/mcp.json):
{
"mcpServers": {
"scrapi": {
"url": "https://scrapi.ai/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}克劳德代码 (CLI):
claude mcp add --transport http scrapi https://scrapi.ai/mcp \
--header "Authorization: Bearer your-api-key"克莱恩 (cline_mcp_settings.json):
{
"mcpServers": {
"scrapi": {
"type": "streamableHttp",
"url": "https://scrapi.ai/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}克劳德桌面版 (claude_desktop_config.json):
{
"mcpServers": {
"scrapi": {
"command": "npx",
"args": [
"mcp-remote",
"https://scrapi.ai/mcp",
"--header",
"Authorization: Bearer your-api-key"
]
}
}
}注意:Claude Desktop需要 mcp遥控器 HTTP连接的代理。
Self-host the HTTP server (advanced)
运行您自己的实例,而不是使用托管端点:
SCRAPI_API_KEY=your-api-key npx -y -p @scrapi.ai/mcp-server scrapi-http
# or from source:
SCRAPI_API_KEY=your-api-key node dist/http.js服务器启动于 http://localhost:3000 MCP端点位于 /mcp.配置为 PORT 和 HOST 环境变量。将上述客户端配置中的URL替换为您的自托管URL(例如。 http://localhost:3000/mcp).
健康检查: GET http://localhost:3000/health
______________________________________________________________________
步骤3:重新启动AI客户端
- 克劳德桌面版:完全退出(macOS上的Cmd+Q,Windows上的Alt+F4)并重新打开
- 克劳德代码:重新启动会话
- 克莱恩:重新启动VS代码
- 光标:重新启动编辑器
您应该看到MCP服务器连接指示器。
______________________________________________________________________
可用工具
scrape_url
抓取网页并返回AI可读内容。
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
url | string | ✅ | 要抓取的URL |
format | string | markdown (默认)或 text |
例子:
{
"url": "https://example.com/article",
"format": "markdown"
}Markdown输出:
# Article Title
> Author: John Doe | Published: 2024-01-15
## Introduction
This is the main content of the article, converted to clean markdown...
## Key Points
- Point 1: Important detail
- Point 2: Another insight
- [Related Link](https://example.com/related)文本输出:
Article Title
Author: John Doe | Published: 2024-01-15
Introduction
This is the main content of the article, converted to plain text...
Key Points
- Point 1: Important detail
- Point 2: Another insightscrape_urls
并行抓取多个网页并返回AI可读内容。
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
urls | string\[\] | ✅ | 要抓取的URL(最多10个) |
format | string | markdown (默认)或 text |
例子:
{
"urls": ["https://example.com/page1", "https://example.com/page2"],
"format": "text"
}输出:
[
{
"url": "https://example.com/page1",
"content": "Page 1 Title\n\nThis is the content of page 1..."
},
{
"url": "https://example.com/page2",
"content": "Page 2 Title\n\nThis is the content of page 2..."
}
]scraper_server_status
检查所有ScraperServer实例的状态。显示服务器运行状况、断路器状态、故障计数和计时信息。
参数: 无
例子:
{}输出:
## ScraperServer Status
Total: 3 | Available: 2
| Name | OS | Status | Failures | Last Success | Last Failure |
|------|----|--------|----------|--------------|--------------|
| pluto | linux | OK | 0 | 01/30 14:23:05 | - |
| mars | mac | FAIL | 2 | 01/29 10:00:00 | 01/30 13:55:12 |
| venus | linux | OPEN | 3 | 01/28 09:00:00 | 01/30 12:00:00 |
### Issues
- **mars**: Connection refused - connect(2)
- **venus**: Circuit breaker open until 01/30 12:30:00
- **venus**: Net::ReadTimeout状态值:
| 状态 | 描述 |
|---|---|
OK | 服务器运行正常 |
FAIL | 服务器不正常 |
OPEN | 断路器打开(隔离30分钟) |
N/A | 尚未检查 |
get_usage
检查您的API使用情况和剩余信用。
参数: 无
例子:
{}输出:
## MCP Credits
| Item | Value |
|------|-------|
| Plan | starter |
| Subscription Credits | 1,500 |
| Purchased Credits | 200 |
| Total Remaining | 1,700 |
| Period End | 2026-03-01 |get_billing
检索详细的计费信息,包括订阅、计划、日常使用和支出限制。
参数:
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
action | string | 是 | subscription, plans, daily_usage,或 spending_limits |
start_date | string | 开始日期 daily_usage (YYYY-MM-DD,默认值:30天前) | |
end_date | string | 的结束日期 daily_usage (YYYY-MM-DD,默认值:今天) |
示例--当前订阅:
{ "action": "subscription" }## MCP Subscription
| Item | Value |
|------|-------|
| Plan | starter (Starter) |
| Status | active |
| Monthly Credits | 2,000 |
| Price | $19.00/mo |
| Rate Limit | 30 RPM |
| Burst Limit | 5 concurrent |
| Period End | 2026-03-01 |示例——可用计划:
{ "action": "plans" }## Available MCP Plans
| Plan | Credits/mo | Price | RPM | Burst |
|------|-----------|-------|-----|-------|
| Free (free) | 500 | Free | 10 | 2 |
| Starter (starter) | 2,000 | $19.00/mo | 30 | 5 |
| Pro (pro) | 10,000 | $49.00/mo | 60 | 10 |
| Business (business) | 50,000 | $149.00/mo | 120 | 20 |示例——日常使用历史记录:
{ "action": "daily_usage", "start_date": "2026-02-01", "end_date": "2026-02-07" }## Daily Usage (2026-02-01 ~ 2026-02-07)
| Date | Requests | Credits | Top Tool |
|------|----------|---------|----------|
| 2026-02-07 | 45 | 45 | scrape#scrape (45) |
| 2026-02-06 | 120 | 120 | scrape#scrape (100) |
**Total**: 165 requests, 165 credits示例——支出限额:
{ "action": "spending_limits" }## Spending Limits
| Item | Value |
|------|-------|
| Daily Limit | 500 credits |
| Today's Usage | 120 credits |
| Usage % | 24.0% |______________________________________________________________________
用法示例
示例1:总结一篇新闻文章
User: Summarize this article: https://news.example.com/article/12345
Claude: [calls scrape_url]
Here's a summary of the article:
## Key Points
- Point 1: ...
- Point 2: ...
- Point 3: ...示例2:获取页面内容
User: Get the content from https://example.com/data
Claude: [calls scrape_url]
# Page Title
> Source: https://example.com/data
The page content is returned in clean Markdown format...示例3:研究竞争对手定价
User: What's the pricing on https://competitor.com/product/abc
Claude: [calls scrape_url]
Here's the pricing information:
- **Product**: ABC Premium
- **Regular Price**: $99.00
- **Sale Price**: $79.00 (20% off)示例4:阅读API文档
User: Read https://docs.example.com/api/v2 and write integration code
Claude: [calls scrape_url]
I've analyzed the API documentation. Here's the integration code:
// api-client.ts
export class ExampleApiClient {
private baseUrl = 'https://api.example.com/v2';
async getData(): Promise {
// ...
}
}______________________________________________________________________
运作原理
┌─────────────────┐
│ User │
│ "Summarize this │
│ URL for me" │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Claude Desktop │
│ / Cursor │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ MCP Server │────►│ Scrapi API │
│ (scrape_url) │ │ (format param) │
└────────┬────────┘ └────────┬────────┘
│ │
│◄──────────────────────┘
│ Markdown/Text Response
▼
┌─────────────────┐
│ AI Response │
│ (Summary, etc.) │
└─────────────────┘______________________________________________________________________
为什么是Scrapi?
由幕后团队打造 Scrapii,拥有8年以上的网页抓取经验:
- ✅ 1900+生产履带
- ✅ JavaScript渲染支持
- ✅ 反机器人处理
- ✅ 99.9%正常运行时间
______________________________________________________________________
故障排除
“需要API密钥”
请确保您的API密钥是通过以下方法之一提供的:
- 环境变量:设置
SCRAPI_API_KEY在你的配置中 - CLI参数:通行证
--api-key your-key在args中
“API密钥无效”
验证您的API密钥是否正确并在您的Scrapi仪表板中处于活动状态。
使用旧缓存版本的npx
如果您升级了但仍然看到旧行为,请清除npx缓存:
npx clear-npx-cacheMCP服务器未连接
- 确保已安装Node.js 20+
- 试着跑步
node /absolute/path/to/scrapi-mcp-server/dist/index.js手动检查错误 - 完全退出Claude Desktop(macOS上的Cmd+Q,Windows上的Alt+F4)并重新启动
- 检查“设置”>“开发人员”以验证服务器是否已列出
“开发人员”选项卡不可见
将Claude Desktop更新至最新版本:Claude菜单→ “检查更新…”
______________________________________________________________________
支持
- 电子邮件:support@scrapi.ai
- 问题:
______________________________________________________________________
许可证
MIT© Scrapii
