Glim
Provides tools for managing an Instagram Business or Creator account via Meta's official Graph API, including profile and media listing, insights, publishing posts/reels/stories, comments moderation, direct messages, and hashtag search.
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., "@Glim how much reach did my last reel get in the past 7 days?"
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.
Glim is an open-source MCP server that lets Claude, Cursor and other AI agents run an Instagram Business or Creator account. Ask for last week's reach, draft and publish a reel, clear spam comments or answer DMs in plain language. It only uses Meta's official Graph API, so there's no password sharing and no scraping.
Why Glim
🧾 Nothing goes public by accident | Publishing takes two steps. |
🔐 Your token stays yours | Glim runs on your machine, reads the token from an env variable and sends it only to Meta in a request header. No tool returns it, and it's removed from error text. |
🧪 Try it with no account | Without a token, Glim answers from a built-in fictional bakery account (demo mode), so every tool works out of the box. |
🧭 Errors that say what to do | Expired token, missing permission, the 24-hour DM window, publishing quota: each error explains the fix instead of dumping a code. |
📏 Checks before it calls | Caption length, 30-hashtag and 20-mention limits, public |
Related MCP server: Instagram MCP Server
How it works
Quick start
Needs Node.js 20+. Leave out the token to start in demo mode.
Settings → Developer → Edit Config, add this to claude_desktop_config.json, then restart Claude:
{
"mcpServers": {
"glim": {
"command": "npx",
"args": ["-y", "glim-mcp"],
"env": { "INSTAGRAM_ACCESS_TOKEN": "IGAA...your token..." }
}
}
}claude mcp add glim -e INSTAGRAM_ACCESS_TOKEN=IGAA... -- npx -y glim-mcpAdd the same JSON as Claude Desktop to ~/.cursor/mcp.json (or .cursor/mcp.json in a project).
Then ask: "Show my Instagram profile." The first line of the answer says whether you're in demo or live mode.
Tools
Group | Tool | What it does |
Profile & posts |
| Account, followers, bio, demo or live mode |
| Posts, reels and carousels, newest first, cursor paging | |
| One post: full caption, media URL, carousel slides | |
Insights |
| Views, reach, accounts engaged, interactions, follows over 1–30 days |
| Followers or engaged audience by country, city, age or gender | |
| Per post; picks the right metrics per type, reels get average watch time | |
Publishing |
| Step 1: photo, carousel (2–10), reel or story as a private draft plus preview |
| Step 2: publish the confirmed draft, returns the link | |
| Posts used out of the 24-hour API quota | |
Comments |
| Comments with replies, likes and hidden state |
| Reply under a comment, or comment on a post | |
| Hide or unhide (reversible) | |
| Delete; marked destructive so clients ask first | |
Direct messages |
| Inbox, most recent first |
| Latest 20 messages, and whether you can still reply | |
| Text reply inside Instagram's 24-hour window | |
Hashtags |
| Top or recent public posts for a hashtag |
Read tools support response_format: "json" for structured output. Every tool has MCP annotations (read-only, destructive, idempotent) so clients can auto-approve reads and confirm writes.
Get an access token
Switch your Instagram account to Professional (Business or Creator) in the Instagram app.
Create an app at developers.facebook.com/apps and add Instagram → API setup with Instagram Login.
Under Generate access tokens, add your account and grant:
instagram_business_basic,instagram_business_content_publish,instagram_business_manage_comments,instagram_business_manage_messages,instagram_business_manage_insights.Put the long-lived token (starts with
IG, valid 60 days) inINSTAGRAM_ACCESS_TOKEN.
Variable | Needed | Meaning |
| for live mode |
|
| sometimes | Your professional account ID; set it with Facebook Login if you have several Pages |
| no | Defaults to |
Hashtag search exists only on the Facebook Login API, with the Instagram Public Content Access feature, for 30 unique hashtags per 7 days. With an
IG…token the tool says so.DMs can be sent only within 24 hours of the person's last message. Managing accounts you don't own needs Advanced Access through App Review.
Publishing: media must be at a public
https://URL (Instagram downloads it); photos must be JPEG; about 100 API posts per 24 hours.Insights can lag up to 48 hours; demographics need 100+ followers.
impressionswas retired in 2025, so Glim usesviews.Personal (non-professional) accounts aren't supported by Meta's API.
Screenshots
Develop
npm install
npm run build # compile to dist/
npm test # 43 unit and tool-flow tests (vitest)
npm run smoke # starts the built server over stdio and calls real tools
npm run inspect # opens the MCP Inspector against the built serversrc/graph.ts: Graph API client with token-type host detection and recovery-focused error messagessrc/demo.ts: in-process fake Graph API used by demo mode and the tests (same paths, same error codes)src/tools/: one file per tool group ·site/: the landing page (static, deployed on Vercel)README media:
node docs/readme/make-svgs.mjsand, with the site served on port 5190,node docs/readme/capture.mjs
Disclaimer
Glim is an independent open-source project. It isn't affiliated with, endorsed by or sponsored by Meta Platforms or Instagram. Instagram is a trademark of Meta Platforms, Inc. Follow Meta's Platform Terms and Instagram's community guidelines when using it.
MIT © Jagdish Patil
Available Tools
17 toolsig_delete_commentDelete a commentADestructiveIdempotent
Permanently delete a comment on the account's own post. Can't be undone; confirm with the user first, and consider ig_hide_comment instead.
Inputs: comment_id (required).
ig_get_account_insightsAccount insightsARead-onlyIdempotent
Account-level totals over the last N days (1-30): views, reach, accounts engaged, interactions, likes, comments, shares, saves, follows and link taps. 'views' replaced the retired 'impressions' metric. Data can lag up to 48 hours. For audience age/gender/location use ig_get_audience.
Inputs: days, metrics, response_format.
ig_get_audienceAudience demographicsARead-onlyIdempotent
Who follows or engages with the account, broken down by country, city, age or gender. Needs at least 100 followers on a live account. 'followers' = follower demographics; 'engaged' = people who interacted with content in the timeframe.
Inputs: audience, breakdown, timeframe, response_format.
ig_get_mediaGet one postARead-onlyIdempotent
Get one post, reel or carousel by ID: full caption, type, media URL, permalink, likes, comment count and carousel slides. IDs come from ig_list_media.
Inputs: media_id (required), response_format.
ig_get_media_insightsPost insightsARead-onlyIdempotent
Views, reach, likes, comments, shares, saves and interactions for one post, reel or story. Reels also get average watch time. Picks the right metrics for the post type automatically; pass 'metrics' to choose your own. IDs come from ig_list_media.
Inputs: media_id (required), metrics, response_format.
ig_get_messagesRead DM messagesARead-onlyIdempotent
Read the latest messages (up to 20, Instagram's limit) in one DM conversation, newest first. Get conversation IDs from ig_list_conversations.
Inputs: conversation_id (required), limit, response_format.
ig_get_profileGet Instagram profileARead-onlyIdempotent
Get the connected Instagram professional account: username, name, bio, website, followers, following and post count. Also says whether Glim is in demo mode (fictional sample account) or live. Call this first to check the connection.
Inputs: response_format.
ig_get_publishing_limitPublishing quotaARead-onlyIdempotent
How many posts the account has published through the API in the last 24 hours, and the limit (usually 100; carousels count as one).
Inputs: no named parameters.
ig_hide_commentHide or unhide a commentAIdempotent
Hide a comment (e.g. spam or abuse) so only its author still sees it, or unhide it. Reversible; prefer this over deleting.
Inputs: comment_id (required), hide.
ig_list_commentsList commentsARead-onlyIdempotent
List comments on one of the account's posts, newest first, with replies, likes and hidden state. Use comment IDs with ig_reply_to_comment, ig_hide_comment or ig_delete_comment. Get media IDs from ig_list_media.
Inputs: media_id (required), after, limit, response_format.
ig_list_conversationsList DM conversationsARead-onlyIdempotent
List the account's Instagram DM conversations, most recent first, with who they're with. Returns conversation IDs for ig_get_messages and the other person's ID (IGSID) for ig_send_message. Needs instagram_business_manage_messages.
Inputs: after, limit, response_format.
ig_list_mediaList postsARead-onlyIdempotent
List the account's posts, reels and carousels, newest first, with likes and comment counts. Returns a page; when more exist the result gives an 'after' cursor to pass back for the next page. Use ig_get_media for one post's full details, ig_get_media_insights for its views and reach.
Inputs: after, limit, response_format.
ig_prepare_postPrepare a post (step 1 of 2)A
Step 1 of publishing: upload media to Instagram as an unpublished draft and return a preview with a container_id. Nothing is public yet. Show the preview to the user and get a clear yes, then call ig_publish_post with the container_id. Drafts expire after 24 hours. Media must be at a public https:// URL (Instagram downloads it). Photos must be JPEG. Reels: MP4/MOV, 3 s to 15 min. Types: 'image' (one photo), 'carousel' (2-10 photos/videos), 'reel' (one video), 'story' (one photo or video, no caption). Example: "Post this photo with caption X" -> type='image', media_url='https://.../photo.jpg', caption='X'.
Inputs: type (required), items, caption, alt_text, +4 more.
ig_publish_postPublish a prepared post (step 2 of 2)A
Step 2 of publishing: make a draft from ig_prepare_post public on the account. This can't be undone through the API. Only call after the user has seen the ig_prepare_post preview and confirmed. Returns the new post's ID and link.
Inputs: container_id (required).
ig_reply_to_commentReply to a commentA
Post a public reply. Give comment_id to reply under a comment, or media_id to add a new top-level comment on a post. Replies are public and appear as the account. Instagram only allows replies to top-level comments.
Inputs: message (required), media_id, comment_id.
ig_search_hashtagSearch a hashtagARead-onlyIdempotent
Find public posts for a hashtag: 'top' (most popular) or 'recent' (last 24 hours only). Meta limits this to 30 unique hashtags per 7 days per account, and it needs a Facebook Login token with Instagram Public Content Access. Example: "What's trending under #punefood?" -> hashtag='punefood', kind='top'.
Inputs: hashtag (required), kind, limit, response_format.
ig_send_messageSend a DMA
Send a text DM as the account. Instagram allows this only within 24 hours of the person's last message to you. recipient_id is the person's Instagram-scoped ID from ig_list_conversations or ig_get_messages. Max 1000 bytes. Confirm the text with the user first.
Inputs: text (required), recipient_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool targets a clearly distinct resource and action: comments, DMs, media, publishing, hashtag search, and insights are well separated. The closest overlaps, such as ig_get_media versus ig_get_media_insights, are clarified by descriptions and do not create real selection ambiguity.
All tools use a consistent ig_ prefix followed by snake_case verb_noun phrasing, such as ig_list_media, ig_get_profile, and ig_send_message. The publishing pair ig_prepare_post / ig_publish_post is especially coherent.
At 17 tools, the surface is slightly above the typical 3-15 range but remains reasonable given the breadth of Instagram account management. Each tool appears to earn its place, though the set could potentially consolidate a few read/insight operations.
The set covers the core lifecycle well: profile and media reads, comment moderation, DMs, publishing, and account/media insights. Minor gaps remain, such as no explicit story listing/discovery and no published-post deletion or caption editing, but agents can work around most of these.
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Instagram and Facebook Pages for AI agents: publish, comments, DM by keyword, inbox, insights.
Instagram MCP for DM and comment automation, AI Agent and content publishing via Meta's official API
Publish and schedule Instagram posts, Reels and carousels from your AI assistant.
Related MCP Servers
- 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.40 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to programmatically interact with Instagram Business accounts through the Graph API, covering profile and media retrieval, engagement insights, publishing images and videos, and reading or replying to direct messages. It exposes these capabilities as tools, resources, and prompts so clients can manage content and analyze performance through natural language.-
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to interact with Instagram Business accounts through Meta's Graph API, including profile retrieval, media publishing, insights, comments, conversations, and direct messaging.-
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to interact with Instagram Business accounts through Instagram's Graph API, supporting profile and media retrieval, insights, publishing, and direct message operations.-