Skip to main content
Glama

MCP NPX 获取

npm 版本 许可证:MIT TypeScript 模型上下文协议

强大的 MCP 服务器,可轻松获取 Web 内容并将其转换为各种格式(HTML、JSON、Markdown、纯文本)。

安装功能使用文档贡献


🚀 功能

  • 🌐通用内容获取:支持 HTML、JSON、纯文本和 Markdown 格式

  • 🔒自定义标头支持:向您的请求添加身份验证和自定义标头

  • 🛠内置转换:格式之间的自动转换

  • 高性能:采用现代 JavaScript 功能构建并针对速度进行了优化

  • 🔌 MCP 兼容:与 Claude Desktop 和其他 MCP 客户端无缝集成

  • 🎯类型安全:用 TypeScript 编写,具有完整的类型定义

Related MCP server: WebforAI Text Extractor

📦安装

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-fetch

Claude 桌面集成

  1. 找到您的 Claude Desktop 配置文件:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%/Claude/claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. 将以下配置添加到您的mcpServers对象:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@tokenizin/mcp-npx-fetch"],
      "env": {}
    }
  }
}

💻 本地开发

  1. 克隆存储库:

git clone https://github.com/tokenizin-agency/mcp-npx-fetch.git
cd mcp-npx-fetch
  1. 安装依赖项:

npm install
  1. 启动开发模式:

npm run dev
  1. 运行测试:

npm test

🛠 技术栈

🤝 贡献

欢迎贡献代码!欢迎提交 Pull 请求。对于重大变更,请先提交一个 issue 来讨论您想要修改的内容。

  1. 分叉存储库

  2. 创建你的功能分支( git checkout -b feature/AmazingFeature

  3. 提交您的更改( git commit -m 'Add some AmazingFeature'

  4. 推送到分支( git push origin feature/AmazingFeature

  5. 打开拉取请求

📄 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。


Available Tools

4 tools
fetch_htmlC

Fetch a website and return the content as HTML

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the website to fetch

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states the basic operation but doesn't disclose important traits like error handling, timeout behavior, authentication needs, rate limits, or what happens with invalid URLs. For a network tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core functionality without unnecessary words. It's appropriately sized and front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a network fetch tool with no annotations and no output schema, the description is inadequate. It doesn't explain what gets returned beyond 'HTML' (structure, errors, status codes), doesn't mention network behavior, and provides no guidance on usage versus siblings. The complexity warrants more complete documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 both parameters (url and headers). The description doesn't add any parameter-specific information beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetch') and resource ('a website'), specifying the return format ('content as HTML'). It distinguishes from sibling tools by mentioning HTML output, but doesn't explicitly contrast with fetch_json, fetch_markdown, or fetch_txt beyond format differences.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus the sibling tools (fetch_json, fetch_markdown, fetch_txt). The description implies it's for fetching websites, but doesn't specify scenarios where HTML output is preferred over JSON, Markdown, or plain text alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_jsonC

Fetch a JSON file from a URL

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the JSON to fetch

TDQS

C2.9/5.0
Behavior2/5

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. 'Fetch a JSON file from a URL' implies a read operation but doesn't specify error handling, authentication needs, rate limits, or what happens if the URL doesn't return valid JSON. This leaves significant behavioral gaps for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just one sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for effective tool use. It doesn't explain what the tool returns (parsed JSON object? raw response?), error conditions, or behavioral constraints, leaving the agent with insufficient context for a fetch operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with both parameters clearly documented in the schema itself. The description doesn't add any meaningful parameter semantics beyond what's already in the schema, so it meets the baseline for high schema coverage without providing extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Fetch a JSON file from a URL' clearly states the action (fetch) and resource (JSON file from URL), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like fetch_html or fetch_markdown, which perform similar fetch operations but for different content types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are no explicit instructions about when to choose fetch_json over fetch_html, fetch_markdown, or fetch_txt, nor any context about prerequisites or exclusions for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_markdownC

Fetch a website and return the content as Markdown

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the website to fetch

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool fetches a website and returns Markdown, but lacks details on error handling, rate limits, authentication needs, or what happens with invalid URLs. For a tool that performs network operations with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Fetch a website and return the content as Markdown.' It is front-loaded with the core purpose, has zero waste, and is appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (network fetching with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error cases, or behavioral traits like timeouts or content conversion limitations. For a tool with no structured safety or output information, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 both parameters (url and headers). The description doesn't add any meaning beyond what the schema provides, such as examples of headers or URL formats. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Fetch a website and return the content as Markdown.' It specifies the verb ('fetch'), resource ('website'), and output format ('Markdown'). However, it doesn't explicitly differentiate from sibling tools like fetch_html, fetch_json, and fetch_txt, which likely fetch websites but return different formats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings (fetch_html, fetch_json, fetch_txt). It doesn't mention alternatives, exclusions, or specific contexts for preferring Markdown output over other formats. Usage is implied based on the need for Markdown, but no explicit guidelines are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fetch_txtA

Fetch a website, return the content as plain text (no HTML)

ParametersJSON Schema
NameRequiredDescriptionDefault
headersNoOptional headers to include in the request
urlYesURL of the website to fetch

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the action ('fetch') and output format, but lacks details on error handling, rate limits, authentication needs, timeouts, or what happens with non-text content. For a tool that performs network requests with no annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that is front-loaded with the core purpose. Every word earns its place by specifying the action, resource, and output format without redundancy or unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (network fetch with 2 parameters), no annotations, and no output schema, the description is incomplete. It covers purpose and usage but lacks behavioral details like error handling or output structure. It meets minimal viability but has clear gaps for a tool with no structured support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

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 both parameters (url and headers). The description does not add any meaning beyond what the schema provides, such as examples or constraints on URL formats or header usage. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('fetch a website') and the resource ('website'), and distinguishes it from siblings by specifying the output format ('plain text (no HTML)'). This directly contrasts with fetch_html, fetch_json, and fetch_markdown, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool by specifying the output format ('plain text (no HTML)'), which inherently indicates when not to use it (e.g., when HTML, JSON, or Markdown is needed). This provides clear alternatives by naming the sibling tools implicitly through their output formats.

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. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • First observedfetch_html
    • First observedfetch_json
    • First observedfetch_markdown
    • First observedfetch_txt

TDQS

A3.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose based on the output format (HTML, JSON, Markdown, plain text), with no overlap in functionality. The descriptions explicitly differentiate them by content type, making tool selection straightforward for an agent.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with 'fetch_' prefix and suffix indicating the output format (e.g., fetch_html, fetch_json). The naming is perfectly uniform and predictable across all four tools.

Tool Count5/5

With 4 tools, this server is well-scoped for fetching content in different formats. Each tool earns its place by covering a distinct output type, and the count is neither too thin nor excessive for the domain of URL-based content retrieval.

Completeness4/5

The toolset covers the core fetching operations for common content types (HTML, JSON, Markdown, plain text), with no dead ends. A minor gap exists in not handling other formats like XML or binary data, but agents can work around this for most use cases.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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