Skip to main content
Glama
vinihuge

igsight-mcp

by vinihuge

igsight-mcp

MCP server to read and analyze Instagram posts and profiles for AI agents.

Inspired by smorand/mcp-instagram (MIT). See NOTICE for attribution details.

PyPI: igsight-mcp

Quickstart

Prerequisites

Requirement

Notes

Python ≥ 3.11

Matches requires-python in the package

ffmpeg and ffprobe

On your PATH; needed for video/reel frame sampling and audio extraction

Transcription (optional)

Set IGSIGHT_TRANSCRIBE_* for Groq, OpenAI, or compatible Whisper APIs on video/reel posts

Install ffmpeg from your OS package manager (for example brew install ffmpeg, apt install ffmpeg, or ffmpeg.org).

Run the server

The MCP server speaks stdio. Most clients launch it for you via config (below). To run manually:

uvx igsight-mcp

From a git checkout:

uvx --from . igsight-mcp

Verify setup

After configuring your MCP client, call check_auth (no arguments). It reports cookie file status, ffmpeg, transcription config, cache paths, and built-in rate limits—without returning secret values (API keys and cookie contents are never echoed).

Fix any items in warnings (for example missing cookies file, loose file permissions, or datacenter IP hints) before calling get_post.

Example first get_post prompt in your client:

Use the get_post tool on https://www.instagram.com/p/SHORTCODE/ with default settings.

Related MCP server: Instagram MCP Server

MCP client configuration

Use the same command everywhere:

"command": "uvx",
"args": ["igsight-mcp"]

Add an env block for IGSIGHT_* variables (paths shown are examples—adjust for your machine).

Shared env example

"env": {
  "IGSIGHT_COOKIES_FILE": "/home/you/.config/igsight/cookies.txt",
  "IGSIGHT_CACHE_DIR": "/home/you/.cache/igsight-mcp",
  "IGSIGHT_CACHE_TTL": "3600",
  "IGSIGHT_TRANSCRIBE_BASE_URL": "https://api.groq.com/openai/v1",
  "IGSIGHT_TRANSCRIBE_API_KEY": "your-api-key-here",
  "IGSIGHT_TRANSCRIBE_MODEL": "whisper-large-v3-turbo"
}

Transcription is optional; omit the three IGSIGHT_TRANSCRIBE_* keys to skip speech-to-text.

Claude Desktop

Edit claude_desktop_config.json:

OS

Path

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "igsight": {
      "command": "uvx",
      "args": ["igsight-mcp"],
      "env": {
        "IGSIGHT_COOKIES_FILE": "/home/you/.config/igsight/cookies.txt"
      }
    }
  }
}

Restart Claude Desktop after saving.

Cursor

Project (repository root): .cursor/mcp.json

Global: ~/.cursor/mcp.json (macOS/Linux) or %USERPROFILE%\.cursor\mcp.json (Windows)

{
  "mcpServers": {
    "igsight": {
      "command": "uvx",
      "args": ["igsight-mcp"],
      "env": {
        "IGSIGHT_COOKIES_FILE": "/home/you/.config/igsight/cookies.txt"
      }
    }
  }
}

Reload MCP servers from Cursor settings after editing.

Grok Bot

In Grok Bot MCP settings, add a stdio server with command uvx, arguments ["igsight-mcp"], and the same env keys as above (UI labels vary; the transport is stdio JSON-RPC).

Generic stdio MCP JSON

{
  "mcpServers": {
    "igsight": {
      "command": "uvx",
      "args": ["igsight-mcp"],
      "env": {
        "IGSIGHT_COOKIES_FILE": "/path/to/cookies.txt",
        "IGSIGHT_CACHE_DIR": "/path/to/cache",
        "IGSIGHT_CACHE_TTL": "3600",
        "IGSIGHT_TRANSCRIBE_BASE_URL": "https://api.openai.com/v1",
        "IGSIGHT_TRANSCRIBE_API_KEY": "sk-...",
        "IGSIGHT_TRANSCRIBE_MODEL": "whisper-1"
      }
    }
  }
}

Tools

Tool

Inputs

Outputs

health_check()

(none)

status ("ok"), version (package version string), message (short status text)

get_post(url, max_frames=6, transcribe=True)

url — Instagram post or reel URL (or shortcode forms resolved by the server). max_frames — key frames for video/reel (clamped to 1–20; out-of-range values adjust with a warning). transcribe — when true, attempt speech-to-text on video/reel if transcription env is configured.

Structured content: kind (photo | carousel | video | reel), shortcode, author, caption, hashtags, mentions, timestamp, local_paths, warnings, optional likes, comments_count. Video/reel extras: duration, transcript (text, language, segments[] with start/end/text) when transcription succeeds. Content blocks: JPEG ImageContent for each carousel slide or sampled frame. Partial failures (download, ffmpeg, transcription) append human-readable strings to warnings without failing the whole tool when possible.

analyze_profile(handle, n=12)

handle — @username or profile URL. n — recent posts to analyze (clamped to 1–50; larger requests add a warning).

Profile fields: username, full_name, bio, external_url, verified, followers, following, posts_count. Analytics: posts (summaries), mix (% photo/carousel/video/reel), posting_frequency (posts_per_week, avg_gap_days, active weekdays/hours UTC), engagement (avg_likes, avg_comments, engagement_rate), top_posts, recurring_hashtags, recurring_keywords, first_caption_lines, warnings.

check_auth()

(none)

cookies_loaded, cookies_file (path only, or null), cookies_valid (true/false/null), ffmpeg_available, transcription_backend, transcription_configured, cache_dir, cache_ttl_seconds, rate_limit (built-in limiter settings), warnings. Never includes API keys or cookie values.

Environment variables

All configuration uses IGSIGHT_* environment variables (there is no separate config file). Defaults match the implementation in src/igsight_mcp/core/.

Variable

Default

Description

IGSIGHT_COOKIES_FILE

(unset)

Path to a Netscape-format cookies file. Optional for many public posts; recommended for reliable access. See docs/cookies.md.

IGSIGHT_CACHE_DIR

~/.cache/igsight-mcp

Root directory for JSON caches (posts, transcripts, get_post media metadata).

IGSIGHT_CACHE_TTL

3600

Cache entry lifetime in seconds. Invalid values fall back to 3600. 0 disables TTL reads (effectively no cache reuse).

IGSIGHT_TRANSCRIBE_BASE_URL

(empty)

OpenAI-compatible API base URL, without trailing slash. Required with API key and model to enable transcription.

IGSIGHT_TRANSCRIBE_API_KEY

(empty)

Bearer token for the transcription API. Never logged or returned by check_auth.

IGSIGHT_TRANSCRIBE_MODEL

(empty)

Model id for /audio/transcriptions.

There are no IGSIGHT_* rate-limit overrides; limits are fixed in code and reported by check_auth under rate_limit:

Field

Default

min_interval_seconds

3.0

max_interval_seconds

5.0

hourly_budget

200

bucket_capacity

1.0

refill_seconds

4.0

Transcription examples

Groq

"IGSIGHT_TRANSCRIBE_BASE_URL": "https://api.groq.com/openai/v1",
"IGSIGHT_TRANSCRIBE_API_KEY": "gsk_...",
"IGSIGHT_TRANSCRIBE_MODEL": "whisper-large-v3-turbo"

OpenAI

"IGSIGHT_TRANSCRIBE_BASE_URL": "https://api.openai.com/v1",
"IGSIGHT_TRANSCRIBE_API_KEY": "sk-...",
"IGSIGHT_TRANSCRIBE_MODEL": "whisper-1"

Alternative OpenAI model example: gpt-4o-mini-transcribe (if your account exposes it on the same API).

All three transcription variables must be set together; otherwise video/reel posts still return frames but add a transcription warning.

Cookies

See docs/cookies.md for exporting Netscape cookies.txt, chmod 600, secondary accounts, and keeping cookies out of git.

Account safety and rate limits

igsight-mcp is built for occasional, read-only agent use—not bulk scraping.

  • Built-in rate limiting spaces Instagram requests (roughly 3–5 seconds jitter between calls, token bucket, and an hourly budget of 200 requests). Hitting limits raises a rate-limit error; wait and retry.

  • No bulk scraping — do not loop thousands of profiles or posts through the tools.

  • Avoid datacenter IPs — Instagram often blocks cloud VPS IPs. Prefer a home or office network where you normally use Instagram. check_auth warns when common cloud environment variables are detected.

  • Use a secondary account and exported cookies rather than hammering anonymous endpoints.

Not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. Instagram is a trademark of Meta.

You are responsible for complying with Instagram’s Terms of Use, applicable copyright law, and privacy rules. This project provides read-only access to public (or session-allowed) content for personal/agent assistance. Do not use it to harass users, bypass paywalls, or redistribute media against creators’ rights. Respect creators and platform policies.

Demo

Demo: get_post in an MCP client

Development

Requires uv. See CONTRIBUTING.md.

uv sync --all-groups
make check          # ruff, mypy --strict, pytest
uv run igsight-mcp  # stdio MCP server
uvx --from . igsight-mcp

Support the project

If igsight-mcp saves you time, consider sponsoring on GitHub Sponsors.

Crypto

Always double-check the network before sending; funds sent on the wrong network may be lost.

Network

Address

QR

Bitcoin (BTC)

bc1qfm4mhns9j4s589lhc9xq6asxpf5x93vhxkdlnn

Bitcoin QR

EVM (Ethereum, BNB Smart Chain, Arbitrum; ETH and USDC/USDT on those networks)

0x816895DFd46328258Bc11E133bD6d659Ccd0E323

EVM QR

Solana (SOL, USDC)

7zvKEwXR5KpbwoorQ4JhjhPSDDkwujKu7tN4BSeAq3Ci

Solana QR

Tron (TRX, USDT TRC-20)

TRk3jC7FjkDpLyHThVogP5pPeeufkSTQ7C

Tron QR


Built by Vinícius · creator of WeTrackWise

Related MCP Connectors

  • Instagram search and posts for AI agents, with images and videos AI-parsed to text.

  • Instagram data for AI agents: profiles, posts, reels, followers. Influencer + brand research.

  • Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.

  • Your agent needs public Instagram data — a creator's posts and reels, what a hashtag is producing, what a video actually says. The official Graph API only sees accounts you already own, and needs app review to see those. **What you can ask for** • "Pull this creator's last 50 posts and reels with engagement counts." • "What is trending under #skincare this week, and which profiles keep appearing?" • "Transcribe this reel and tell me what the hook in the first three seconds is." • "Read the comments on this post and group the objections." • "Which reels use this song right now?" **How to use it** Point any MCP client at https://mcp.aisa.one/instagram/mcp and sign in with OAuth — there is no key to create or paste. 17 read tools: profiles (basic and full), a user's posts, reels and highlights, post and profile digests, post comments, reels search, trending reels, reels by song, hashtag and profile search, and media transcripts. **Why this rather than the source** Public profiles without owning the account, and no app review to sit through. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Size a creator's audience here, then ask the same agent what their brand's site traffic looks like or who to contact there — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/social/mcp for X plus Instagram, Reddit, Pinterest and YouTube; https://mcp.aisa.one/gtm/mcp for those plus Similarweb and Apollo.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to interact with Instagram through a comprehensive toolkit for account management, content creation, messaging, social graph analysis, and content discovery.
    12
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Connects Claude to the official Meta Instagram Graph API (read-only) for retrieving Instagram profile, media, insights, and comments as MCP tools over Streamable HTTP.
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables agents to interact with Instagram through 49 tools for direct messages, feed, profiles, search, and persona discovery, with write actions disabled by default until explicitly enabled.
    4
    49
    -