子堆栈 MCP
用于 Substack API 与 Claude 和其他 AI 助手集成的 MCP(模型上下文协议)服务器。
概述
该项目实现了一个模型上下文协议 (MCP) 服务器,使像 Claude 这样的 AI 助手能够通过标准化界面与 Substack 的新闻通讯、帖子和作者进行交互。它利用Substack API 库,并通过 MCP 提供其功能。
使用此 MCP 服务器,Claude 可以:
检索新闻稿、播客和推荐
获取帖子内容和元数据
在新闻通讯中搜索帖子
获取用户个人资料信息和订阅
安装
先决条件
Python 3.10 或更高版本
Claude 桌面版(用于测试)
设置
克隆此存储库:
git clone https://github.com/Greg-Swiftomatic/substack-mcp.git cd substack-mcp使用
uv
设置虚拟环境:curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv if not already installed uv init . uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate安装依赖项:
uv add "mcp[cli]" substack-api
用法
运行服务器
运行 MCP 服务器:
为桌面配置 Claude
打开Claude for Desktop的配置文件:
macOS/Linux :
~/Library/Application Support/Claude/claude_desktop_config.json
Windows :
%APPDATA%\Claude\claude_desktop_config.json
添加您的服务器配置:
{ "mcpServers": { "substack": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/substack-mcp", "run", "substack_mcp.py" ] } } }重新启动 Claude 桌面版。
示例查询
配置完成后,您可以向 Claude 询问以下问题:
“显示来自https://stratechery.com/的最新帖子”
“这篇文章的内容是什么: https://stratechery.com/2023/the-ai-unbundling/ ”
在https://stratechery.com/上搜索“AI”
“ https://stratechery.com/的作者是谁?”
可用工具
该服务器提供以下 MCP 工具:
工具 | 描述 |
| 从 Substack 新闻通讯中检索最新帖子 |
| 获取特定 Substack 帖子的完整内容 |
| 搜索新闻通讯中的帖子 |
| 获取有关 Substack 作者的信息 |
| 获取 Substack 出版物的推荐新闻通讯 |
| 获取 Substack 时事通讯的作者 |
项目结构
substack_mcp.py
- 主 MCP 服务器实现examples/
- 查询和响应示例docker/
- 用于容器化部署的 Docker 配置
发展
为该项目做出贡献:
分叉存储库
创建功能分支(
git checkout -b feature/amazing-feature
)提交您的更改(
git commit -m 'Add some amazing feature'
)推送到分支(
git push origin feature/amazing-feature
)打开拉取请求
故障排除
如果您遇到问题:
检查 Claude 的日志是否存在错误:
# macOS/Linux tail -n 20 -f ~/Library/Logs/Claude/mcp*.log # Windows type %APPDATA%\Claude\Logs\mcp*.log验证您的服务器是否构建并运行,没有错误:
python substack_mcp.py确保您的
claude_desktop_config.json
文件具有正确的路径和语法。尝试完全重启 Claude for Desktop。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
Substack API - Substack 交互的底层库
模型上下文协议- Anthropic 的标准化 LLM 集成协议
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
MCP 服务器使 Claude 等 AI 助手能够与 Substack 新闻通讯进行交互,从而允许通过标准化界面进行帖子检索、内容搜索和作者信息访问。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that helps AI assistants access text content from websites that implement bot detection, bridging the gap between what you can see in your browser and what the AI can access.Last updated -250Apache 2.0
- -securityFlicense-qualityA specialized MCP server that enables AI agents to interact with Reddit, including reading posts, creating content, and managing subreddit configurations.Last updated -58
- AsecurityFlicenseAqualityAn MCP server that connects AI assistants to SearchAgora, enabling users to search for, discover, and purchase products across the web through natural language conversations.Last updated -62
- -securityFlicense-qualityA MCP server that allows AI assistants to interact with the browser, including getting page content as markdown, modifying page styles, and searching browser history.Last updated -82