MCP Server Fetch TypeScript
mcp-server-fetch-typescript MCP 服务器
提供 Web 内容抓取和转换功能的模型上下文协议 (MCP) 服务器。该服务器实现了一个全面的 Web 内容检索系统,支持各种格式和渲染方法,非常适合执行从简单的数据提取到复杂的 Web 抓取等各种任务。
特征
工具
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,重点关注主要内容
自动删除导航、页眉、页脚
非常适合文章和博客文章提取
Related MCP server: MCP Server for Google Search
安装
作为一个全球包裹
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-typescriptnpx @modelcontextprotocol/inspector node /path/to/mcp-server-fetch-typescript/build/index.jsAvailable Tools
4 toolsget_markdownA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the web page to convert to Markdown format, supporting various HTML elements and structures. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses key behavioral traits: conversion to Markdown, preservation of structural elements, and suitability as a default extraction tool. However, it lacks details on error handling, performance characteristics, or limitations (e.g., URL accessibility, content size). The description adds value but is incomplete for full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with two sentences that efficiently convey purpose and usage guidelines. Every sentence earns its place by defining the tool's function and providing contextual recommendations without unnecessary details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is mostly complete. It covers purpose, usage context, and key behavioral aspects. However, it lacks explicit mention of output format details or potential limitations, leaving some gaps in full context for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the single parameter 'url' well-documented in the schema. The description adds no specific parameter semantics beyond what the schema provides, but it implies the URL should point to a web page with content convertible to Markdown. Baseline 3 is appropriate as the schema handles parameter documentation adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Converts web page content to well-formatted Markdown') and resource ('web page'), distinguishing it from siblings by emphasizing preservation of structural elements like tables and definition lists. It explicitly contrasts with other tools by positioning itself as the default for clean, readable text format extraction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('Recommended as the default tool for web content extraction when a clean, readable text format is needed while maintaining document structure'), implying alternatives through sibling tool names (get_markdown_summary, get_raw_text, get_rendered_html) and specifying the context of needing structured, readable output.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_markdown_summaryA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the web page whose main content should be extracted and converted to Markdown. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes key behaviors like automatic removal of navigation menus and headers, which is useful context, but lacks details on potential limitations, error handling, or performance aspects that could affect tool selection.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with two concise sentences that efficiently convey the tool's purpose and use case without any wasted words, making it easy for an agent to quickly understand the tool's value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (content extraction and conversion), no annotations, and no output schema, the description is somewhat complete but lacks details on output format, error conditions, or performance characteristics that would help an agent use it effectively in varied contexts.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents the 'url' parameter thoroughly. The description does not add any additional meaning or details beyond what the schema provides, such as URL format constraints or examples, resulting in a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('extracts and converts') and resources ('main content area of a web page to Markdown format'), distinguishing it from siblings like get_raw_text or get_rendered_html by emphasizing content extraction and conversion to Markdown.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool ('Perfect for capturing the core content of articles, blog posts, or documentation pages'), but does not explicitly state when not to use it or name alternatives among the sibling tools, leaving some room for improvement in distinguishing usage scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_raw_textA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the target resource containing raw text content (JSON, XML, CSV, TSV, plain text, etc.). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses key behavioral traits like 'without browser rendering' and 'fast, direct access', but lacks details on error handling, rate limits, or authentication needs. It does not contradict annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by usage guidelines, all in three concise sentences with zero waste. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is adequate for a simple retrieval tool but lacks details on return values, error cases, or performance constraints. It covers the basics but could be more complete for a tool with potential complexity in handling various data formats.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the 'url' parameter. The description adds some context by listing acceptable formats (JSON, XML, CSV, TSV, plain text), but does not provide additional syntax or format details beyond what the schema implies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('retrieves raw text content') and resource ('from a URL'), distinguishing it from siblings like get_markdown or get_rendered_html by emphasizing 'without browser rendering' and 'direct access to source content'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides clear context on when to use ('ideal for structured data formats', 'best used when fast, direct access to source content is needed without processing dynamic elements'), but does not explicitly mention when not to use or name specific alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_rendered_htmlA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the target web page that requires JavaScript execution or dynamic content rendering. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the tool's approach ('using a headless browser') and scope ('including JavaScript-generated content'), which adds value beyond the input schema. However, it omits details like performance characteristics, error handling, or output format, leaving gaps for a mutation-like operation (fetching rendered content).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with two sentences that are front-loaded and zero waste. The first sentence states the core functionality, and the second provides essential usage context, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (rendering dynamic content) and lack of annotations and output schema, the description is adequate but incomplete. It covers the purpose and usage context but misses details like what the returned HTML includes (e.g., full DOM, specific elements), potential limitations, or error scenarios, which are crucial for such an operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'url' parameter well-documented in the schema itself. The description adds marginal context by implying the URL must target pages needing JavaScript execution, but doesn't provide additional syntax, format, or validation details beyond what the schema already states.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('fetches fully rendered HTML content') and resources ('using a headless browser'), distinguishing it from sibling tools that fetch markdown or raw text. However, it doesn't explicitly differentiate from potential non-sibling alternatives like basic HTML fetchers, keeping it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool ('modern web applications, single-page applications (SPAs), or any content that requires client-side rendering'), which implicitly distinguishes it from sibling tools that handle markdown or raw text. It lacks explicit exclusions or named alternatives, preventing a score of 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- First observed
get_markdown - First observed
get_markdown_summary - First observed
get_raw_text - First observed
get_rendered_html
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: get_markdown preserves full structure, get_markdown_summary focuses on core content, get_raw_text handles raw data formats, and get_rendered_html captures JavaScript-rendered content. The descriptions explicitly differentiate use cases, leaving no ambiguity for agent selection.
All tool names follow a consistent 'get_*' verb_noun pattern with snake_case, making them predictable and easy to parse. The naming convention is uniform across all four tools, enhancing readability and coherence.
With 4 tools, the set is well-scoped for a web content fetching server, covering key extraction methods (Markdown, raw text, rendered HTML) and a specialized summary variant. Each tool earns its place without redundancy or excessive complexity.
The tool surface comprehensively covers the domain of web content fetching: it includes raw extraction, rendered content, and two Markdown variants for different needs. There are no obvious gaps, as the tools handle static, dynamic, and structured content effectively.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
MCP server for web extraction and rendering via AceDataCloud WebExtrator
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that converts Markdown content to HTML format.12,476 npm2MIT
- FlicenseAqualityCmaintenanceA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.26 npm2-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.2MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server providing web search capabilities using Google Custom Search API and webpage content extraction functionality.2MIT