mcp-instagram
Provides tools for downloading Instagram videos, reels, audio, and carousels, as well as fetching post metadata.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-instagram
Overview
MCP server for downloading Instagram content (videos, reels, audio, single images, carousels) using yt-dlp, with an instaloader + httpx fallback for image-only posts that yt-dlp refuses. Supports both stdio and HTTP streamable transports, selectable via a CLI argument.
Tech Stack: Python 3.13, FastMCP 2.x, yt-dlp, Typer, Pydantic, OpenTelemetry, Ruff, mypy
Related MCP server: MCP YouTube Downloader
Installation
uv tool install .After installation, the mcp-instagram binary is available system-wide.
Usage
stdio mode (for Claude Desktop, pi)
mcp-instagram stdio
mcp-instagram stdio --verbose
mcp-instagram stdio --quietCLI download
mcp-instagram dl 'https://www.instagram.com/reel/<code>/' # video (transcoded to H.264 if VP9)
mcp-instagram dl 'https://www.instagram.com/p/<code>/' # single image or carousel
mcp-instagram dl --audio 'https://www.instagram.com/reel/<code>/'
mcp-instagram dl -o /tmp/out --force 'https://...' 'https://...'
mcp-instagram dl --json 'https://www.instagram.com/reel/<code>/' # machine-readable, full captionRouting is automatic: get_metadata decides video vs image, image posts go through
instaloader + httpx. Image extensions come from the HTTP Content-Type, since Instagram CDN
URLs often keep a .heic path while serving JPEG bytes. Existing files are skipped unless
--force.
Captions
Every result carries a description field holding the full post caption, hashtags included.
This is usually the richest source of information about a post (titles, names, lists), so read it
before analysing the media itself: yt-dlp only sets title to "Video by <user>", never the
caption. The human-readable output prints the caption truncated at 500 characters; --json
prints the untruncated value. Logs go to stderr, so dl --json ... > result.json yields clean JSON.
HTTP streamable mode
mcp-instagram http
mcp-instagram http --verboseDefault: http://127.0.0.1:8000
Usage instructions for LLMs / agents
mcp-instagram skillPrints the CLI usage guide (command, options, examples) to stdout. Point an agent at this command instead of embedding the docs in a prompt: on demand, near-zero tokens.
Configuration
All settings are loaded from environment variables (prefix MCP_INSTAGRAM_) or a .env file.
Variable | Default | Description |
|
| Directory where downloads are saved |
| (empty) | Path to a Netscape-format cookies.txt file |
|
| Host for HTTP mode |
|
| Port for HTTP mode |
|
| Enable debug mode |
Copy .env.example to .env and edit as needed. Unrelated keys in .env (for example
INSTAGRAM_USERNAME used by scripts/list-saved.py) are ignored, not rejected.
Claude Desktop / pi MCP config (stdio)
Add to your claude_desktop_config.json or pi MCP config:
{
"mcpServers": {
"mcp-instagram": {
"command": "mcp-instagram",
"args": ["stdio"]
}
}
}Cookies setup
Instagram limits access to public content and blocks most authenticated content without cookies.
To provide cookies, log into Instagram in your browser, export your cookies as a Netscape-format
cookies.txt file (e.g., using the "Get cookies.txt LOCALLY" Chrome extension), save it anywhere
on disk, then set MCP_INSTAGRAM_COOKIES_FILE=/path/to/cookies.txt in your .env or environment.
The file is passed directly to yt-dlp's cookiefile option.
Tools
Tool | Description |
| Download a video, reel, or IGTV. Returns local path and metadata. |
| Download audio only as MP3. Returns local path and metadata. |
| Download all items in a carousel/sidecar post, or a single image post. Returns list of paths. |
| Fetch post metadata without downloading (title, duration, counts, full caption in |
Development
make sync # Install dependencies
make check # Full quality gate (lint, format, typecheck, security, tests)
make test # Run tests only
make run ARGS='stdio --help'Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram data over MCP: profiles, posts, reels, stories, highlights and search as JSON
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
Hosted MCP server for DataLikers — Instagram & TikTok data API. 51 tools: Instagram user search by demographics (gender/age/race/country/city), profiles, bulk lookup, engagement, posts & reels, comments, hashtags, locations, stories, highlights, music, business accounts, top users; TikTok users, videos, comments, hashtags, playlists and top charts. Streamable HTTP, Bearer API key. Free tier: 100 requests on signup at https://datalikers.com/p/1by27bwg
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server (stdio + HTTP/SSE) that fetches video transcripts/subtitles via yt-dlp, with pagination for large responses. Supports YouTube, Twitter/X, Instagram, TikTok, Twitch, Vimeo, Facebook, Bilibili, VK, Dailymotion. Whisper fallback — transcribes audio when subtitles are unavailable (local or OpenAI API). Works with Cursor and other MCP host824MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for downloading videos and audio from YouTube and hundreds of other sites using yt-dlp.MIT
- AlicenseAqualityDmaintenanceMCP server wrapping yt-dlp for downloading videos and audio from URLs, providing tools to check dependencies, retrieve video metadata, and perform downloads.4MIT
- AlicenseAqualityCmaintenance16 Instagram creator tools as an MCP server — Reels/Story/carousel downloaders, engagement audit, hashtag search, Reels hook generator, best-time-to-post and content calendar. Wraps instapdown.com public API — no auth required.1656 npm2MIT