Substack MCP 服务器是一个模型上下文协议(MCP)服务器,它让Claude和其他人工智能助手能够与Substack新闻通讯、文章以及用户资料进行交互,为AI使用Substack数据提供了便捷途径。
该项目把Substack API 库转换成了Anthropic的MCP服务器,让Claude可以实现以下功能:
# 克隆仓库
git clone https://github.com/Greg-Swiftomatic/substack-mcp-server.git
cd substack-mcp-server
# 设置虚拟环境
python -m venv venv
source venv/bin/activate # Windows:venv\Scripts\activate
# 安装依赖项
pip install -r requirements.txt
或者使用uv:
# 使用uv进行更快的安装
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
python substack_mcp.py
# MacOS
open ~/Library/Logs/Claude/mcp*.log
# Windows
type %APPDATA%\Claude\mcp*.log
claude-config.json:{
"context_providers": {
"substack_mcp": {
"type": "custom",
"class": "SubstackMCPProvider",
"args": {
"server_url": "http://localhost:1234"
}
}
}
}
get_newsletter_posts)newsletter_id(必需){
"posts": [
{
"id": "123",
"title": "最新科技动态",
"content": "探索未来科技趋势..."
}
],
"metadata": {
"total_count": 10,
"page": 1
}
}
get_user_profile){
"user_id": "456",
"username": "tech_guru",
"subscriber_count": 10000
}
search_posts)query(必需),newsletter_id(可选){
"results": [
{
"id": "789",
"title": "AI的未来",
"contentSnippet": "...人工智能的应用与发展..."
}
],
"metadata": {
"total_count": 20,
"page": 1
}
}
# 克隆仓库
git clone https://github.com/Greg-Swiftomatic/substack-mcp-server.git
# 创建新功能分支
git checkout -b feature/amazing-feature
# 提交更改
git commit -m '添加了令人惊叹的功能'
# 推送到远程仓库
git push origin feature/amazing-feature
本项目根据MIT License授权,具体内容请参阅LICENSE文件。