instagram-mcp
Provides tools for full control of an Instagram account via instagrapi: authentication and 2FA/challenge handling, posting photos/albums/reels/videos/stories, editing captions, liking/commenting/following, sending DMs, searching users/hashtags, and managing profile/highlights.
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.
instagram-mcp
A streamable-HTTP MCP server (endpoint /mcp, port 8000) that gives any
MCP-compatible AI agent full control over an Instagram account — post
photos/albums/reels, stories, DMs, comments, likes, follows, search, highlights,
profile edits, and more (68+ tools).
Built on instagrapi (curl_cffi
anti-detection) and the official
Model Context Protocol Python SDK.
Owner: Aidan Cohen.
What it does
Area | Tools (examples) |
Auth |
|
Posts |
|
Stories / Reels |
|
Engagement |
|
DMs |
|
Discovery |
|
Ask the server for tools/list to see the full surface.
Related MCP server: Instagram Control MCP Server
Architecture
Transport: streamable-HTTP MCP, stateless (
stateless_http=True), served athttp://<host>:8000/mcp. A/healthzGET returns{"ok": true, ...}.Logging: every
exceptin the codebase logs (level + message + traceback) to a log file and stdout — there are no silentexcept: passpaths. Logs are written to/var/log/instagram-mcp/{app,errors,access}.logand a sidecar container tails them, sokubectl logs <pod> -c logsstreams live output.Credentials: read only from the environment
IG_USERNAME/IG_PASSWORD(injected from a Kubernetes Secret). Never hardcoded, never committed.Session persistence: the instagrapi session file lives on a PVC mounted at
/data/instagram_session.json, so a login survives pod restarts.Safe startup: login (from env creds, if present) runs in a background thread. A login failure / 2FA / challenge never stops the MCP endpoint from serving — the failure is logged and the server stays up.
Run it (Docker)
docker build -t instagram-mcp:latest .
docker run --rm -p 8000:8000 \
-e IG_USERNAME=your_handle \
-e IG_PASSWORD=your_password \
instagram-mcp:latestThen hit http://localhost:8000/mcp with an MCP client, or check
http://localhost:8000/healthz.
Deploy on Kubernetes (k3s)
The manifest (deploy.yaml) creates, in the default namespace:
A
Secret(instagram-mcp-secret) — placeholder, empty values; create the real one out-of-band:kubectl create secret generic instagram-mcp-secret \ --from-literal=IG_USERNAME=<handle> --from-literal=IG_PASSWORD=<password>A
PVC(instagram-mcp-session) for session persistence.A
Deployment(instagram-mcp) — main container + logging sidecar, sharing anemptyDirat/var/log/instagram-mcp.A
ClusterIPService(instagram-mcp) mapping8000 -> 8000.
Build + import + apply (the image is local, not pushed to a registry):
docker build -t instagram-mcp:latest .
docker save instagram-mcp:latest | sudo k3s ctr images import -
sudo k3s ctr images label docker.io/library/instagram-mcp:latest io.cri-containerd.pinned=pinned
kubectl create secret generic instagram-mcp-secret \
--from-literal=IG_USERNAME=<handle> --from-literal=IG_PASSWORD=<password>
kubectl apply -f deploy.yaml
kubectl rollout status deploy/instagram-mcp --timeout=120sThe image is arm64. The pod is pinned to
kubernetes.io/arch: arm64; the liqo virtual nodes are amd64, so build on an arm64 node (the lima-ubuntu control-plane in this fleet).
Verify
kubectl get pods,svc
kubectl logs deploy/instagram-mcp -c instagram-mcp # main container stdout
kubectl logs deploy/instagram-mcp -c logs # live tail of app/errors/access logsRun the smoke test (from any host that can reach the cluster, via port-forward):
kubectl port-forward svc/instagram-mcp 8000:8000 &
python3 smoke.py http://127.0.0.1:8000/mcpsmoke.py performs a real MCP initialize → notifications/initialized →
tools/list handshake over streamable HTTP.
Rebuild from scratch (what a cold clone does)
git clone https://github.com/salmonhealer772/instagram-mcp.git
cd instagram-mcp
# (the steps under "Deploy on Kubernetes" above)License
MIT — see LICENSE. Forked from official-Arvind/instagram-mcp.
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 for AI agents: publish, read comments and DMs, insights, and engage from your account.
Hosted Instagram MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps instagrapi to read, engage, and send DMs from a personal Instagram account, supporting 24 tools for auth, profile, engagement, and messages.1MIT
- AlicenseBqualityCmaintenanceA professional, full-fidelity MCP server enabling AI agents to fully control and manage an Instagram account exactly like a human user.685MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to operate an Instagram account through standard MCP tools — searching hashtags, reading posts and comment threads, posting comments and replies, reading and sending direct messages, fetching the timeline feed, and liking media — while managing Python FastMCP subprocess lifecycle, persistent login sessions, and two-factor authentication.106 npm1MIT
- AlicenseNot gradedqualityCmaintenanceWraps the unofficial Instagram private API into 34 ready-to-use tools, enabling AI agents to log in, search users and hashtags, browse, like, comment on, upload and download media, send DMs, and view stories through any MCP client. It provides agent-readable errors, flexible username/URL references, and automatic session relogin.1MIT