Instagram MCP Server
Enables retrieval of Instagram user information, posts, reels, statistics, follower counts, and post details with comments. Supports searching for users, hashtags, and places through the EnsembleData Instagram API.
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 Server show me @nike's latest posts"
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 📸
Instagram API を利用した MCP (Model Context Protocol) サーバー
概要
EnsembleData の Instagram API を使用して、Instagram のユーザー情報や投稿データを取得できる MCP サーバーです。Claude Desktop と統合することで、Claude に Instagram データへのアクセス機能を追加できます。
主な機能 ✨
ユーザー情報
✅ ユーザー基本情報取得
✅ ユーザー詳細統計
✅ フォロワー数取得
投稿データ
✅ ユーザー投稿一覧
✅ リール(短尺動画)取得
✅ 投稿詳細情報とコメント
検索
✅ ユーザー検索
✅ ハッシュタグ検索
✅ 場所検索
必要要件 📋
API キー
EnsembleData の API キーが必要です
無料プランでも利用可能(制限あり)
システム要件
Python 3.10 以上
Claude Desktop アプリ
インターネット接続
インストール方法 🚀
自動インストール(推奨)
macOS / Linux
curl -sSf https://raw.githubusercontent.com/Readify-App/insta-mcp-server/main/install.sh | bashまたは、リポジトリをクローンして実行:
git clone https://github.com/Readify-App/insta-mcp-server.git
cd insta-mcp-server
chmod +x install.sh
./install.shWindows (PowerShell)
irm https://raw.githubusercontent.com/Readify-App/insta-mcp-server/main/install.ps1 | iexまたは、リポジトリをクローンして実行:
git clone https://github.com/Readify-App/insta-mcp-server.git
cd insta-mcp-server
.\install.ps1手動インストール
リポジトリのクローン
git clone https://github.com/Readify-App/insta-mcp-server.git
cd insta-mcp-server依存関係のインストール
uv syncClaude Desktop の設定
claude_desktop_config.json に以下を追加:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"insta-mcp-server": {
"command": "uv",
"args": ["--directory", "/path/to/insta-mcp-server", "run", "insta-mcp-server"]
}
}
}設定 ⚙️
API キーの設定
インストール後、server.py を編集して API キーを設定してください:
# server.py の該当箇所
API_KEY = "YOUR_API_KEY_HERE" # ここに実際のAPIキーを設定推奨: 環境変数を使用する方法
import os
API_KEY = os.getenv("ENSEMBLEDATA_API_KEY", "YOUR_API_KEY_HERE")環境変数で設定する場合:
# ~/.zshrc または ~/.bashrc に追加
export ENSEMBLEDATA_API_KEY="your_api_key_here"使い方 📖
Claude Desktop を再起動後、以下のような質問ができます:
ユーザー情報の取得
@instagram のユーザー情報を教えて投稿の取得
@natgeo の最新の投稿を10件取得してリールの取得
@cristiano のリールを見せてユーザー検索
Instagramで "travel" で検索して投稿詳細の取得
この投稿の詳細を教えて: https://instagram.com/p/xxxxxフォロワー数の確認
@nike のフォロワー数は?利用可能なツール 🛠️
1. instagram_user_info
ユーザーの基本情報を取得
パラメータ:
username(str): Instagramユーザー名(@なし)
使用例:
instagram_user_info(username="instagram")2. instagram_user_posts
ユーザーの投稿一覧を取得
パラメータ:
username(str): Instagramユーザー名(@なし)count(int): 取得する投稿数(デフォルト: 12)
使用例:
instagram_user_posts(username="natgeo", count=20)3. instagram_user_stats
ユーザーの統計情報を取得
パラメータ:
username(str): Instagramユーザー名(@なし)
使用例:
instagram_user_stats(username="cristiano")4. instagram_user_reels
ユーザーのリールを取得
パラメータ:
username(str): Instagramユーザー名(@なし)count(int): 取得するリール数(デフォルト: 12)
使用例:
instagram_user_reels(username="redbull", count=10)5. instagram_search
ユーザーやハッシュタグを検索
パラメータ:
query(str): 検索キーワードsearch_type(str): 検索タイプ("users", "hashtags", "places")
使用例:
instagram_search(query="travel", search_type="users")6. instagram_post_info
投稿の詳細情報とコメントを取得
パラメータ:
post_url(str): Instagram投稿のURL
使用例:
instagram_post_info(post_url="https://instagram.com/p/xxxxx")7. instagram_follower_count
フォロワー数を取得
パラメータ:
username(str): Instagramユーザー名(@なし)
使用例:
instagram_follower_count(username="nike")トラブルシューティング 🔧
Claude Desktop に表示されない
Claude Desktop を完全に再起動
アプリを終了して再度起動してください
設定ファイルを確認
# macOS cat ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows type %APPDATA%\Claude\claude_desktop_config.jsonパスが正しいか確認
claude_desktop_config.json内のパスが実際のインストールディレクトリと一致しているか確認
API エラーが発生する
API キーを確認
server.py内のAPI_KEYが正しく設定されているか確認
API 制限を確認
EnsembleData ダッシュボード で使用量を確認
ログを確認
# macOS/Linux tail -f /tmp/insta-mcp-server/debug.log # Windows type %TEMP%\insta-mcp-server\debug.log
インストールスクリプトが失敗する
必要なツールがインストールされているか確認
curl, git, uv
インターネット接続を確認
手動インストールを試す
上記の「手動インストール」セクションを参照
開発者向け情報 👨💻
プロジェクト構造
insta-mcp-server/
├── README.md # このファイル
├── install.ps1 # Windows用インストールスクリプト
├── install.sh # Mac/Linux用インストールスクリプト
├── main.py # エントリーポイント(固定)
├── pyproject.toml # プロジェクト設定
└── server.py # メインサーバー実装ローカル開発
仮想環境の作成
uv syncサーバーの起動
uv run insta-mcp-serverテスト
# MCP Inspector を使用してテスト
npx @modelcontextprotocol/inspector uv --directory /path/to/insta-mcp-server run insta-mcp-serverカスタマイズ
server.py を編集することで、以下のカスタマイズが可能です:
新しいツールの追加
レスポンスフォーマットの変更
エラーハンドリングの改善
ログレベルの調整
ライセンス 📄
MIT License
サポート 💬
問題が発生した場合:
Issues で既存の問題を確認
新しい Issue を作成
ログファイルを添付すると解決が早まります
謝辞 🙏
EnsembleData - Instagram API の提供
Anthropic - Claude と MCP の開発
MCP Community - プロトコルの開発とサポート
関連リンク 🔗
注意: このツールは教育目的で作成されています。Instagram の利用規約を遵守し、APIの使用制限を守って使用してください。
Available Tools
9 toolsinstagram_follower_countB
Instagramユーザーのフォロワー数を取得します。
Args:
username: Instagramユーザー名(@なし)
Returns:
フォロワー数の文字列
Inputs: username (required). Returns: result
instagram_music_postsB
指定された音楽IDに関連する投稿を取得します。
ページネーションに対応しています。
Args:
music_id: 音楽ID(例: "3473785566185564")
cursor: ページネーション用のカーソル(次のページを取得する場合に使用、空文字列の場合は最初のページ)
Returns:
音楽に関連する投稿一覧の文字列
Inputs: music_id (required), cursor. Returns: result
instagram_post_infoB
Instagram投稿の詳細情報とコメントを取得します。
Args:
post_url: Instagram投稿のURL(例: https://instagram.com/p/xxxxx)
n_comments: 取得するコメント数(デフォルト: 10、最大: 50)
Returns:
投稿情報の文字列
Inputs: post_url (required), n_comments. Returns: result
instagram_searchA
Instagramでユーザーやハッシュタグを検索します。
Args:
query: 検索キーワード
search_type: 検索タイプ("users", "hashtags", "places")- 現在は"users"のみ対応
Returns:
検索結果の文字列
Inputs: query (required), search_type. Returns: result
instagram_user_infoB
Instagramユーザーの詳細情報を取得します。
プロフィール、統計、外部リンクなどの包括的な情報を提供します。
Args:
username: Instagramユーザー名(@なし)
Returns:
ユーザー詳細情報の文字列
Inputs: username (required). Returns: result
instagram_user_postsB
Instagramユーザーの投稿一覧を取得します。
Args:
username: Instagramユーザー名(@なし)
count: 取得する投稿数(デフォルト: 12)
Returns:
投稿一覧の文字列
Inputs: username (required), count. Returns: result
instagram_user_reelsB
Instagramユーザーのリール(短尺動画)を取得します。
Args:
username: Instagramユーザー名(@なし)
count: 取得するリール数(デフォルト: 12)
Returns:
リール一覧の文字列
Inputs: username (required), count. Returns: result
instagram_user_statsC
Instagramユーザーの統計情報を取得します。
Args:
username: Instagramユーザー名(@なし)
Returns:
統計情報の文字列
Inputs: username (required). Returns: result
instagram_user_tagged_postsA
指定されたユーザーがタグ付けされた投稿を取得します。
各リクエストで最新10件のタグ付けされた投稿を返します。
Args:
username: Instagramユーザー名(@なし)
cursor: ページネーション用のカーソル(次のページを取得する場合に使用、空文字列の場合は最初のページ)
Returns:
タグ付けされた投稿一覧の文字列
Inputs: username (required), cursor. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools have distinct purposes targeting different Instagram resources (followers, posts, reels, user info, etc.), but there's some overlap between instagram_user_info and instagram_user_stats where both provide user statistics. The descriptions help clarify, but an agent might initially be confused about which to use for comprehensive user data.
All tools follow a consistent 'instagram_' prefix with descriptive snake_case naming (e.g., instagram_follower_count, instagram_user_posts). The pattern is uniform throughout, making it easy to predict tool names and understand their domain.
With 9 tools, this server is well-scoped for Instagram operations, covering key areas like user profiling, content retrieval, and search. Each tool serves a clear purpose without redundancy, and the count aligns well with the domain's complexity.
The toolset covers most Instagram interactions well, including user info, posts, reels, search, and follower stats. However, there are minor gaps such as the inability to create or interact with content (e.g., posting, liking, commenting), which limits full agent-driven workflows but doesn't hinder read-only operations.
Related MCP Connectors
Public Instagram profiles and post feeds by handle, with hashtags and mentions parsed.
Instagram: Instagram public data scraper API for search, users, posts, hashtags, locations and more.
16 Instagram endpoints. Pay per call in USDC via x402.
Read-only public Instagram data: profiles, posts, reels, stories, comments, top-accounts ranking.