项目简介
MCP Substack Server 是一个基于 Model Context Protocol (MCP) 构建的服务器,它可以下载并解析 Substack 博客平台上的文章内容,为大型语言模型 (LLM) 客户端提供 Substack 文章作为上下文信息。该服务器主要设计用于与 Claude.ai 桌面应用配合使用。
主要功能点
- 下载并解析公开的 Substack 文章。
- 提取文章标题、作者、副标题和正文内容。
- 通过 MCP 协议与 LLM 客户端通信,提供文章内容作为上下文资源。
- 允许 LLM 客户端通过 'download_substack' 工具调用服务器功能。
安装步骤
-
安装依赖: 在项目根目录下,运行以下命令安装项目依赖:
npm install -
配置 Claude 桌面应用: 打开 Claude 桌面应用的配置文件 '~/Library/Application Support/Claude/claude_desktop_config.json' (路径可能因操作系统而异),添加以下服务器配置信息到 'mcpServers' 字段中:
{ "mcpServers": { "mcp-substack": { "command": "/opt/homebrew/bin/node", "args": ["/path/to/mcp-substack/lib/index.mjs"], "methods": { "download_substack": { "description": "Download and parse content from a Substack post" } } } } }配置参数说明:
- 'server name': 'mcp-substack' (服务器名称,在 Claude 应用中引用)
- 'command': '/opt/homebrew/bin/node' (Node.js 解释器路径,请根据你的 Node.js 安装路径进行调整)
- 'args': '["/path/to/mcp-substack/lib/index.mjs"]' (服务器启动脚本路径,请将 '/path/to/mcp-substack' 替换为你的 'mcp-substack' 项目实际存放路径)
- 'methods': 定义服务器提供的工具方法
- 'download_substack': 工具方法名
- 'description': "Download and parse content from a Substack post" (工具方法的描述)
- 'download_substack': 工具方法名
-
启动服务器: 在项目根目录下,运行以下命令启动 MCP Substack Server:
npm start
基本使用方法
在 Claude 桌面应用中,你可以使用以下指令来调用 'download_substack' 工具,让服务器下载并总结指定的 Substack 文章:
Could you download and summarize this Substack post: [Substack 文章 URL]
将 '[Substack 文章 URL]' 替换为你要处理的 Substack 文章链接。Claude 应用会将该指令发送给 MCP Substack Server,服务器会下载文章内容并返回给 Claude 应用进行后续处理。
信息
分类
网页与API