Skip to main content
Glama
guangxiangdebizi

web-retrieval-mcp

🌐 Web Retrieval MCP

一个专门用于解析网页设计结构的 Model Context Protocol (MCP) 工具。通过提供URL,即可获得详细的页面结构分析,包括布局、导航、内容区域、表单、图片等元素的完整信息。

✨ 功能特性

  • 🏗️ 页面布局分析 - 自动识别头部、底部、侧边栏等布局元素

  • 📝 标题结构解析 - 提取并分析H1-H6标题层次结构

  • 🧭 导航结构识别 - 解析网站导航菜单和链接结构

  • 📄 内容区域提取 - 识别主要内容区域和文本内容

  • 📋 表单信息分析 - 解析表单字段、提交方式等信息

  • 🖼️ 图片资源统计 - 统计页面图片资源和属性信息

  • 🔗 链接关系分析 - 区分内部链接和外部链接

  • 🎨 样式特征检测 - 检测响应式设计、字体等样式信息

Related MCP server: Scrapezy MCP Server

🚀 快速开始

安装依赖

npm install

构建项目

npm run build

启动服务

Stdio 模式(本地开发)

npm start

SSE 模式(通过 Supergateway)

# 安装 supergateway
npm install -g supergateway

# 启动 SSE 服务器
npm run sse

服务将在 http://localhost:3100 启动。

🔧 Claude 配置

Stdio 模式配置

在 Claude 的 MCP 配置中添加:

{
  "mcpServers": {
    "web-retrieval-mcp": {
      "command": "node",
      "args": ["path/to/web-retrieval-mcp/build/index.js"]
    }
  }
}

SSE 模式配置

{
  "mcpServers": {
    "web-retrieval-mcp": {
      "type": "sse",
      "url": "http://localhost:3100/sse",
      "timeout": 600
    }
  }
}

📖 使用方法

工具:analyze_web_structure

深度解析指定URL网页的前端设计架构与后端交互面。

参数

  • url (必需): 要解析的网页URL地址

示例

analyze_web_structure({
  url: "https://example.com"
})

输出示例(节选)

# 🌐 网页结构分析报告

**URL:** https://example.com
**标题:** Example Domain
**描述:** This domain is for use in illustrative examples

---

## 🏗️ 前端架构画像

- 框架候选: React, Next.js
- SPA 判定: ✅ 可能是 SPA
- 路由线索: React Router
- 构建工具线索: Webpack, Next.js build
- CSS 框架: Tailwind
- 微前端线索: 无

## 🔌 后端交互面(可通向后端的触点)

### 表单
- 表单 1: POST -> https://example.com/api/login [CSRF]
  - 字段: hidden token(_csrf), text(username), password(password)

### API/HTTP 端点
- https://example.com/api/v1/user
- https://api.example.com/graphql

### WebSocket
- wss://ws.example.com/realtime

...

🛠️ 开发

项目结构

src/
├── index.ts                    # MCP服务器主入口
└── tools/                      # 业务工具模块
    └── web-structure-analyzer.ts # 网页结构解析工具

开发模式

# 监听文件变化并自动重新编译
npm run dev

📋 技术栈

  • TypeScript - 类型安全的JavaScript

  • @modelcontextprotocol/sdk - MCP SDK

  • Cheerio - 服务端jQuery实现,用于HTML解析

  • Axios - HTTP客户端,用于获取网页内容

🔒 安全考虑

  • 请求超时设置为10秒,避免长时间等待

  • 使用标准浏览器User-Agent,提高兼容性

  • 限制链接和内容提取数量,避免内存溢出

  • URL格式验证,确保输入安全

📄 许可证

Apache License 2.0

👨‍💻 作者

Xingyu Chen

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📝 更新日志

v1.0.0

  • 🎉 初始版本发布

  • ✅ 基础网页结构解析功能

  • ✅ 支持布局、导航、内容、表单、图片、链接分析

  • ✅ 样式特征检测

  • ✅ MCP协议支持

Available Tools

1 tool
analyze_web_structureB

深度解析指定URL网页的前端设计架构与后端交互面(仅需url参数)

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes要解析的网页URL地址

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It states the tool analyzes front-end and back-end aspects, but does not mention if it is read-only, what the output format is, any authentication needs, or rate limits. This leaves the agent uninformed about side effects or constraints.

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 with no wasted words. It front-loads the key action and resource, earning its place.

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 no output schema, the description should explain what the analysis returns. It does not. The tool is simple (one parameter), but the description lacks details about the output, making it incomplete for an agent to fully understand the tool's behavior.

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 input schema covers 100% of parameters with a description for 'url'. The description adds the phrase 'only url parameter needed', but this is already implied by the required field. No additional semantic meaning beyond the schema is provided.

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 tool's purpose: 'deeply analyze the front-end design architecture and back-end interaction surface' of a specified URL. The verb 'analyze' and the resource 'web structure' are specific. No sibling tools exist, so no distinction needed, but the description is unique and unambiguous.

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 gives no guidance on when to use this tool versus alternatives. It only mentions that only a URL parameter is needed. There is no mention of prerequisites, exclusions, or context for appropriate use.

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

TDQS

B3.3/5.0
Disambiguation5/5

With only one tool, there is no ambiguity or overlap; the agent can only select that tool.

Naming Consistency5/5

The single tool name 'analyze_web_structure' follows a clear verb_noun pattern, consistent with good naming conventions.

Tool Count2/5

A single tool for a 'web-retrieval-mcp' server feels too limited; typically web retrieval involves multiple operations like fetching, parsing, or searching, making one tool insufficient for meaningful coverage.

Completeness2/5

The tool only analyzes web structure, omitting essential retrieval actions such as fetching raw content, extracting text, or handling different content types, leaving significant gaps for the stated domain.

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/guangxiangdebizi/web-retrieval-mcp'

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