Skip to main content
Glama
jialinhome

page-fetcher-mcp

by jialinhome

Page Fetcher MCP Server

一个用于替代 Claude Code 内置 fetch 功能的 MCP (Model Context Protocol) 服务器,提供网页抓取和 API 数据获取能力。

功能特性

  • fetch_url: 从 URL 获取数据(API 端点、JSON 或任何网页内容)

  • scrape_url: 抓取并提取网页的可读文本内容

Related MCP server: mcp-web-scraper

安装

npm install

开发

构建项目

npm run build

开发模式运行

npm run dev

生产模式运行

npm start

使用方法

在 Claude Code 中配置

将此服务器添加到 Claude Code 的 MCP 配置中:

{
  "mcpServers": {
    "page-fetcher-mcp": {
      "command": "node",
      "args": ["/path/to/page-fetcher-mcp/dist/index.js"],
      "env": {}
    }
  }
}

可用工具

fetch_url

获取任意 URL 的数据(API、JSON、网页内容等)

参数:

  • url (必需): 要获取的 URL

  • headers (可选): 要包含在请求中的 HTTP 头

示例:

// 获取 API 数据
await mcp_fetch_call_tool('fetch_url', {
  url: 'https://api.github.com/users/octocat'
});

// 获取 JSON 数据
await mcp_fetch_call_tool('fetch_url', {
  url: 'https://jsonplaceholder.typicode.com/posts/1'
});

// 带自定义头获取
await mcp_fetch_call_tool('fetch_url', {
  url: 'https://api.example.com/data',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
});

scrape_url

抓取网页并提取可读文本内容

参数:

  • url (必需): 要抓取的 URL

  • selector (可选): CSS 选择器,用于提取特定元素

示例:

// 获取整个页面的文本内容
await mcp_fetch_call_tool('scrape_url', {
  url: 'https://example.com'
});

// 使用 CSS 选择器提取特定内容
await mcp_fetch_call_tool('scrape_url', {
  url: 'https://example.com',
  selector: 'h1'  // 只提取所有 h1 标题
});

// 提取文章内容
await mcp_fetch_call_tool('scrape_url', {
  url: 'https://example.com/article',
  selector: '.article-content'
});

项目结构

page-fetcher-mcp/
├── src/
│   └── index.ts          # 主服务器实现
├── dist/                 # 编译输出目录
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript 配置
└── README.md            # 项目文档

技术栈

许可证

MIT

Available Tools

2 tools
fetch_urlC

Fetch data from a URL (API endpoints, JSON, or any web content)

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to fetch data from
headersNoOptional HTTP headers to include in the request

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 doesn't mention whether this follows redirects, the response format, size limits, authentication handling, or what happens with malformed URLs. For a network-fetching tool, these behavioral details are important for an agent to use it safely and effectively.

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?

A single, concise sentence that communicates the core purpose without waste. Every word earns its place, and the content-type enumeration adds useful specificity.

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 tool with no annotations, no output schema, and no behavioral guidance, the description leaves significant gaps. An agent cannot determine response format, error handling, rate limits, or how this differs from scrape_url. The tool has moderate complexity (optional headers, nested objects) but the description only addresses the surface-level purpose.

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 both parameters (url and headers) are already documented in the schema. The description adds no additional parametric detail beyond what the schema provides. The baseline of 3 is appropriate when the schema handles parameter documentation adequately.

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 'Fetch data from a URL' with a specific verb (fetch) and resource (URL), and lists supported content types (API endpoints, JSON, web content). It's clear what the tool does but doesn't explicitly distinguish it from the sibling tool scrape_url, which likely fetches and parses HTML pages.

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 on when to use this tool versus scrape_url. The description lists supported content types but doesn't explain the difference between fetching raw data and scraping, nor does it mention any exclusions or edge cases. An agent wouldn't know which tool to pick when encountering HTML pages vs API endpoints.

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

scrape_urlB

Scrape and extract readable text content from a web page

ParametersJSON Schema
NameRequiredDescriptionDefault
csrNoCSR (Client-Side Rendering) specific options
urlYesThe URL to scrape
timeoutNoRequest timeout in milliseconds (default: 30000)
selectorNoOptional CSS selector to extract specific elements
renderModeNoRendering mode: auto (auto-fallback), ssr (server-side), or csr (client-side)

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden of behavioral disclosure. It doesn't mention whether this is a safe read-only operation, whether it makes network requests, what happens with JS-heavy pages requiring rendering, or any restrictions/rate limits. The 'readable text' wording hints at HTML stripping but no side-effect expectations are disclosed.

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?

A single sentence, zero waste, effectively front-loaded. Every word earns its place and there's nothing extraneous.

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?

The tool has 5 params including a nested csr object with 4 sub-options, signaling meaningful complexity around rendering modes. No output schema exists, so return format is undocumented. Given the complexity of renderMode/csr options and the sibling fetch_url ambiguity, the description is adequate but could benefit from explaining rendering fallback behavior and what the extracted output looks like.

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 coverage is 100%, so the schema parameter descriptions carry the load. The description adds the 'readable text content' semantic — implying extraction/processing beyond raw fetch. However, it doesn't explain how selector, renderMode, or csr options interact with the extraction logic, though those are documented in the schema. Baseline 3 is appropriate given high schema coverage.

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 states a clear verb+resource+outcome: 'Scrape and extract readable text content from a web page.' It clearly differs from the sibling tool fetch_url (which presumably fetches raw HTML) by specifying 'readable text content' as the extraction target, giving implicit differentiation.

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

Usage Guidelines3/5

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

The description says what it does but doesn't explicitly say when to use it vs fetch_url, nor when NOT to use it. The presence of a sibling tool named fetch_url suggests a decision point, but the description doesn't address it directly. The purpose wording ('readable text') implies a distinction but doesn't make it explicit.

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. 2 tool updatesv1.0.0
    • First observedfetch_url
    • First observedscrape_url

TDQS

C2.9/5.0
Disambiguation3/5

The two tools have broadly similar purposes - both fetch data from URLs. The distinction between 'fetch data' and 'scrape readable text content' is somewhat clear but could easily cause misselection for agents wanting raw HTML vs parsed content. The line between the two is fuzzy.

Naming Consistency4/5

Both tools follow the verb_noun pattern (fetch_url, scrape_url) with consistent snake_case naming. The conventions match, though the verbs are distinct in style rather than sharing a common action term.

Tool Count2/5

With only 2 tools, the server feels extremely thin. Even for a focused purpose like fetching web content, one might expect additional tools for handling different output formats, following redirects, or handling authentication. Two tools barely justify a server.

Completeness2/5

The surface appears incomplete even for the stated purpose. Missing operations like fetching HTML versus JSON versus extracted text as separate concerns, handling redirects, following links, or downloading files. The gap between 'raw fetch' and 'readable text extract' leaves a large middle ground uncovered.

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

  • F
    license
    Not graded
    quality
    F
    maintenance
    A lightweight MCP server implementation that provides a simple tool for fetching website content, demonstrating how tools can be exposed and interacted with using the MCP protocol.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A comprehensive web scraping MCP server with 26 tools for fetching, parsing, extracting, and assisting with web content, returning Markdown-formatted results.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    MCP server that provides read_page, screenshot, and pdf tools using a real browser, enabling agents to fetch clean markdown, screenshots, and PDFs from any URL.
    5
    38
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    MCP server for remote web scraping, providing a scrape_web tool that fetches pages and extracts content as markdown or JSON, supporting CSS selectors.
    1
    -

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/jialinhome/page-fetcher-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server