MCP NPX Fetch
MCP NPX 获取
强大的 MCP 服务器,可轻松获取 Web 内容并将其转换为各种格式(HTML、JSON、Markdown、纯文本)。
🚀 功能
🌐通用内容获取:支持 HTML、JSON、纯文本和 Markdown 格式
🔒自定义标头支持:向您的请求添加身份验证和自定义标头
🛠内置转换:格式之间的自动转换
⚡高性能:采用现代 JavaScript 功能构建并针对速度进行了优化
🔌 MCP 兼容:与 Claude Desktop 和其他 MCP 客户端无缝集成
🎯类型安全:用 TypeScript 编写,具有完整的类型定义
Related MCP server: MCP Server Fetch Python
📦安装
NPM 全局安装
npm install -g @tokenizin/mcp-npx-fetch
直接使用 NPX
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;
};
}🔧 使用方法
CLI 使用
直接启动 MCP 服务器:
mcp-npx-fetch或者通过 npx:
npx @tokenizin/mcp-npx-fetchClaude 桌面集成
找到您的 Claude Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.jsonLinux:
~/.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🛠 技术栈
模型上下文协议 SDK - 核心 MCP 功能
JSDOM ——HTML 解析和操作
Turndown - HTML 到 Markdown 的转换
TypeScript - 类型安全和现代 JavaScript 功能
Zod - 运行时类型验证
🤝 贡献
欢迎贡献代码!欢迎提交 Pull 请求。对于重大变更,请先提交一个 issue 来讨论您想要修改的内容。
分叉存储库
创建你的功能分支(
git checkout -b feature/AmazingFeature)提交您的更改(
git commit -m 'Add some AmazingFeature')推送到分支(
git push origin feature/AmazingFeature)打开拉取请求
📄 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tokenizin-agency/mcp-npx-fetch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server