Instagram MCP Server
Instagram MCP 서버
Instagram/Meta API와 상호작용하기 위한 프로덕션 준비 완료 Model Context Protocol(MCP) 서버입니다. AI 에이전트가 구조화된 MCP 도구를 통해 콘텐츠를 관리하고, 성과를 분석하고, 경쟁사를 조사하고, 게시 워크플로를 처리할 수 있게 해줍니다.
기능
계정 관리: 프로필 조회, 계정 인사이트, 미디어 목록
콘텐츠 분석: 참여 지표가 포함된 게시물, 릴스, 스토리 인사이트
콘텐츠 생성: 릴스 아이디어, 캡션, 해시태그, 콘텐츠 캘린더
경쟁사 조사: 프로필 분석, 콘텐츠 비교, 경쟁사 보고서
댓글 관리: 분류, 모더레이션, 자동 응답 워크플로
게시 워크플로: 컨테이너 생성, 미디어 게시, 상태 추적
리드 스코어링: 점수 등급이 포함된 비즈니스 리드 분석
감사 로깅: 실행 지표가 포함된 전체 요청/응답 로깅
Related MCP server: Instagram Control MCP Server
사전 요구 사항
Python 3.10+
Instagram Graph API 액세스 권한이 있는 Meta 개발자 앱
Meta 앱에 연결된 Instagram 비즈니스 계정
빠른 시작
1. 클론 및 설치
git clone <repository-url>
cd instagram-mcp
pip install -r requirements.txt2. 환경 구성
cp .env.example .env자격 증명으로 .env를 편집하세요:
META_APP_ID=your_meta_app_id
META_APP_SECRET=your_meta_app_secret
INSTAGRAM_ACCESS_TOKEN=your_instagram_access_token
INSTAGRAM_BUSINESS_ACCOUNT_ID=your_instagram_business_account_id3. 서버 실행
python server.pyDocker
docker-compose up --buildMCP 클라이언트 구성
MCP 클라이언트 구성(예: Claude Desktop, Cursor)에 추가하세요:
{
"mcpServers": {
"instagram": {
"command": "python",
"args": ["server.py"],
"cwd": "/path/to/instagram-mcp"
}
}
}사용 가능한 도구
계정 도구
도구 | 설명 |
| 프로필 정보 가져오기 |
| 계정 수준 분석 가져오기 |
| 미디어 게시물 목록 |
| 상세 게시물 정보 가져오기 |
분석 도구
도구 | 설명 |
| 게시물 성과 지표 |
| 릴스 성과 지표 |
| 스토리 성과 지표 |
| 최고 성과 콘텐츠 |
| 기간 대비 비교 |
콘텐츠 도구
도구 | 설명 |
| 게시물 구조 분석 |
| 릴스 콘셉트 생성 |
| 해시태그가 포함된 캡션 생성 |
| 관련 해시태그 생성 |
| 다일 캘린더 생성 |
| 콘텐츠 패턴 식별 |
경쟁사 도구
도구 | 설명 |
| 경쟁사 프로필 분석 |
| 여러 계정 비교 |
| 최고 경쟁사 콘텐츠 찾기 |
| 전체 경쟁사 보고서 |
댓글 도구
도구 | 설명 |
| 댓글 가져오기 및 분류 |
| 댓글에 답글 달기 |
| 분류와 함께 모더레이션 |
게시 도구
도구 | 설명 |
| 게시 컨테이너 생성 |
| Instagram에 게시 |
| 게시 상태 확인 |
리드 도구
도구 | 설명 |
| 리드 점수 산정 및 분석 |
자연어 명령 예시
"What were my best performing Reels last month?"
→ instagram_get_reel_insights (multiple calls) → sort → analyze → top results
"Generate a 30-day content calendar for an AI automation agency"
→ instagram_generate_content_calendar
"Analyze my competitor @examplebrand"
→ instagram_analyze_competitor → instagram_find_competitor_content
"What comments need moderation on my latest post?"
→ instagram_get_comments → classify → filter
"Compare my engagement with @competitor1 and @competitor2"
→ instagram_compare_accountsAI 의사 결정 레이어
서버는 내부 의사 결정 파이프라인을 구현합니다:
사용자 요청 - 자연어 입력
의도 감지 - 필요한 작업 결정
권한 확인 - API 액세스 검증
도구 선택 - 적절한 MCP 도구에 매핑
Instagram API - 승인된 API 호출 실행
데이터 검증 - 응답 데이터 검증
분석/추론 - 결과 처리 및 분석
구조화된 응답 - 형식화된 JSON 반환
댓글 분류
댓글은 자동으로 다음 범주로 분류됩니다:
범주 | 설명 |
| 칭찬, 호의적 반응, 긍정적 피드백 |
| 불만, 비판, 부정적 감정 |
| 질문, 문의 |
| 구매 의도, 비즈니스 문의 |
| 홍보성 스팸, 사기 콘텐츠 |
| 지원 요청, 문제 신고 |
| 분류되지 않은 댓글 |
리드 스코어링
점수 범위 | 등급 |
81-100 | 매우 높음 |
61-80 | 높음 |
31-60 | 중간 |
0-30 | 낮음 |
점수 산정 요소: 팔로워 수, 게시 빈도, 비즈니스 카테고리, 식별된 니즈, 웹사이트 존재 여부.
오류 처리
모든 도구는 구조화된 오류 응답을 반환합니다:
{
"success": false,
"error": {
"code": "RATE_LIMIT",
"message": "Instagram API rate limit reached.",
"retryable": true
}
}오류 코드: UNAUTHORIZED, FORBIDDEN, NOT_FOUND, RATE_LIMIT, SERVER_ERROR, NETWORK_ERROR, INVALID_MEDIA, PERMISSION_MISSING
프로젝트 구조
instagram-mcp/
├── server.py # Main MCP server with tool definitions
├── config.py # Configuration management
├── requirements.txt # Python dependencies
├── .env.example # Environment template
├── Dockerfile # Container configuration
├── docker-compose.yml # Docker Compose setup
├── mcp/
│ ├── tools/ # MCP tool implementations
│ │ ├── account.py # Account tools
│ │ ├── analytics.py # Analytics tools
│ │ ├── content.py # Content generation tools
│ │ ├── comments.py # Comment management tools
│ │ ├── publishing.py # Publishing workflow tools
│ │ └── competitors.py # Competitor research tools
│ └── schemas/ # Pydantic data models
│ ├── account.py
│ ├── content.py
│ └── analytics.py
├── services/ # Business logic layer
│ ├── instagram_api.py # Instagram Graph API client
│ ├── analytics.py # Analytics calculations
│ ├── content_ai.py # Content generation engine
│ └── lead_scoring.py # Lead analysis and scoring
├── database/ # Data persistence
│ ├── models.py # SQLAlchemy models
│ └── repository.py # Database operations
└── tests/ # Unit tests
├── test_account.py
├── test_analytics.py
├── test_publishing.py
└── test_errors.py테스트 실행
pytest tests/ -v보안
Meta Graph API를 통한 OAuth 2.0 인증
액세스 토큰은 환경 변수에 저장
자격 증명 스크래핑 또는 세션 추출 없음
작업 전 권한 검증
재시도 로직이 포함된 속도 제한 처리
모든 도구 실행에 대한 감사 로깅
응답에 토큰이나 비밀 노출 없음
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram MCP for DM and comment automation, AI Agent and content publishing via Meta's official API
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Agent-first social media publishing, scheduling, analytics, and unified inbox API + 16-tool MCP server across 18 social platforms (X, LinkedIn, Instagram, YouTube, TikTok, Threads, Bluesky, Reddit, Telegram, Discord, Mastodon, Facebook, Pinterest).
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that integrates with Instagram's Graph API to enable AI-driven management of Instagram Business accounts. It provides tools for fetching profile data, publishing media, analyzing engagement metrics, and managing direct messages.203MIT
- AlicenseBqualityCmaintenanceA professional, full-fidelity MCP server enabling AI agents to fully control and manage an Instagram account exactly like a human user.6821 PyPI5MIT
- AlicenseBqualityFmaintenanceMCP server that connects AI agents to Instagram for reading statistics, insights, and comments via the official Meta Graph API.162MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready Remote MCP Server that gives Claude direct, tool-based access to your Instagram Business account through the Meta Graph API — profile data, posts, comments, publishing, insights, analytics, hashtags, messaging, and real-time webhooks.11 npmMIT