Skip to main content

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

Fastest path: install into your MCP client (sets IGSIGHT_COOKIES_FROM_BROWSER=auto to read cookies from your logged-in browser), restart the client, then call get_post on a public Instagram URL.

igsight-mcp install --client cursor    # or: claude | vscode | all
igsight-mcp doctor                     # friendly checklist + fixes

One-click (same config as install; log into Instagram in Chrome first):

Add to Cursor

Install in VS Code

Claude Desktop: download igsight-mcp.mcpb from GitHub Releases and open it in Claude Desktop, or run igsight-mcp install --client claude.

Requires uv (for uvx) and Python ≥ 3.11. No API keys required for public posts.

Optional extras

Extra Purpose
igsight-mcp[local] Offline transcription via faster-whisper when no cloud IGSIGHT_TRANSCRIBE_* keys are set (IGSIGHT_TRANSCRIBE_BACKEND defaults to auto)
igsight-mcp[ffmpeg] Bundled ffmpeg when none is on PATH (GPL binary — opt-in; see NOTICE)
igsight-mcp[complete] [local] + [ffmpeg]
igsight-mcp[ocr] On-screen text in get_post(..., ocr=True)

System ffmpeg/ffprobe on PATH is still preferred when available. Without ffprobe, duration is read via ffmpeg.

Run the server manually

uvx igsight-mcp                  # stdio (default)
uvx igsight-mcp --transport http # streamable HTTP on 127.0.0.1:8000

From a git checkout: uvx --from . igsight-mcp

Verify setup

In the client, call check_auth, or from a terminal run igsight-mcp doctor. Both report cookie source (file, browser:…, or none), ffmpeg, transcription backend, and rate limits without echoing secrets.

Let your agent set it up

Point your agent at llms.txt and AGENTS.md, then use a one-line prompt:

Install igsight-mcp following llms.txt and run self_test, then give feedback

Example first get_post prompt in your client:

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

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_FROM_BROWSER": "chrome",
  "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_FROM_BROWSER": "chrome"
      }
    }
  }
}

Because the MCP server runs on the same machine as your browser, IGSIGHT_COOKIES_FROM_BROWSER avoids exporting cookies.txt. Alternatively set IGSIGHT_COOKIES_FILE (see docs/cookies.md).

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_FROM_BROWSER": "chrome"
      }
    }
  }
}

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

v1.0 highlights: stories and highlights (cookies), multi-profile compare_profiles, scene-change video frames with uniform fallback, optional OCR extra, nightly upstream smoke in CI, and the full docs/ set linked below.

Tool Inputs Outputs
health_check() (none) status ("ok"), version (package version string), message (short status text)
get_post(url, max_frames=6, transcribe=True, ocr=False) 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. ocr — when true and igsight-mcp[ocr] is installed, extract on-screen text per image/frame (otherwise a warning with install hint). 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; frames prefer scene cuts (IGSIGHT_FRAME_STRATEGY=scene, fallback to uniform with warnings). OCR extras: optional ocr_frames, on_screen_text when enabled. Content blocks: JPEG ImageContent for each carousel slide or sampled frame. Partial failures (download, ffmpeg, transcription, OCR) append human-readable strings to warnings without failing the whole tool when possible.
compare_profiles(handles, n=12) handles — 2–5 @username or profile URLs (duplicates de-duplicated with a warning). n — recent posts per profile (clamped to 1–50 like analyze_profile). profiles (compact summary per handle), table (followers, posting cadence, mix %, engagement, top hashtags/keywords), themes (shared vs unique), leaders (best per metric), warnings. One failing profile becomes an error row; others still return.
get_stories(handle, limit=20) handle — profile username or URL. limit — story items (clamped to 1–50). Requires session cookies (file or browser). Story items in the same shape as get_post (metadata, images, optional video transcript), plus warnings. Without cookies: clear login-required error, no network.
get_highlights(handle, max_highlights=10, items_per_highlight=20) handle — profile username or URL. Caps clamped (max_highlights ≤ 30, items_per_highlight ≤ 50). Requires session cookies (file or browser). List of { id, title, cover, items:[...] } with get_post-compatible items and warnings.
analyze_profile(handle, n=12, transcribe_top_reels=0) handle — @username or profile URL. n — recent posts to analyze (clamped to 1–50). transcribe_top_reels — when 1–3, transcribe speech on that many top-engagement reels among the analyzed posts (requires ffmpeg + a configured transcription backend). Profile fields: username, full_name, bio, external_url, verified, followers, following, posts_count. Analytics: posts, mix, posting_frequency, engagement, top_posts, recurring_hashtags, recurring_keywords, first_caption_lines, optional top_reels_transcripts (shortcode, engagement, transcript payload), warnings.
get_comments(url, limit=50) url — post, reel, or IGTV URL/shortcode. limit — comments to return (clamped to 1–200). comments (username, text, timestamp, likes, etc.) and warnings. Requires session cookies (file or browser).
download_media(url, audio_only=False) url — post or reel URL/shortcode. audio_only — when true, extract one MP3 from video/reel instead of saving video files. kind, absolute local_paths under the cache media directory, and warnings. Carousel downloads are capped (see implementation).
check_auth() (none) cookies_loaded, cookies_file (path when using a file, else null), cookies_source (file, browser:<name>, or none), has_sessionid, cookies_valid (true/false/null), ffmpeg_available, transcription_backend, transcription_configured, cache_dir, cache_ttl_seconds, rate_limit, warnings. Never includes API keys or cookie values.
self_test(profile="nasa", skip_network=False, skip_cookie_steps=False, skip_download=False) profile — public handle for analyze_profile. Toggles skip network-heavy steps, cookie-only get_comments, or download_media. worked, skipped, errors (step + message), missing_config, suggestions, summary, version. Uses the built-in rate limiter (~5 Instagram requests when network steps run). Never returns secrets.

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. Wins over browser if both are set. See docs/cookies.md.
IGSIGHT_COOKIES_FROM_BROWSER auto when unset auto tries installed browsers (cached) for an instagram.com session. Or set chrome, firefox, safari, edge, brave, chromium, or chrome:Profile 1 (yt-dlp syntax). CLI: --cookies-from-browser.
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.
IGSIGHT_TRANSCRIBE_BACKEND auto auto (default), openai_compatible, or faster_whisper. auto uses cloud API when all three IGSIGHT_TRANSCRIBE_* vars are set, otherwise local faster-whisper when igsight-mcp[local] is installed.
IGSIGHT_WHISPER_MODEL small faster-whisper model size/name when using the local backend.
IGSIGHT_WHISPER_DEVICE auto Device for local Whisper: auto, cpu, or cuda (CPU uses int8 compute).

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 for the OpenAI-compatible backend; otherwise video/reel posts still return frames but add a transcription warning (unless local faster-whisper is selected).

Local faster-whisper

"IGSIGHT_TRANSCRIBE_BACKEND": "faster_whisper",
"IGSIGHT_WHISPER_MODEL": "small",
"IGSIGHT_WHISPER_DEVICE": "auto"

Install igsight-mcp[local] in the same environment as the server. With IGSIGHT_TRANSCRIBE_BACKEND=auto, the server uses the API when all three IGSIGHT_TRANSCRIBE_* vars are set, otherwise local Whisper when the extra is installed.

Third-party plugins

Install separate Python packages that declare setuptools entry points in group igsight_mcp.plugins. They can add MCP tools without forking the core server. Control loading with IGSIGHT_DISABLE_PLUGINS and IGSIGHT_PLUGINS. See docs/plugins.md and examples/igsight-plugin-hello/.

HTTP transport

For MCP clients that speak streamable HTTP instead of stdio:

Variable / flag Default Purpose
--transport http or IGSIGHT_TRANSPORT=http stdio Enable HTTP transport
--host / IGSIGHT_HOST 127.0.0.1 Bind address
--port / IGSIGHT_PORT 8000 Listen port
IGSIGHT_HTTP_TOKEN (unset) When set, requires Authorization: Bearer <token> on every HTTP request
export IGSIGHT_HTTP_TOKEN="$(openssl rand -hex 32)"
uvx igsight-mcp --transport http --host 127.0.0.1 --port 8000

HTTP security warning

Streamable HTTP exposes an unauthenticated MCP API on the host and port you bind unless you set IGSIGHT_HTTP_TOKEN. There is no built-in TLS; anyone who can reach the port can call your tools (including Instagram actions using your local cookies).

  • Prefer stdio when the MCP client runs on the same machine (uvx igsight-mcp with no flags).
  • For HTTP, bind to 127.0.0.1 (the CLI default via --host / IGSIGHT_HOST) and connect only from localhost, or place the service behind a firewall or reverse proxy with authentication.
  • Set a long random IGSIGHT_HTTP_TOKEN whenever the listener is not strictly local.
  • The Docker image defaults to --host 0.0.0.0 so port publishing works; treat published ports as public unless you add a token, network policy, or proxy auth (see Docker).

Binding to a non-loopback address prints a stderr warning; always set IGSIGHT_HTTP_TOKEN when the port is reachable from other machines.

Cookies

See docs/cookies.md for IGSIGHT_COOKIES_FROM_BROWSER (local browser auto-load), Netscape IGSIGHT_COOKIES_FILE, Keychain/DPAPI troubleshooting, 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 browser or file 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

Docker

Published images: ghcr.io/vinihuge/igsight-mcp.

Security: the default command binds streamable HTTP MCP to 0.0.0.0:8000, so anyone who can reach the port can use the server unless you protect it. Strongly recommended: set IGSIGHT_HTTP_TOKEN to a long random secret and configure MCP clients to send Authorization: Bearer <token>. Prefer not publishing the port on untrusted networks; use stdio mode (below) when the client runs on the same host.

The image includes ffmpeg and the igsight-mcp wheel installed with uv. It runs as a non-root user. No local Whisper model is baked in; use API transcription env vars (see above) or install [local] only in custom builds.

Mount volumes for cache and cookies so data survives restarts:

Mount / env Purpose
-v igsight-cache:/home/igsight/.cache/igsight-mcp Post and media cache (IGSIGHT_CACHE_DIR)
-v /path/to/cookies.txt:/home/igsight/cookies.txt:ro + -e IGSIGHT_COOKIES_FILE=/home/igsight/cookies.txt Netscape cookies for authenticated requests

HTTP (default transport)

docker run --rm -p 8000:8000 \
  -e IGSIGHT_HTTP_TOKEN="replace-with-a-long-random-secret" \
  -v igsight-cache:/home/igsight/.cache/igsight-mcp \
  -v "$HOME/.config/igsight/cookies.txt:/home/igsight/cookies.txt:ro" \
  -e IGSIGHT_COOKIES_FILE=/home/igsight/cookies.txt \
  ghcr.io/vinihuge/igsight-mcp:latest

Stdio (Claude Desktop, Cursor, Grok Bot, etc.)

Use -i so the MCP client can use stdin/stdout; override the default HTTP command with --transport stdio:

docker run --rm -i \
  -v igsight-cache:/home/igsight/.cache/igsight-mcp \
  -v "$HOME/.config/igsight/cookies.txt:/home/igsight/cookies.txt:ro" \
  -e IGSIGHT_COOKIES_FILE=/home/igsight/cookies.txt \
  ghcr.io/vinihuge/igsight-mcp:latest \
  --transport stdio

Example MCP client config: command = docker, args = ["run", "--rm", "-i", "-v", "igsight-cache:/home/igsight/.cache/igsight-mcp", "ghcr.io/vinihuge/igsight-mcp:latest", "--transport", "stdio"] (add cookie mounts and env as needed).

Documentation

Detailed guides (architecture, tools, transcription, FAQ, comparisons):

Agent onboarding: llms.txt and AGENTS.md.

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

Metadata

Release files for igsight-mcp 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for igsight-mcp 1.1.0
File Size Uploaded Provenance
igsight_mcp-1.1.0.tar.gz 80.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for igsight-mcp 1.1.0
File Interpreter ABI Platform
igsight_mcp-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 173.0 kB

Release files / igsight_mcp-1.1.0.tar.gz

Download URL igsight_mcp-1.1.0.tar.gz
Size 80.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1601e4c98aa7c29dc472311e25a995cf301ee8f16f80fb3d9d4499d0cbc9f43e
BLAKE2b-256 checksum
How to use checksums
176646a7ac91593b19ba8207659cfa00d6842ca54be610c9233e68bbe65d47ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / igsight_mcp-1.1.0-py3-none-any.whl

Download URL igsight_mcp-1.1.0-py3-none-any.whl
Size 92.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87ff306acb3c22a8d2f5c73133f1ea63ff5fcad6976245b954442c28c9bcaec2
BLAKE2b-256 checksum
How to use checksums
dd3faa5493e45542e0a86e3e1fa0351c59166d8b519b1b1cb3a909d8d94de4be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for igsight-mcp 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for igsight_mcp-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page