GLIM MCP//IG

Open-source MCP server · v0.1 · status: online

Run your Instagram from any AI chat

Glim gives Claude, Cursor and other AI agents 17 tools for your Instagram Business or Creator account. Check last week's reach, draft a reel, clear spam comments and answer DMs, all through Meta's official API.

npx -y glim-mcp

Demo mode runs a fictional bakery account until you add a token, so every tool can be tried first.

CH-01 // Claude ⟷ glim Link stable
  1. How did my reels do this week? Hide any spam comments.
  2. ig_list_mediaig_get_media_insightsig_list_commentsig_hide_comment
  3. Your monsoon bun reel was the winner: 22.4k views, 13.9k reached, 9.4 s average watch. I hid 1 spam comment from @crypto.gains.4u.
  4. Post sourdough.jpg with “Sourdough Sunday 🥖 #pune”.
  5. ig_prepare_post
  6. Draft ready, not public yet: 1 photo, caption “Sourdough Sunday 🥖 #pune”. Publish it?
  7. Yes, go.
  8. ig_publish_post
  9. Published ✓ instagram.com/p/DEMO…
17 toolsOfficial Graph API v26Two-step publishingDemo modeToken never leaves your machineMIT licensed

// 01

Modules

Seventeen tools in six modules. Every tool tells your AI client what it does, so reads can run freely and the risky ones ask first.

MOD.01

Profile & posts

  • readig_get_profileAccount, followers, demo or live
  • readig_list_mediaPosts and reels, paged
  • readig_get_mediaOne post, full caption and slides
MOD.02

Insights

  • readig_get_account_insightsViews, reach, engagement
  • readig_get_audienceFollowers by city, age, gender
  • readig_get_media_insightsPer post, incl. watch time
MOD.03

Publishing

  • writeig_prepare_postPhoto, carousel, reel or story draft
  • writeig_publish_postGoes live only after you confirm
  • readig_get_publishing_limit24-hour quota
MOD.04

Comments

  • readig_list_commentsWith replies and hidden state
  • writeig_reply_to_commentReply or comment as you
  • writeig_hide_commentHide spam, reversible
  • destroyig_delete_commentPermanent; prefer hide
MOD.05

Direct messages

  • readig_list_conversationsInbox, newest first
  • readig_get_messagesLast 20 messages
  • writeig_send_messageReply within 24 hours
MOD.06

Hashtags

  • readig_search_hashtagTop or recent public posts

Needs a Facebook-login token. Meta's rule, not ours.

// 02

Nothing goes public by accident

  1. 01

    Draft

    ig_prepare_post checks the caption (2,200 characters, 30 hashtags), uploads the media privately and returns a preview.

  2. 02

    You confirm

    Your AI shows you the draft and waits. Drafts expire after 24 hours if you never say yes.

  3. 03

    Live

    ig_publish_post publishes that exact draft and returns the link. The same draft can't be published twice.

// 03

Set it up

Start without a token to try the demo account. Add your token later; nothing else changes.

Settings → Developer → Edit Config, then add Glim to claude_desktop_config.json and restart Claude.

{
  "mcpServers": {
    "glim": {
      "command": "npx",
      "args": ["-y", "glim-mcp"],
      "env": { "INSTAGRAM_ACCESS_TOKEN": "IGAA…your token…" }
    }
  }
}

Needs Node.js 20 or newer. Then ask: Show my Instagram profile.

// 04

Get your access token

  1. Switch your Instagram account to Professional (Business or Creator) in the Instagram app.
  2. Create an app at developers.facebook.com and add the Instagram product with Instagram API with Instagram Login.
  3. Under Generate access tokens, add your account and grant the permissions below.
  4. Copy the long-lived token (starts with IG, lasts 60 days) into INSTAGRAM_ACCESS_TOKEN.
instagram_business_basic profile & posts …_content_publish publishing …_manage_comments comments …_manage_messages DMs …_manage_insights insights

Using Facebook Login instead (token starts with EAA)? That works too, and it's the only way Meta allows hashtag search. Set INSTAGRAM_USER_ID if your Facebook account has several pages.

// 05

Questions

Is this safe for my account?

Yes. Glim only uses Meta's official Instagram Graph API with a token you create yourself. It never asks for your password or scrapes the app, which is what gets accounts flagged.

Where does my token go?

Nowhere but Meta. Glim runs on your computer, reads the token from an environment variable and sends it only to graph.instagram.com (or graph.facebook.com) in a request header. No tool ever returns it to the AI, and it's removed from any error text.

Why can't my AI reply to an old DM?

Instagram only lets businesses reply within 24 hours of the person's last message. Glim tells you when a conversation is outside that window instead of failing silently.

Does it work with personal Instagram accounts?

No. Meta's API only supports professional accounts, but switching is free and takes a minute in the Instagram app.

Can it post photos from my computer?

Not directly: Instagram's servers download the media themselves, so it needs a public https:// link (for example from your website, a CDN or cloud storage). Photos must be JPEG.