ig-studio-mcp
Runs an Instagram professional (Creator or Business) account through Meta's official Graph API: reads profile and recent posts/reels, fetches per-post and account insights (reach, views, saves, shares, watch time, follows/unfollows), manages comments (read, reply, hide/unhide, delete), and publishes images and carousels with a publishing-quota check.
Uses Meta's Instagram API with Unified Login on graph.facebook.com, including Meta app credentials for token exchange, token expiry lookup via debug_token, renewal of expiring Facebook Login user tokens and appsecret_proof signing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ig-studio-mcpHow did my last 5 reels do?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ig-studio-mcp
Let Claude run your Instagram professional account through the official Graph API: analytics, comment management and publishing, all on your machine.
ig-studio-mcp is a local Model Context Protocol server that uses only Meta's official Instagram API with Unified Login (graph.facebook.com, Graph API v26.0). There's no scraping, no password login, and no Facebook Page required.
Contents
Related MCP server: instagram-claude-mcp
Features
Analytics: profile, recent posts and reels, per-post insights (reach, views, saves, shares, watch time) and account insights over 1, 7 or 28 days, including follows and unfollows.
Comment management: read, reply to, hide/unhide and delete comments.
Publishing: single images and carousels, plus a check of your daily publishing quota.
Safe by default: every tool that changes your account previews first and sends nothing until called again with
confirm=true.One setting: only an access token is required. The Instagram account is found from the token, and token expiry is read from Meta.
Private: runs locally over stdio. The token stays in your
.envand is never logged or returned in tool output.
Quick start
You need:
An Instagram Creator or Business account
A Meta app using the Instagram API with Unified Login
uv and Python 3.11+
1. Install
git clone https://github.com/Luffy610/ig-studio-mcp.git
cd ig-studio-mcp
uv sync2. Get a token. Follow the step-by-step guide in docs/TOKEN_SETUP.md. It takes about 15 minutes and needs no App Review.
3. Configure. Copy the example file:
cp .env.example .envThen set the one required value in .env:
IG_ACCESS_TOKEN=EAA...4. Check
uv run ig-studio-mcp checkToken: SYSTEM_USER for app 'my app', never expires
Instagram accounts reachable: @your_handle (1784...)
OK - using @your_handle (id 1784..., 1234 followers)Connect to Claude
Claude Desktop
Add the server to claude_desktop_config.json. On Windows the file is at %APPDATA%\Claude\claude_desktop_config.json; on macOS it's at ~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"ig-studio": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/ig-studio-mcp", "run", "ig-studio-mcp"]
}
}
}On Windows, write the path with escaped backslashes, e.g. "C:\\path\\to\\ig-studio-mcp". Restart Claude Desktop afterwards.
Claude Code
claude mcp add ig-studio --scope user -- uv --directory /absolute/path/to/ig-studio-mcp run ig-studio-mcpMCP Inspector
From the project folder, run:
npx @modelcontextprotocol/inspector uv run ig-studio-mcpOpen the URL it prints, click Connect, then go to Tools → List Tools.
Try asking Claude:
"How did my last 5 reels do?"
"Summarise the comments on my latest post and draft replies."
"Hide the spam comments on my last reel."
Tools
Tool | What it does | Key arguments | Permission |
| Username, name, bio, website, followers, follows, media count | none |
|
| Recent posts and reels (newest first) with caption, type, time, likes, comments, link |
|
|
| Top-level comments: id, username, text, time, likes, reply count |
|
|
| Lifetime metrics for a post, reel or story; metrics chosen by media type |
|
|
| Account totals for the last 1, 7 or 28 days, including follows and unfollows |
|
|
| Post a public reply |
|
|
| Hide, or unhide with |
|
|
| Permanently delete a comment on your media |
|
|
| Publish one JPEG with a caption |
|
|
| Publish 2-10 JPEGs as one post |
|
|
| API posts used and remaining in the rolling 24 hours | none |
|
Notes:
Media insights: feed posts and carousels return reach, views, likes, comments, saves, shares, total_interactions, profile_visits and follows. Reels add
ig_reels_avg_watch_timeandig_reels_video_view_total_time(in ms). Stories return reach, views, shares, replies, navigation, follows, profile_visits and total_interactions.Missing metrics: if Instagram doesn't return a metric for an item, it's listed under
unavailable; the rest of the call still succeeds.Deprecated metrics are never requested:
impressions,plays,video_views,profile_views,website_clicks,engagement.
Write tools need confirmation
Every write tool takes confirm, which defaults to false. With confirm=false the tool sends nothing to Instagram. Instead it returns a preview: the action, the exact text, and the API call it would make. Claude is told to show you the preview and call again with confirm=true only after you approve. In every result, executed tells you whether anything was actually sent.
Publishing
A publish takes three steps:
Create a media container.
Check the container's
status_codeuntil it'sFINISHED. Images are usually ready right away; the server gives up after about 4 minutes, within Meta's 5-minute guidance.Publish the container.
If any step fails, nothing is posted. Images must be public JPEG URLs, at most 8 MB, with an aspect ratio between 4:5 and 1.91:1. Captions can have up to 2,200 characters, 30 hashtags and 20 @mentions, and are checked before anything is sent.
Configuration
Settings are read from .env, which is git-ignored. See .env.example for the full list.
Variable | Required | Purpose |
| yes | Token from API setup with Unified login → Generate access tokens (starts with |
| no | Which Instagram account to use, if the token can reach several. |
| no | Meta app credentials (App settings → Basic). Needed only for expiring Facebook Login user tokens. If the secret is set, every call also sends |
| no | Path to a different |
How settings are found:
Where
.envcomes from:$IG_STUDIO_ENV_FILE, then./.env, then the project root's.env.Precedence: values in
.envoverride process environment variables.No restart needed: the file is re-read on every call, so a new token takes effect immediately.
Account discovery. Unified Login system-user tokens find the account through /me/assigned_instagram_accounts. Facebook Login user tokens fall back to the Page-linked account in /me/accounts.
Token expiry. System-user tokens usually never expire. For tokens that do expire, the server reads the expiry from debug_token. If META_APP_ID and META_APP_SECRET are set, it renews a Facebook Login user token when it's within 10 days of expiry. Unified Login tokens with an expiry date have to be regenerated (see docs/TOKEN_SETUP.md).
CLI
Command | Purpose |
| Run the MCP server over stdio (what Claude launches) |
| Show the token type, expiry and missing permissions, list reachable accounts, and fetch the profile |
| Renew an expiring Facebook Login user token (does nothing for tokens that never expire) |
| Swap a short-lived Facebook Login user token for a long-lived one (needs |
Limits worth knowing
Insights lag: data can be up to 48 hours behind.
Story insights exist for only 24 hours and need at least 5 viewers.
Items inside a carousel have no insights of their own.
Follower metrics may be unavailable for accounts with fewer than 100 followers.
Comments:
get_media_commentsreturns top-level comments only. Replies are counted, not listed.Hidden comments disappear from the list, so keep the ID if you may want to unhide one.
Rate limits: Instagram rate-limits calls per account over a rolling 24 hours. When Meta says how long to wait, rate-limit errors include it.
Publishing quota: 100 API posts per rolling 24 hours, with a carousel counting as one. Some of Meta's docs still say 50, so check yours with
get_publishing_limit.API version: pinned in one place,
GRAPH_API_VERSIONinclient.py.
Development
uv sync # install, including dev tools
uv run pytest # 120+ tests, all HTTP mocked; no Instagram account needed
uv run ruff check . # lint
uv run ruff format . # formatCode layout:
File | Responsibility |
MCP tool definitions only | |
Every HTTP call | |
Credentials and the | |
Trimmed response models | |
Meta error codes → actionable messages | |
Command-line entry point |
CI runs lint, tests on Python 3.11 to 3.14 (plus Windows and macOS) and a package build on every push and pull request.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md and the Code of Conduct, and check the changelog for what changed recently.
Security
Please report vulnerabilities privately; see SECURITY.md. Never paste access tokens or .env contents into issues.
License
MIT © 2026 Dhruv Kotwani
Disclaimer
This project is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. or Instagram. "Instagram", "Facebook" and "Meta" are trademarks of Meta Platforms, Inc. Use it only with accounts you own or manage, and follow Meta's Platform Terms.
This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Create, schedule and publish Instagram and Facebook posts from Claude or ChatGPT.
Run Instagram automation on your own real phones from Claude, Cursor or any AI agent.
Run social media from Claude: draft, schedule and approve posts, answer comments, read results.
Related MCP Servers
- AlicenseAqualityCmaintenanceConnects Claude Desktop and other MCP clients to the Instagram Graph API for reading analytics, managing comments, and publishing photos, carousels, and reels.1172 npm1MIT
- AlicenseNot gradedqualityDmaintenanceConnects 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
- AlicenseNot gradedqualityCmaintenanceConnects Claude to Instagram through Meta's official API, enabling users to retrieve account insights, analyze professional profiles, publish photos/carousels/reels/stories, manage comments, read and respond to Direct messages, and call any Graph API endpoint.13 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables a single professional Instagram account to be managed through Claude, including reading and replying to comments and direct messages, and viewing account and media statistics. It runs as a remote streamable HTTP server with OAuth-protected access and automatic renewal of the Instagram token.MIT