npm install -g @tokenizin/mcp-npx-fetch
npx @tokenizin/mcp-npx-fetch
fetch_html
从任何URL获取并返回原始HTML内容。
{
url: string; // Required: Target URL
headers?: { // Optional: Custom request headers
[key: string]: string;
};
}

fetch_json
从任何URL获取并解析JSON数据。
{
url: string; // Required: Target URL
headers?: { // Optional: Custom request headers
[key: string]: string;
};
}

fetch_txt
获取并返回干净的纯文本内容,移除HTML标签和脚本。
{
url: string; // Required: Target URL
headers?: { // Optional: Custom request headers
[key: string]: string;
};
}

fetch_markdown
获取内容并将其转换为格式良好的Markdown。
{
url: string; // Required: Target URL
headers?: { // Optional: Custom request 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。对于重大更改,请先打开一个 issue 来讨论您想要进行的更改。
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)本项目根据 MIT 许可证授权 - 详情请参阅 LICENSE 文件。