Readify-App/insta-mcp-server
If you are the rightful owner of insta-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Instagram MCP Server allows integration with Instagram's API to access user information and post data, enhancing Claude Desktop with Instagram data access capabilities.
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.sh
Windows (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 sync
- Claude 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の使用制限を守って使用してください。