Skip to main content
Glama
abdulsammad-lgtm

Instagram MCP Server

Instagram MCP Server

Ein produktionsreifer Model Context Protocol (MCP)-Server für die Interaktion mit Instagram-/Meta-APIs. Ermöglicht KI-Agenten die Verwaltung von Inhalten, die Analyse von Leistungskennzahlen, die Recherche von Wettbewerbern und die Abwicklung von Publishing-Workflows über strukturierte MCP-Tools.

Funktionen

  • Kontoverwaltung: Profilabruf, Kontoeinblicke, Medienauflistung

  • Inhaltsanalysen: Einblicke in Beiträge, Reels und Storys mit Engagement-Kennzahlen

  • Inhaltsgenerierung: Reel-Ideen, Bildunterschriften, Hashtags, Inhaltskalender

  • Wettbewerbsrecherche: Profilanalyse, Inhaltsvergleich, Wettbewerbsberichte

  • Kommentarverwaltung: Klassifizierung, Moderation, Auto-Antwort-Workflows

  • Publishing-Workflow: Container-Erstellung, Medienveröffentlichung, Statusverfolgung

  • Lead-Bewertung: Analyse von Geschäftsleads mit Bewertungsstufen

  • Audit-Protokollierung: Vollständige Anfrage-/Antwort-Protokollierung mit Ausführungsmetriken

Related MCP server: Instagram Control MCP Server

Voraussetzungen

  • Python 3.10+

  • Meta-Developer-App mit Zugriff auf die Instagram-Graph-API

  • Instagram-Unternehmenskonto, das mit deiner Meta-App verbunden ist

Schnellstart

1. Klonen und Installieren

git clone <repository-url>
cd instagram-mcp
pip install -r requirements.txt

2. Umgebung konfigurieren

cp .env.example .env

Bearbeite .env mit deinen Anmeldedaten:

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_id

3. Server starten

python server.py

Docker

docker-compose up --build

MCP-Client-Konfiguration

Füge Folgendes zu deiner MCP-Client-Konfiguration hinzu (z. B. Claude Desktop, Cursor):

{
  "mcpServers": {
    "instagram": {
      "command": "python",
      "args": ["server.py"],
      "cwd": "/path/to/instagram-mcp"
    }
  }
}

Verfügbare Tools

Account-Tools

Tool

Beschreibung

instagram_get_profile

Profilinformationen abrufen

instagram_get_account_insights

Analysen auf Kontoebene abrufen

instagram_get_media

Medienposts auflisten

instagram_get_media_details

Detaillierte Post-Infos abrufen

Analysetools

Tool

Beschreibung

instagram_get_post_insights

Leistungskennzahlen für Posts

instagram_get_reel_insights

Leistungskennzahlen für Reels

instagram_get_story_insights

Leistungskennzahlen für Storys

instagram_get_top_content

Beste Inhalte

instagram_compare_content

Vergleich von Zeiträumen

Inhaltstools

Tool

Beschreibung

instagram_analyze_content

Post-Struktur analysieren

instagram_generate_reel_ideas

Reel-Konzepte generieren

instagram_generate_caption

Bildunterschriften mit Hashtags generieren

instagram_generate_hashtags

Relevante Hashtags generieren

instagram_generate_content_calendar

Mehr-Tage-Kalender erstellen

instagram_find_content_patterns

Inhaltsmuster identifizieren

Wettbewerbs-Tools

Tool

Beschreibung

instagram_analyze_competitor

Wettbewerbsprofil analysieren

instagram_compare_accounts

Mehrere Konten vergleichen

instagram_find_competitor_content

Top-Wettbewerbsinhalte finden

instagram_competitor_report

Vollständiger Wettbewerbsbericht

Kommentar-Tools

Tool

Beschreibung

instagram_get_comments

Kommentare abrufen und klassifizieren

instagram_reply_comment

Auf einen Kommentar antworten

instagram_moderate_comments

Kommentare mit Klassifizierung moderieren

Publishing-Tools

Tool

Beschreibung

instagram_create_media_container

Publishing-Container erstellen

instagram_publish_media

Auf Instagram veröffentlichen

instagram_get_publish_status

Veröffentlichungsstatus prüfen

Lead-Tools

Tool

Beschreibung

instagram_analyze_leads

Leads bewerten und analysieren

Beispiel für natürliche Sprachbefehle

"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_accounts

KI-Entscheidungsebene

Der Server implementiert eine interne Entscheidungspipeline:

  1. Benutzeranfrage – Eingabe in natürlicher Sprache

  2. Absichtserkennung – Erforderliche Operation bestimmen

  3. Berechtigungsprüfung – API-Zugriff validieren

  4. Tool-Auswahl – Auf das passende MCP-Tool abbilden

  5. Instagram-API – Autorisierte API-Aufrufe ausführen

  6. Datenvalidierung – Antwortdaten validieren

  7. Analysen/Logik – Ergebnisse verarbeiten und analysieren

  8. Strukturierte Antwort – Formatiertes JSON zurückgeben

Kommentarklassifizierung

Kommentare werden automatisch in folgende Kategorien eingeteilt:

Kategorie

Beschreibung

positive

Lob, Komplimente, positives Feedback

negative

Beschwerden, Kritik, negative Stimmung

question

Fragen, Anfragen

lead

Kaufabsicht, geschäftliche Anfragen

spam

Werbe-Spam, Betrugsinhalte

support

Support-Anfragen, Problemberichte

other

Nicht klassifizierte Kommentare

Lead-Bewertung

Bewertungsbereich

Stufe

81-100

Sehr hoch

61-80

Hoch

31-60

Mittel

0-30

Niedrig

Bewertungsfaktoren: Follower-Anzahl, Veröffentlichungshäufigkeit, Geschäftskategorie, identifizierte Bedürfnisse, Vorhandensein einer Website.

Fehlerbehandlung

Alle Tools geben strukturierte Fehlerantworten zurück:

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT",
    "message": "Instagram API rate limit reached.",
    "retryable": true
  }
}

Fehlercodes: UNAUTHORIZED, FORBIDDEN, NOT_FOUND, RATE_LIMIT, SERVER_ERROR, NETWORK_ERROR, INVALID_MEDIA, PERMISSION_MISSING

Projektstruktur

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

Tests ausführen

pytest tests/ -v

Sicherheit

  • OAuth-2.0-Authentifizierung über die Meta-Graph-API

  • Zugriffstokens werden in Umgebungsvariablen gespeichert

  • Kein Scraping von Anmeldedaten oder Sitzungsextraktion

  • Berechtigungsprüfung vor Operationen

  • Rate-Limit-Handling mit Wiederholungslogik

  • Audit-Protokollierung für alle Tool-Ausführungen

  • Tokens oder Geheimnisse werden niemals in Antworten offengelegt

Lizenz

MIT

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    An 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.
    173
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Social media API and MCP server for AI agents that enables publishing to X, Instagram, LinkedIn, Reddit, Bluesky, and Threads from a single endpoint.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect any AI agent to 11+ social platforms: schedule, publish & track posts via hosted MCP.

  • Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.

  • Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abdulsammad-lgtm/instamgram_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server