Skip to main content
Glama
pedroantonnio

Instagram Public MCP

Instagram Public MCP for Vercel

Pythonで実装されたリモートMCPサーバーです。Instagramのログイン、クッキー、パスワード、保存されたアカウントセッションを一切使用せず、公開のInstagramデータのみを取得します。

重要: mobile-feed Instaloaderパッチ

このビルドでは、標準のInstaloader 4.15.3パッケージを使用していません

Instaloaderのプルリクエスト#2722にある匿名プロフィール/投稿修正を、次の場所に固定しています:

3f72b47466cc505b92c6e9b0ca2f5689e93a6a89

依存関係:

instaloader @ https://github.com/alimony/instaloader/archive/3f72b47466cc505b92c6e9b0ca2f5689e93a6a89.zip

このパッチにより、匿名時の動作は次のように変更されます:

  • プロフィール解決は api/v1/users/web_profile_info/ から api/v1/feed/user/{username}/username/ にフォールバックできます

  • 匿名の投稿ページネーションは api/v1/feed/user/{id}/ を使用します

  • 投稿ページは max_id ページネーションを使用します

  • 項目はInstaloaderのiPhone/モバイルレスポンスモデルを通じて変換されます

  • web_profile_info での失敗は、長いリトライ/バックオフループを待つことなく、フィードフォールバックに即座に到達できます

認証済みのInstagramアカウントは使用されません。

Related MCP server: Instagram Download MCP Server

アーキテクチャ

MCP Client
    |
    v
Vercel /api/mcp
    |
    v
Patched Instaloader (PR #2722)
    |
    v
Instagram mobile feed endpoint

MCPツール

get_instagram_profile

Instagramプロフィールの公開メタデータを返します。

{
  "username": "instagram"
}

get_instagram_posts

最近の公開投稿を返します。

{
  "username": "instagram",
  "count": 3
}

debug_instagram_connection

生のレガシー web_profile_info HTTPレスポンスを検査します。このツールは診断用に引き続き利用できます。ただしパッチ適用済みのInstaloaderは、web_profile_info エンドポイントが拒否された場合にモバイルフィードエンドポイントへフォールバックできます。

{
  "username": "instagram"
}

MCPリソース

instagram://profile/{username}
instagram://profile/{username}/posts

キャッシュ

デフォルトのインメモリキャッシュ:

CACHE_TTL_SECONDS=600
DEFAULT_POST_COUNT=12
MAX_POST_COUNT=30

無効にするには CACHE_TTL_SECONDS=0 を設定します。

Vercelのインスタンスは一時的なものであるため、このキャッシュはウォーム関数インスタンスごとに保持され、グローバルに共有されるキャッシュではありません。

Vercelへのデプロイ

npm install -g vercel
vercel --prod

同梱の vercel.json は、関数をサンパウロにデプロイします:

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "regions": ["gru1"]
}

MCPエンドポイント:

https://YOUR-PROJECT.vercel.app/api/mcp

ヘルスエンドポイント:

https://YOUR-PROJECT.vercel.app/api/health

ローカル開発

python -m venv .venv
pip install -r requirements.txt
uvicorn api.index:app --reload

MCPエンドポイント:

http://127.0.0.1:8000/api/mcp

Cursor

.cursor/mcp.json:

{
  "mcpServers": {
    "instagram-public": {
      "url": "https://YOUR-PROJECT.vercel.app/api/mcp"
    }
  }
}

セキュリティ

このリポジトリには、Instagramアカウントの認証情報は含まれていません。

以下のものを含んでおらず、必要もありません:

  • Instagramのユーザー名/パスワード認証情報

  • sessionid

  • csrftoken

  • fb_dtsg

  • 認証済みアカウントID

  • 保存されたInstaloaderセッション

  • Instagramクッキー

制限事項

このサーバーは公開情報のみを取得し、非公開プロフィールの迂回を試みません。

Instagramは、デプロイ先のIPに基づいて匿名トラフィックをレート制限制限したり、ブロックしたりする場合があります。mobile-feedパッチは、既知の壊れた匿名 web_profile_info/タイムラインパスを修正しますが、InstagramがすべてのホスティングプロバイダーやIP範囲からのアクセスを受け入れることを保証するものではありません。

v2.1.1 プロフィール互換性の修正

匿名のモバイルフィードフォールバックは、通常 web_profile_info に存在する省略可能なプロフィールフィールドを省略することがあります。

バージョン2.1.1は、プロフィールプロパティを防御的に読み取ります。biographyexternal_url、ビジネスアカウントのメタデータなど欠落している値は、get_instagram_profile を失敗させるのではなく、null として返されます。

投稿の取得パスはv2.1.0から変更されません。

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables Instagram engagement analysis using the unofficial Instagram Private API, including comment sentiment analysis, account comparison, demographic extraction, lead identification, and engagement reporting.
    80
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables fetching public Instagram profiles, posts, and images without an API key via Instagram's mobile API.
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Public Instagram profiles and post feeds by handle, with hashtags and mentions parsed.

  • Scrape and analyze public LinkedIn posts as structured JSON via the Apify LinkedIn Posts API.

  • Unified social-media data across 10 networks: profiles, posts, search, comments, cross-search.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pedroantonnio/Instagram-Analytics-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server