instagram-mcp
Instagram MCP server for publishing and managing Instagram Business/Creator content via the Graph API.
Get Instagram account info: username, followers, and post count.
Publish photos and Reels (9:16, 3–90s) from public URLs, waiting for video processing before publishing.
Publish photo/video Stories and carousels with up to 10 image/video items.
List recent media and retrieve details for a specific media item by ID.
Read comments on a post and reply to a specific comment.
Use default environment credentials or pass
ig_user_idandaccess_tokenper tool call for multi-account use.Run locally via STDIO/npx or remotely via authenticated HTTP transport.
Allows posting and managing Instagram content via Instagram Graph API, including photos, reels, stories, carousels, 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-mcp Post a photo with caption 'Hello world' from https://example.com/img.jpg"
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 MCP Server
MCP đăng & quản lý nội dung Instagram (tài khoản Business/Creator) qua Instagram Graph API v21.0. Chạy được STDIO (npx từ GitHub, dùng local) hoặc HTTP (deploy remote cho Evose). Ai cũng dùng được — chỉ điền biến môi trường, không sửa code.
10 tools: get_account_info, post_photo, post_reel, post_story_photo, post_story_video, post_carousel, list_media, get_media, get_comments, reply_comment.
Đăng bài Instagram theo quy trình container (tạo → chờ xử lý → publish). Với video/reels, server tự chờ xử lý xong mới publish.
Mọi tool nhận thêm hai tham số tuỳ chọn ig_user_id và access_token, nên một bản chạy phục vụ được nhiều tài khoản. Không truyền thì server dùng biến môi trường làm giá trị mặc định.
Truyền ig_user_id thì phải truyền cả access_token, và ngược lại. Truyền nửa cặp thì server báo thiếu cấu hình chứ không lặng lẽ dùng credential mặc định. Một ô để trống từng làm bài của tài khoản này đăng lên tài khoản khác mà vẫn báo thành công.
Mọi tham số id chỉ nhận chữ số, chữ cái và dấu gạch dưới, tối đa 64 ký tự. Id chứa /, ? hay & bị từ chối, vì nó đổi được endpoint Graph API.
Biến môi trường
Biến | Bắt buộc | Mô tả |
IG_USER_ID | ✅ | ID tài khoản Instagram Business/Creator |
IG_ACCESS_TOKEN | ✅ | Access Token (long-lived, quyền instagram_content_publish) |
FB_GRAPH_VERSION | ❌ | Mặc định v21.0 |
MCP_TRANSPORT | ❌ |
|
MCP_AUTH_TOKEN | Bắt buộc khi | Secret dùng cho header |
HOST | ❌ | Địa chỉ bind khi chạy HTTP, mặc định |
PORT | ❌ | Cổng lắng nghe khi chạy HTTP, mặc định |
MCP_PUBLIC_HOST | ❌ | Hostname công khai (qua reverse proxy) để chặn DNS rebinding |
Hai biến bắt buộc ở trên chỉ bắt buộc khi gọi tool mà không truyền ig_user_id và access_token. Server không thoát khi thiếu chúng, để client vẫn liệt kê được tool.
Related MCP server: instagram-mcp
Lấy token
Instagram phải là Business/Creator và liên kết với 1 Facebook Page.
developers.facebook.com → App → cấp quyền:
instagram_basic,instagram_content_publish,pages_show_list.Graph API Explorer → generate long-lived token.
Lấy IG_USER_ID: gọi
GET /{page-id}?fields=instagram_business_account.
Import vào Evose (STDIO / npx)
{
"mcpServers": {
"instagram": {
"command": "npx",
"args": ["-y", "github:<user>/instagram-mcp"],
"env": {
"IG_USER_ID": "...",
"IG_ACCESS_TOKEN": "..."
}
}
}
}Thay <user> bằng GitHub username. Execution Timeout để 120s (video reels cần chờ xử lý).
Import vào Evose (HTTP remote)
Deploy server ở chế độ MCP_TRANSPORT=http (VPS/Railway/Render), sau đó khai báo trong Evose dạng Streamable HTTP:
{
"mcpServers": {
"instagram": {
"url": "https://<domain-cua-server>/mcp",
"type": "streamable-http",
"headers": { "Authorization": "Bearer <MCP_AUTH_TOKEN>" }
}
}
}Ghi chú
Ảnh/video đăng từ URL công khai. Reels yêu cầu 9:16, 3–90s.
Giới hạn 100 bài/24h (chính sách Instagram). License MIT.
Available Tools
10 toolsget_account_infoA
Lay thong tin tai khoan Instagram (username, so follower, so bai).
Inputs: no named parameters.
get_commentsC
Lay binh luan cua mot bai.
Inputs: media_id (required), limit.
get_mediaC
Lay chi tiet mot bai theo media_id.
Inputs: media_id (required).
list_mediaB
Lay danh sach bai da dang tren Instagram.
Inputs: limit.
post_carouselB
Dang carousel (nhieu anh/video, toi da 10) len Instagram.
Inputs: items (required), caption.
post_photoB
Dang 1 anh len Instagram tu URL anh cong khai.
Inputs: image_url (required), caption.
post_reelA
Dang Reel (video) len Instagram tu URL video cong khai. Yeu cau video 9:16, 3-90s.
Inputs: video_url (required), caption, cover_url, share_to_feed.
post_story_photoA
Dang Story anh len Instagram tu URL anh cong khai.
Inputs: image_url (required).
post_story_videoA
Dang Story video len Instagram tu URL video cong khai.
Inputs: video_url (required).
reply_commentC
Tra loi mot binh luan tren Instagram.
Inputs: message (required), comment_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct action and resource: account info, photo/reel/story/carousel posting, media listing/detail, and comment viewing/reply. There is no overlap or ambiguity between tools.
All tool names follow a consistent verb_noun pattern with clear verbs (get, post, list, reply) and snake_case. Compound nouns like account_info and story_photo are used uniformly, maintaining a predictable naming convention.
With 10 tools, the server is well-scoped for an Instagram content management and engagement tool. Each tool serves a distinct purpose without redundancy or excess, fitting comfortably in the ideal 3-15 range.
The tool surface covers core workflows: retrieving account info, posting various content types, listing and getting media, and managing comments. Minor gaps exist such as delete/update media, like/unlike, and following features, but the core publishing and engagement lifecycle is well represented.
Maintenance
Related MCP Connectors
Schedule Instagram reels, manage comment-to-DM automations, and read analytics
Publish to Instagram from chat — official Graph API, OAuth 2.1, free for your own posts.
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
- AlicenseAqualityCmaintenanceEnables publishing photos, reels, and stories to Instagram, reading and moderating comments, fetching performance insights, drafting captions via MCP sampling, and scheduling reels for later.1326 npmMIT
- AlicenseBqualityBmaintenanceEnables reading, publishing, commenting on, and analyzing Instagram Business/Creator accounts through the official Graph API, with multi-account support and an optional self-hosted publishing panel.29MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to interact with Instagram Business accounts through Meta's Graph API. Supports retrieving profile details, media posts, and engagement insights, publishing images and videos, and reading or replying to direct messages (with Advanced Access).-
- FlicenseNot gradedqualityAmaintenanceEnables AI applications to interact with Instagram Business accounts through Instagram's Graph API, including retrieving profile, media, and insights data, publishing content, and managing direct message conversations.-