NV

narla-venkata-anand-sai-kumar/openinstaflow

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

20 stars 1 forks 质量 66 趋势 14

OpenInstaFlow — 一个MCP服务器,向任何MCP客户端(Claude Desktop、Claude Code、Cursor)开放Instagram Graph API。

概览

一个MCP服务器,可以向任何MCP客户端(Claude Desktop、Claude Code、Cursor等)开放。——将服务器指向你的Instagram商家/创作者账户,模型就能阅读你的个人资料、帖子和洞察、发布媒体、管理Facebook页面并处理私信。 作为一个标准子进程运行——没有服务器托管。只有 npx openinstaflow。 ——实时、可附加的上下文:instagram://profile、instagram://media、instagram://insights。 ——现成模板:analyze_engagement、content_strategy、hashtag_analysis。 把它添加到你的MCP客户端配置中(Claude Desktop:claude_desktop_config.json;Claude代码:.mcp.json): 重启客户端后,OpenInstaFlow的工具/资源/提示就会出现。 将这些设置到服务器的环境块(如上图): 每个工具还接受可选的access_token/ig_user_id参数,这个参数是对该单次调用的环境——所以一台运行的服务器可以驱动多个账户。

概述(AI 翻译)

一个MCP服务器,向任何MCP暴露Instagram Graph API 客户端(Claude Desktop、Claude Code、Cursor 等)。自带 Meta 令牌 — 将服务器指向 你的Instagram商家/创作者账号和模特可以阅读你的个人资料、帖子和见解, 发布媒体、管理Facebook页面和私信处理。

作为 stdio 子进程运行——没有服务器托管。只有 npx openinstaflow。

特色

** 🔧 Tools (model-controlled)**

工具 它的作用
get_profile_info 个人资料详情:用户名、简介、网站、粉丝/关注/媒体数量、头像
get_media_posts 最近帖子(标题、类型、永久链接、点赞/评论数)带分页
get_media_insights 每条帖子互动(触及、点赞、评论、保存、分享等)
publish_media 从公共媒体网址发布图片/短片/故事/轮播
get_account_pages 列出关联的Facebook页面 + 他们的页面代币 + 关联的IG账号 (FB登录)
get_conversations 列表 Instagram 私信帖 (高级访问)
get_conversation_messages 在线程中阅读消息 (高级访问)
send_dm 回复私信 (高级访问)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

OpenInstaFlow — Instagram MCP server

An MCP server that exposes the Instagram Graph API to any MCP client (Claude Desktop, Claude Code, Cursor, …). Bring your own Meta token — point the server at your Instagram Business/Creator account and the model can read your profile, posts and insights, publish media, manage Facebook Pages, and handle DMs.

Runs as a stdio subprocess — no server to host. Just npx openinstaflow.

Features

🔧 Tools (model-controlled)

Tool What it does
get_profile_info Profile details: username, bio, website, follower/following/media counts, avatar
get_media_posts Recent posts (caption, type, permalink, like/comment counts) with paging
get_media_insights Per-post engagement (reach, likes, comments, saves, shares, …)
publish_media Publish an image / reel / story / carousel from public media URLs
get_account_pages List connected Facebook Pages + their Page tokens + linked IG account (FB Login)
get_conversations List Instagram DM threads (Advanced Access)
get_conversation_messages Read messages in a thread (Advanced Access)
send_dm Reply to a DM (Advanced Access)

📊 Resources (application-controlled) — live, attachable context: instagram://profile, instagram://media, instagram://insights.

💬 Prompts (user-controlled) — ready-made templates: analyze_engagement, content_strategy, hashtag_analysis.

Quick start

Add it to your MCP client config (Claude Desktop: claude_desktop_config.json; Claude Code: .mcp.json):

{
  "mcpServers": {
    "openinstaflow": {
      "command": "npx",
      "args": ["-y", "openinstaflow"],
      "env": {
        "IG_ACCESS_TOKEN": "",
        "IG_USER_ID": "",
        "IG_LOGIN_KIND": "ig_login"
      }
    }
  }
}

Restart the client and the OpenInstaFlow tools/resources/prompts appear.

Authentication

Set these in the server’s env block (above):

Var Required Notes
IG_ACCESS_TOKEN ✅ Long-lived Instagram/Meta access token with content-publishing scope
IG_USER_ID ✅ (most tools) Your Instagram Business/Creator account id
IG_LOGIN_KIND – ig_login (default, graph.instagram.com) or fb_login (graph.facebook.com, required for Pages + DMs)
IG_GRAPH_VERSION – Graph version for the facebook.com base (default v23.0)
FB_PAGE_ID / FB_PAGE_ACCESS_TOKEN – Page id + token for Pages/DM tools (FB Login)
META_APP_ID / META_APP_SECRET – Only needed if you add token-refresh/debug flows

Every tool also accepts optional access_token / ig_user_id arguments that override the env for that single call — so one running server can drive multiple accounts.

Permissions

  • Reading + publishing need a Business/Creator account and the usual content-publishing
在 GitHub 查看完整 README

安装

npx -y openinstaflow
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "openinstaflow": { "command": "npx", "args": ["-y", "openinstaflow"], "env": { "IG_ACCESS_TOKEN": "<your long-lived token>", "IG_USER_ID": "<your IG business account id>", "IG_LOGIN_KIND": "ig_login" } } } }