Instagram MCP自动化
MCP为@brandonio31提供的Instagram自动化系统-人工智能内容生成、调度、分析和参与管理
🎯 概述
该项目是一个使用模型上下文协议(MCP)构建的综合Instagram自动化系统。它支持自然语言命令来管理您的整个Instagram状态,从内容创建到分析。
✨ 特性
内容生成
- 使用Claude生成AI驱动的字幕
- 基于支柱的内容创意生成
- 标题细化和优化
- Hook Story课程模板支持
- 持续的品牌声音维护
发布和日程安排
- 自动化岗位安排
- 最佳发布时间(周一/周三/周五晚上7点,周二/周四上午9点,周六下午2点)
- 按周/月进行批量调度
- Instagram Graph API集成
分析与洞察
- 绩效跟踪(点赞、评论、覆盖率、参与率)
- 生长发育监测
- 内容比较分析
- 基于人工智能的见解和建议
敬业度管理
- 意见监测和建议答复
- DM管理
- 参与度分析
- 自动响应建议
日历管理
- 查看和管理内容日历
- 更新发布时间表
- 内容合规性检查
- 周/月计划
🏗️ 建筑
技术栈
- MCP-SDK:工具编排的模型上下文协议
- Instagram图形API v22.0:内容发布和分析
- API克劳德:AI内容生成
- PostgreSQL:内容和分析数据库
- TypeScript+Node.js:核心实施
MCP工具(15+)
generate_caption-创建AI驱动的字幕generate_content_ideas-产生帖子创意refine_caption-改进现有字幕schedule_post-安排单个职位schedule_week-安排内容周schedule_batch-批量安排多个帖子get_performance-获取岗位绩效指标get_insights-获得人工智能驱动的见解compare_posts-比较岗位绩效get_comments-检索最近的评论suggest_replies-AI建议评论回复get_dms-检索直接消息view_calendar-查看内容日历update_calendar-更新日历条目check_compliance-确保内容合规性
🚀 快速开始
先决条件
- Node.js 18+
- PostgreSQL数据库
- Instagram商业账号
- 脸书页面(链接到Instagram)
- API密钥
- Instagram访问令牌
安装
# Clone the repository
git clone https://github.com/abcnuts/instagram-mcp-automation.git
cd instagram-mcp-automation
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your credentials
# Initialize database
npm run db:init
# Build the project
npm run build
# Start the MCP server
npm start配置
创建一个 .env 文件包含:
# Instagram API
INSTAGRAM_ACCESS_TOKEN=your_access_token
INSTAGRAM_USER_ID=your_instagram_user_id
# Claude API
CLAUDE_API_KEY=your_claude_api_key
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/instagram_mcp
# Content Calendar
CALENDAR_PATH=./data/content-calendar.json
HASHTAGS_PATH=./data/hashtags.jsonClaude桌面集成
添加到您的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config.json 在Mac上):
{
"mcpServers": {
"instagram-automation": {
"command": "node",
"args": ["/path/to/instagram-mcp-automation/dist/index.js"]
}
}
}💬 用法示例
配置后,使用Claude中的自然语言命令:
"Create captions for Week 1 of my content calendar"
"Schedule this week's posts at optimal times"
"How did my posts perform this month?"
"Check my recent comments and suggest replies"
"Generate 5 content ideas about AI consciousness"
"What's on my calendar for next week?"📁 项目结构
instagram-mcp-automation/
├── src/
│ ├── index.ts # Main MCP server
│ ├── tools/ # MCP tool implementations
│ ├── services/ # Core services
│ │ ├── instagram.ts # Instagram API service
│ │ ├── claude.ts # Claude AI service
│ │ └── database.ts # Database service
│ ├── types/ # TypeScript types
│ └── utils/ # Utility functions
├── data/
│ ├── content-calendar.json # Your content calendar
│ ├── hashtags.json # Hashtag collections
│ └── brand-voice.json # Brand voice profile
├── database/
│ └── schema.sql # Database schema
├── .env.example # Environment template
├── package.json
├── tsconfig.json
└── README.md🔐 安全
- 永不承诺
.env或Git的凭据 - 对所有机密使用环境变量
- Instagram访问令牌过期-定期刷新
- 遵循Instagram的服务条款和费率限制
- 在PostgreSQL中加密存储敏感数据
📊 内容策略
发布时间表:每周3次
- 周一、周三、周五:晚上7点
- 周二、周四:上午9点
- 星期六:下午2点
内容支柱:
- 人工智能与技术
- 哲学与意识
- 个人成长
- 创造力与创新
🛠️ 发展
构建
npm run build发展模式
npm run dev测试
npm test代码检查
npm run lint📝 许可证
MIT许可证-有关详细信息,请参阅许可证文件
🤝 贡献
这是一个个人项目,但欢迎提出建议和改进!
📧 联系
Instagram: @布兰多尼奥31 github: @abc坚果
______________________________________________________________________
备注:此系统尊重Instagram的API费率限制和服务条款。在发布之前,请务必查看内容。
