MCP 抓取工具是一个用于抓取网页内容并处理图像的模型上下文协议(Model Context Protocol)服务器。它允许 Claude Desktop(或其他 MCP 客户端)抓取网络内容,并对图像进行适当处理。
要在 Claude Desktop 中使用此工具,请将以下内容添加到您的配置文件中 (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"tools": {
"fetch": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-fetch"]
}
}
}
这将在需要时自动下载并运行该工具的最新版本。
⚠️ 重要提示
需要启用 Claude 的辅助功能,具体步骤如下:
- 打开系统设置;
- 转到“隐私与安全性”>“辅助功能”;
- 点击“+”按钮;
- 从应用程序文件夹中添加 Claude;
- 打开 Claude 的切换开关。
此辅助功能设置是正常执行剪贴板操作(Cmd+V)所必需的。
npm install -g tsx 安装)要通过 Smithery 自动安装 MCP 抓取工具,可执行以下命令:
npx -y @smithery/cli install @kazuph/mcp-fetch --client claude
git clone https://github.com/kazuph/mcp-fetch.git
cd mcp-fetch
npm install
npm run build
在处理网络内容中的图像时,将应用以下限制:
如果内容超过这些限制,图像会自动分成多个组,您需要多次粘贴(Cmd+V)。
npm install -g tsx
# 或者
pnpm add -g tsx
~/Library/Application Support/Claude/claude_desktop_config.json。
可以通过以下步骤轻松找到此文件:
在您的 MCP 客户端配置中添加以下内容:
{
"tools": {
"fetch": {
"args": ["tsx", "/path/to/mcp-fetch/index.ts"]
}
}
}
fetch:从互联网获取 URL 并将其内容提取为 Markdown 格式。图像会自动处理并准备好粘贴到剪贴板。