instagram-claude-mcp
Provides read-only access to Instagram professional account data through the official Instagram Graph API, including profile information, media listings, media details, insights, and comments.
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., "@instagram-claude-mcpshow me insights for my latest Instagram post"
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.
instagram-claude-mcp
Remote MCP server that connects Claude to the official Meta Instagram Graph API (read-only).
Exposes Instagram profile, media, insights, and comments as MCP tools over Streamable HTTP, so Claude can call them via an HTTPS MCP URL.
Features
Tool | Description |
| Connected Instagram professional account profile |
| Recent posts / reels / carousels |
| Details for a specific media item |
| Account-level or media-level insights |
| Comments (and replies when available) on a media item |
Not implemented (by design): publishing, deleting, messaging, comment replies, or any write operations.
Related MCP server: instagram-mcp
Requirements
Node.js 20+
An Instagram professional account (Business or Creator)
A Meta app with Instagram Graph API access
A long-lived access token with read permissions for the account
The Instagram account ID (
IG User ID)
Environment variables
Copy .env.example to .env and fill in values locally. Never commit .env.
Variable | Required | Description |
| Yes | Instagram User access token (prefer long-lived) |
| Conditional | Optional for Instagram Login ( |
| No* | Default |
| No | Default |
| No | App secret — only for short→long-lived token exchange |
| No | HTTP port (default |
| No | If set, |
Local development
npm install
cp .env.example .env
# Edit .env with INSTAGRAM_ACCESS_TOKEN and INSTAGRAM_ACCOUNT_ID
npm run dev
# or
npm run build && npm startEndpoints:
Health:
GET http://localhost:3000/healthAuth debug (safe):
GET http://localhost:3000/debug-instagram-authProfile tool debug:
GET http://localhost:3000/debug-instagram-profileMedia list debug:
GET http://localhost:3000/debug-instagram-mediaMCP (Streamable HTTP):
http://localhost:3000/mcp
Instagram Login id vs user_id
On graph.instagram.com, GET /me returns:
id— app-scoped ID (not used for/media)user_id— Instagram professional account ID (<IG_ID>) used for/{user_id}/media, insights, etc.
This server resolves user_id from /me for Instagram Login and does not blindly trust INSTAGRAM_ACCOUNT_ID (which is often mistakenly set to id).
Instagram Login tokens (short vs long-lived)
App Dashboard → Generate token: already long-lived (~60 days). Put it in
INSTAGRAM_ACCESS_TOKEN.OAuth / Business Login (authorization code → token): returns a short-lived token (~1 hour). Exchange it before production use:
Set
INSTAGRAM_ACCESS_TOKENto the short-lived token (temporarily).Set
INSTAGRAM_APP_SECRETto your Instagram app secret.POST /exchange-instagram-token(sendAuthorization: Bearer <MCP_AUTH_TOKEN>if configured).Copy
long_lived_access_tokenfrom the JSON intoINSTAGRAM_ACCESS_TOKENon Vercel.Redeploy / restart. Remove the short-lived value.
Auth is sent as Meta’s documented access_token query parameter. Tokens are trimmed (whitespace, quotes, accidental Bearer / access_token= prefixes) before use. The full token is never logged or returned by /debug-instagram-auth.
Type-check without running:
npm run typecheckTest with MCP Inspector
npx @modelcontextprotocol/inspectorConnect with transport Streamable HTTP and URL http://localhost:3000/mcp.
Deploy as a remote MCP server
Vercel (serverless Express)
This project is set up for Vercel’s Express runtime: the app is exported as a default Express handler and only calls app.listen() when not running on Vercel (VERCEL=1). That matches serverless invocation — there is no permanently running Node process in production.
Import the GitHub repo in Vercel (or run
vercel).Set Project Environment Variables (Production/Preview):
INSTAGRAM_ACCESS_TOKENINSTAGRAM_ACCOUNT_IDOptional:
MCP_AUTH_TOKEN,INSTAGRAM_GRAPH_API_BASE,INSTAGRAM_API_VERSION
Deploy. Endpoints stay the same:
https://your-app.vercel.app/healthhttps://your-app.vercel.app/mcp(Streamable HTTP)
vercel.json pins the Express framework, runs npm run build, and sets function maxDuration to 60s for Graph API calls. MCP handling is stateless (fresh transport per request), which is compatible with Vercel Functions / Fluid compute.
Claude connector URL example:
https://your-app.vercel.app/mcpOther Node hosts (Railway, Render, Fly.io, Cloud Run, etc.)
Push this repo and deploy as a normal Node service.
Set the same secret environment variables in the host dashboard.
The process runs
npm start→node dist/index.js, which listens onPORT.
npm install
npm run build
npm startConnect from Claude
Claude (web / desktop connectors)
Add a custom connector with your HTTPS MCP URL, for example:
https://your-service.example.com/mcpIf you set MCP_AUTH_TOKEN, configure the matching bearer token in the connector settings when supported.
Claude Code
claude mcp add --transport http instagram-claude-mcp https://your-service.example.com/mcpCursor
Add to .cursor/mcp.json (or your MCP config):
{
"mcpServers": {
"instagram-claude-mcp": {
"url": "https://your-service.example.com/mcp"
}
}
}Instagram API notes
Uses only the official Meta Graph API (
graph.facebook.comorgraph.instagram.com).Credentials are read from environment variables only — never hardcoded.
Insights metrics and periods depend on Meta’s current Insights API rules (metric availability differs for account vs media, and by media product type). Pass the metrics Meta documents for your use case via the
metricstool argument.Tokens expire; rotate long-lived tokens as needed in your host’s secret store.
Project layout
src/
app.ts # Express app factory (/health, /mcp) — default-exported for Vercel
index.ts # Entry: export app; listen only when not on Vercel
config.ts # Environment configuration
mcp-server.ts # MCP tool registration
instagram/client.ts # Official Graph API client (read-only)
vercel.json # Vercel Express + function limitsLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Schedule and publish social posts across 9 platforms (Instagram, LinkedIn, X, TikTok, Facebook, Threads, Pinterest, Bluesky, Mastodon) straight from Claude, ChatGPT, Cursor, or any MCP client. Create, edit, and reschedule posts, upload media, and pull account and post analytics, follower demographics, and best-time windows. 20 tools, free on every plan.
Your agent needs public Instagram data — a creator's posts and reels, what a hashtag is producing, what a video actually says. The official Graph API only sees accounts you already own, and needs app review to see those. **What you can ask for** • "Pull this creator's last 50 posts and reels with engagement counts." • "What is trending under #skincare this week, and which profiles keep appearing?" • "Transcribe this reel and tell me what the hook in the first three seconds is." • "Read the comments on this post and group the objections." • "Which reels use this song right now?" **How to use it** Point any MCP client at https://mcp.aisa.one/instagram/mcp and sign in with OAuth — there is no key to create or paste. 17 read tools: profiles (basic and full), a user's posts, reels and highlights, post and profile digests, post comments, reels search, trending reels, reels by song, hashtag and profile search, and media transcripts. **Why this rather than the source** Public profiles without owning the account, and no app review to sit through. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Size a creator's audience here, then ask the same agent what their brand's site traffic looks like or who to contact there — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/social/mcp for X plus Instagram, Reddit, Pinterest and YouTube; https://mcp.aisa.one/gtm/mcp for those plus Similarweb and Apollo.
Instagram data for AI agents: profiles, posts, reels, followers. Influencer + brand research.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables sending and receiving Instagram Direct Messages, managing conversations, downloading media, viewing user profiles and stories, and interacting with posts through natural language in Claude.MIT
- FlicenseBqualityCmaintenanceProvides Instagram analytics, media downloads, and search capabilities through an MCP interface for use with Claude and other MCP clients.4341-
- AlicenseAqualityBmaintenanceConnects Claude Desktop and other MCP clients to the Instagram Graph API for reading analytics, managing comments, and publishing photos, carousels, and reels.1146 npm1MIT
- AlicenseNot gradedqualityCmaintenanceExposes Instagram actions (posts, media, comments, DMs, insights, Messenger profile) to Claude and ChatGPT via MCP.MIT