Token导航 LogoToken导航

MCP Server · AI代理

MCP Webreader

MCP-WebReader 是一个用于获取和解析网页内容的 Swift MCP (Model Context Protocol) 服务器,支持分页获取和搜索模式。

未说明官方级别未说明来源级核验工具 0
Swift服务器工具浏览器自动化ClaudeClaude Desktop

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
mredig
提供方
mredig

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

2

仓库热度

收录来源

1 个

MCP World

选型结论

MCP Webreader 属于AI代理类 MCP Server,公开资料标注 0 个工具,通过传输方式未标注接入,适配 Claude Desktop、Claude,没有现成的安装命令;接入前先确认权限范围。

分类

AI代理

传输方式

未说明

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

公开资料仍需确认:安装命令

详细介绍

MCP网络阅读器

用于获取和解析web内容的Swift MCP(模型上下文协议)服务器。

TLDR-快速入门

通过Homebrew安装: (仅限macos) 使用brew来获得 披萨工具包,包含此(和其他工具)。

brew tap mredig/pizza-mcp-tools
brew update
brew install mcp-webreader

或者从源代码构建:

# Clone and build
git clone 
cd MCP-WebReader
swift build

添加到Zed设置 (~/.config/zed/settings.json):(推荐)

(在Zed中, Add Custom Server 并提供以下代码片段)

{
  /// The name of your MCP server
  "webreader": {
    /// The command which runs the MCP server
    "command": "mcp-webreader", // if building yourself, you'll need to provide the whole path
    /// The arguments to pass to the MCP server
    "args": [],
    /// The environment variables to set
    "env": {}
  }
}

或克劳德

# Add to Claude Desktop config at:
# ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "webreader": {
      "command": "/path/to/MCP-WebReader/.build/debug/mcp-webreader"
    }
  }
}

添加您自己的工具

  1. 创建一个新文件 在 Sources/MCPWebReaderLib/ToolImplementations/
  2. 扩展 ToolCommand 使用您的命令名
  3. 实施 ToolImplementation 协议
  4. 添加到注册表 在 ToolRegistry.swift

示例:添加计算器工具

// CalculatorTool.swift
import MCP
import Foundation

extension ToolCommand {
    static let calculate = ToolCommand(rawValue: "calculate")
}

struct CalculatorTool: ToolImplementation {
    static let command: ToolCommand = .calculate
    
    // JSON Schema reference: https://json-schema.org/understanding-json-schema/reference
    static let tool = Tool(
        name: command.rawValue,
        description: "Performs basic arithmetic operations",
        inputSchema: .object([
            "type": "object",
            "properties": .object([
                "operation": .object([
                    "type": "string",
                    "enum": .array([.string("add"), .string("subtract"), .string("multiply"), .string("divide")]),
                    "description": "The operation to perform"
                ]),
                "a": .object([
                    "type": "number",
                    "description": "First number"
                ]),
                "b": .object([
                    "type": "number",
                    "description": "Second number"
                ])
            ]),
            "required": .array([.string("operation"), .string("a"), .string("b")])
        ])
    )
    
    let operation: String
    let a: Double
    let b: Double
    
    init(arguments: CallTool.Parameters) throws(ContentError) {
        guard let operation = arguments.strings.operation else {
            throw .missingArgument("operation")
        }
        guard let a = arguments.doubles.a else {
            throw .missingArgument("a")
        }
        guard let b = arguments.doubles.b else {
            throw .missingArgument("b")
        }
        
        self.operation = operation
        self.a = a
        self.b = b
    }
    
    func callAsFunction() async throws(ContentError) -> CallTool.Result {
        let result: Double
        switch operation {
        case "add": result = a + b
        case "subtract": result = a - b
        case "multiply": result = a * b
        case "divide":
            guard b != 0 else {
                throw .contentError(message: "Division by zero")
            }
            result = a / b
        default:
            throw .contentError(message: "Unknown operation: \(operation)")
        }
        
        let output = StructuredContentOutput(
            inputRequest: "\(operation): \(a) and \(b)",
            metaData: nil,
            content: [["result": result]])
        
        return output.toResult()
    }
}

然后添加到 ToolRegistry.swift:

static let registeredTools: [ToolCommand: any ToolImplementation.Type] = [
    .echo: EchoTool.self,
    .getTimestamp: GetTimestampTool.self,
    .calculate: CalculatorTool.self,  // ← Add your tool here
]

就是这样!重建后,您的工具可用。

项目结构

MCP-WebReader/
├── Sources/MCPWebReaderLib/
│   ├── ToolRegistry.swift              ← Register your tools here
│   ├── ToolCommand.swift                ← Tool command constants
│   ├── ToolImplementations/             ← Put your tools here
│   │   ├── ToolImplementation.swift     ← Protocol definition
│   │   ├── EchoTool.swift               ← Example tool
│   │   └── GetTimestampTool.swift       ← Example tool
│   └── Support/                         ← Implementation details (don't need to modify)
│       ├── ServerHandlers.swift
│       ├── ToolSupport.swift
│       └── ...

工具实现模式

每个工具都遵循相同的模式:

  1. 扩展 ToolCommand -定义您的命令标识符
  2. 定义 static let tool -使用JSON模式定义MCP工具
  3. 提取参数 init -验证并转换为类型化属性
  4. 实施 callAsFunction -您的工具的业务逻辑

参数提取

使用 ParamLookup 用于提取类型化参数的助手:

arguments.strings.myStringParam    // String?
arguments.integers.myIntParam      // Int?
arguments.doubles.myDoubleParam    // Double?
arguments.bools.myBoolParam        // Bool?

错误处理

扔 ContentError 对于所有工具错误:

throw .missingArgument("paramName")
throw .mismatchedType(argument: "paramName", expected: "string")
throw .initializationFailed("custom message")
throw .contentError(message: "custom error")
throw .other(someError)

需求

  • Swift 6.0+
  • macOS 13.0+

测试

swift test

可用工具

Web内容工具

fetch-page

使用URLSession(无JavaScript渲染)获取网页内容。可以在两种模式下运行: 获取模式 (返回分页内容)或 搜索模式 (查找并返回所有与上下文匹配的项)。

参数:

  • url (必填,字符串)-要获取的URL(必须是http://或https://)
  • query (可选,字符串)-搜索查询。提供时,搜索整个网页并返回与上下文匹配的位置。如果省略,则返回分页内容。
  • offset (可选,整数)-分页的起始字符位置(默认值:0)。 当被忽略时 query 提供。
  • limit (可选,整数)-要返回的最大字符数(默认值:10000)。 当被忽略时 query 提供。
  • includeMetadata (可选,布尔值)-包括页面元数据,如标题和描述(默认值:true)

提取模式(无查询): 从网页返回分页内容。

{
  "text": "Page content here...",
  "title": "Page Title",
  "description": "Meta description if available",
  "url": "https://example.com",
  "contentLength": 12345,
  "returnedLength": 500,
  "offset": 0,
  "hasMore": true,
  "nextOffset": 500
}

搜索模式(带查询): 搜索整个网页,并返回与周围上下文的所有匹配项。

{
  "query": "search term",
  "matches": [
    {
      "position": 1234,
      "context": "...text before search term text after..."
    },
    {
      "position": 5678,
      "context": "...another match context..."
    }
  ],
  "totalMatches": 2,
  "title": "Page Title",
  "description": "Meta description if available",
  "url": "https://example.com",
  "webpageLength": 12345
}

注: 此工具不执行JavaScript。对于需要JavaScript渲染的页面,请使用 render-page 相反(即将推出)。

示例工具

  • echo -回传消息(演示参数处理)
  • get-timestamp -返回当前ISO 8601时间戳(演示无参数工具)

资源

  • webreader://status -服务器状态(JSON)
  • webreader://welcome -欢迎信息(文本)
  • webreader://config -服务器配置(JSON)

使用示例

获取网页

{
  "tool": "fetch-page",
  "arguments": {
    "url": "https://example.com"
  }
}

分页提取

{
  "tool": "fetch-page",
  "arguments": {
    "url": "https://example.com",
    "offset": 500,
    "limit": 1000
  }
}

在网页内搜索

{
  "tool": "fetch-page",
  "arguments": {
    "url": "https://example.com",
    "query": "search term"
  }
}

获取搜索结果周围的内容

搜索后,使用返回的位置获取特定的内容范围:

{
  "tool": "fetch-page",
  "arguments": {
    "url": "https://example.com",
    "offset": 1200,
    "limit": 500
  }
}

资源

许可证

MIT许可证

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

Swift本地部署网页抓取内容解析MCP协议Swift开发服务器工具

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

多步任务编排

把拆解、检索、执行串成一条链,模型按步骤调用工具。

长期上下文

把会话、笔记和知识放到外部存储,换个会话还能接着做。

接自有流程

把内部系统和模型连起来,让助手调用已有的工作流。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
MCP Webreader

MCP World · 本页

0未说明未标注1 个2026-05-17
Everything Claude Code

MCP World

0stdio有1 个2026-05-17
Filesystem 560c4363

MCP World

13未说明未标注2 个2026-05-17
Time 7365cb6d

MCP.so

2SSE有2 个2026-05-17
Server Everything (everything)

MCP World

11stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

MCP Webreader 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

MCP Webreader 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

MCP Webreader 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Webreader 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

MCP Webreader 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP