Instagram MCP Server

Instagram MCP Server

Enables access to Instagram data through EnsembleData API, allowing retrieval of user information, posts, reels, follower counts, and search functionality for users, hashtags, and locations.

Category
Visit Server

README

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

手動インストール

  1. リポジトリのクローン
git clone https://github.com/Readify-App/insta-mcp-server.git
cd insta-mcp-server
  1. 依存関係のインストール
uv sync
  1. 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 に表示されない

  1. Claude Desktop を完全に再起動

    • アプリを終了して再度起動してください
  2. 設定ファイルを確認

    # macOS
    cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
    # Windows
    type %APPDATA%\Claude\claude_desktop_config.json
    
  3. パスが正しいか確認

    • claude_desktop_config.json 内のパスが実際のインストールディレクトリと一致しているか確認

API エラーが発生する

  1. API キーを確認

    • server.py 内の API_KEY が正しく設定されているか確認
  2. API 制限を確認

  3. ログを確認

    # macOS/Linux
    tail -f /tmp/insta-mcp-server/debug.log
    
    # Windows
    type %TEMP%\insta-mcp-server\debug.log
    

インストールスクリプトが失敗する

  1. 必要なツールがインストールされているか確認

    • curl, git, uv
  2. インターネット接続を確認

  3. 手動インストールを試す

    • 上記の「手動インストール」セクションを参照

開発者向け情報 👨‍💻

プロジェクト構造

insta-mcp-server/
├── README.md           # このファイル
├── install.ps1         # Windows用インストールスクリプト
├── install.sh          # Mac/Linux用インストールスクリプト
├── main.py             # エントリーポイント(固定)
├── pyproject.toml      # プロジェクト設定
└── server.py           # メインサーバー実装

ローカル開発

  1. 仮想環境の作成
uv sync
  1. サーバーの起動
uv run insta-mcp-server
  1. テスト
# MCP Inspector を使用してテスト
npx @modelcontextprotocol/inspector uv --directory /path/to/insta-mcp-server run insta-mcp-server

カスタマイズ

server.py を編集することで、以下のカスタマイズが可能です:

  • 新しいツールの追加
  • レスポンスフォーマットの変更
  • エラーハンドリングの改善
  • ログレベルの調整

ライセンス 📄

MIT License

サポート 💬

問題が発生した場合:

  1. Issues で既存の問題を確認
  2. 新しい Issue を作成
  3. ログファイルを添付すると解決が早まります

謝辞 🙏

関連リンク 🔗


注意: このツールは教育目的で作成されています。Instagram の利用規約を遵守し、APIの使用制限を守って使用してください。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured