MCP Server Fetch TypeScript

MCP Server Fetch TypeScript

一个模型上下文协议服务器,提供网页内容获取和转换功能。

内容获取
访问服务器

Tools

get_raw_text

Retrieves raw text content directly from a URL without browser rendering. Ideal for structured data formats like JSON, XML, CSV, TSV, or plain text files. Best used when fast, direct access to the source content is needed without processing dynamic elements.

get_rendered_html

Fetches fully rendered HTML content using a headless browser, including JavaScript-generated content. Essential for modern web applications, single-page applications (SPAs), or any content that requires client-side rendering to be complete.

get_markdown

Converts web page content to well-formatted Markdown, preserving structural elements like tables and definition lists. Recommended as the default tool for web content extraction when a clean, readable text format is needed while maintaining document structure.

get_markdown_summary

Extracts and converts the main content area of a web page to Markdown format, automatically removing navigation menus, headers, footers, and other peripheral content. Perfect for capturing the core content of articles, blog posts, or documentation pages.

README

mcp-server-fetch-typescript MCP 服务器

一个模型上下文协议服务器,提供网页内容抓取和转换功能。该服务器实现了一个全面的网页内容检索系统,支持各种格式和渲染方法,使其非常适合从简单的数据提取到复杂的网页抓取等任务。

<a href="https://glama.ai/mcp/servers/iyfpvfkgyx"><img width="380" height="200" src="https://glama.ai/mcp/servers/iyfpvfkgyx/badge" alt="Server Fetch TypeScript MCP server" /></a>

功能

工具

  • get_raw_text - 直接从 URL 检索原始文本内容

    • 接受 url 作为必需参数,指向基于文本的资源
    • 返回未经处理的文本内容,无需浏览器渲染
    • 适用于 JSON、XML、CSV、TSV 或纯文本文件
    • 最适合需要快速、直接访问源内容的情况
  • get_rendered_html - 抓取完全渲染的 HTML 内容

    • 接受 url 作为必需参数
    • 返回 JavaScript 执行后的完整 HTML 内容
    • 使用 Playwright 进行无头浏览器渲染
    • 对于现代 Web 应用程序和 SPA 至关重要
  • get_markdown - 将网页内容转换为 Markdown 格式

    • 接受 url 作为必需参数
    • 返回格式良好的 Markdown,保留结构元素
    • 支持表格和定义列表
    • 推荐用于内容存档和文档
  • get_markdown_summary - 提取和转换主要内容

    • 接受 url 作为必需参数
    • 返回干净的 Markdown,专注于主要内容
    • 自动删除导航、标题、页脚
    • 非常适合文章和博客文章提取

安装

作为全局包

npm install -g mcp-server-fetch-typescript

作为项目依赖

npm install mcp-server-fetch-typescript

用法

与 Claude Desktop 一起使用

要与 Claude Desktop 一起使用,请添加服务器配置:

在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json

"mcpServers": {
  "mcp-server-fetch-typescript": {
    "command": "npx",
    "args": [
      "-y",
      "mcp-server-fetch-typescript"
    ]
  }
}

或者添加以下配置:

git clone https://github.com/tatn/mcp-server-fetch-typescript.git
cd mcp-server-fetch-typescript
npm install
npm run build
"mcpServers": {
  "mcp-server-fetch-typescript": {
    "command": "node",
    "args": [
      "/path/to/mcp-server-fetch-typescript/build/index.js"
    ]
  }
}

调试

要调试 MCP 服务器:

npx @modelcontextprotocol/inspector npx -y mcp-server-fetch-typescript
npx @modelcontextprotocol/inspector node /path/to/mcp-server-fetch-typescript/build/index.js

推荐服务器

mult-fetch-mcp-server

mult-fetch-mcp-server

一个多功能的、符合 MCP 规范的网页内容抓取工具,支持多种模式(浏览器/Node)、格式(HTML/JSON/Markdown/文本)和智能代理检测,并提供双语界面(英语/中文)。

精选
本地
Knowledge Graph Memory Server

Knowledge Graph Memory Server

为 Claude 实现持久性记忆,使用本地知识图谱,允许 AI 记住用户的信息,并可在自定义位置存储,跨对话保持记忆。

精选
本地
Hyperbrowser

Hyperbrowser

欢迎来到 Hyperbrowser,人工智能的互联网。Hyperbrowser 是下一代平台,旨在增强人工智能代理的能力,并实现轻松、可扩展的浏览器自动化。它专为人工智能开发者打造,消除了本地基础设施和性能瓶颈带来的麻烦,让您能够:

精选
本地
Exa MCP Server

Exa MCP Server

一个模型上下文协议服务器,它使像 Claude 这样的人工智能助手能够以安全和受控的方式,使用 Exa AI 搜索 API 执行实时网络搜索。

精选
mcp-perplexity

mcp-perplexity

Perplexity API 的 MCP 服务器。

精选
MCP Web Research Server

MCP Web Research Server

一个模型上下文协议服务器,使 Claude 能够通过集成 Google 搜索、提取网页内容和捕获屏幕截图来进行网络研究。

精选
PubMedSearch MCP Server

PubMedSearch MCP Server

一个模型内容协议(Model Content Protocol)服务器,提供从 PubMed 数据库搜索和检索学术论文的工具。

精选
YouTube Translate MCP

YouTube Translate MCP

一个模型上下文协议服务器,可以通过文字稿、翻译、摘要和各种语言的字幕生成来访问 YouTube 视频内容。

精选
mcp-codex-keeper

mcp-codex-keeper

作为开发知识的守护者,为 AI 助手提供精心策划的最新文档和最佳实践访问权限。

精选
Perplexity Deep Research MCP

Perplexity Deep Research MCP

一个服务器,它允许 AI 助手使用 Perplexity 的 sonar-deep-research 模型进行网络搜索,并提供引用支持。

精选