一个强大的MCP服务器,可以轻松地抓取和转换网络内容到各种格式(HTML、JSON、Markdown、纯文本)。
</div><a href="https://glama.ai/mcp/servers/m2a0ue08n2"><img width="380" height="200" src="https://gips2.baidu.com/it/u=3056115124,1443470986&fm=3081&app=3081&f=PNG?w=760&h=400" alt="NPX Fetch MCP服务器" /></a>
npm install -g @tokenizin/mcp-npx-fetch
npx @tokenizin/mcp-npx-fetch
fetch_html从任何URL抓取并返回原始HTML内容。
{
url: string; // 必需:目标URL
headers?: { // 可选:自定义请求头部
[key: string]: string;
};
}
fetch_json从任何URL抓取并解析JSON数据。
{
url: string; // 必需:目标URL
headers?: { // 可选:自定义请求头部
[key: string]: string;
};
}
fetch_txt从任何URL抓取并返回干净的纯文本内容,移除HTML标签和脚本。
{
url: string; // 必需:目标URL
headers?: { // 可选:自定义请求头部
[key: string]: string;
};
}
fetch_markdown从任何URL抓取内容并转换为格式良好的Markdown。
{
url: string; // 必需:目标URL
headers?: { // 可选:自定义请求头部
[key: string]: string;
};
}
直接启动MCP服务器:
mcp-npx-fetch
或者通过NPX:
npx @tokenizin/mcp-npx-fetch
找到你的Claude Desktop配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.json在你的mcpServers对象中添加以下配置:
{
"mcpServers": {
"fetch": {
"command": "npx",
"args": ["-y", "@tokenizin/mcp-npx-fetch"],
"env": {}
}
}
}
git clone https://github.com/tokenizin-agency/mcp-npx-fetch.git
cd mcp-npx-fetch
npm install
npm run dev
npm test
欢迎贡献!请随意提交Pull Request。对于重大更改,请先打开一个问题来讨论您想要更改的内容。
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)此项目采用MIT许可证 - 查看LICENSE文件以获取详细信息。