Skip to main content
Glama

Instagram MCP Server

by duhlink

Instagram MCPサーバー

Chrome の既存のログイン セッションを使用して Instagram の投稿を取得するための Model Context Protocol (MCP) サーバー。

特徴

  • 関心事を明確に分離したモジュラーアーキテクチャ
  • TypeScriptを使用した型安全な実装
  • エラー処理とログの改善
  • 環境変数で設定可能
  • JSON-RPC 2.0準拠の通信
  • 自動メディアダウンロードとメタデータ生成
  • SEOに適した説明文生成

建築

サーバーは、次の構造を持つモジュラー アーキテクチャに従います。

src/ ├── core/ # Core MCP functionality │ ├── mcp/ # MCP server implementation │ │ ├── server.ts # Server class │ │ ├── stdio.ts # StdioServerTransport │ │ └── index.ts # Barrel exports │ ├── types/ # Core type definitions │ │ └── mcp.ts # MCP types │ └── utils/ # Utility functions │ ├── config.ts # Configuration management │ └── errors.ts # Error handling ├── features/ # Feature modules │ └── instagram/ # Instagram feature │ ├── types.ts # Instagram types │ ├── utils/ # Feature utilities │ │ ├── media.ts # Media handling │ │ ├── post.ts # Post processing │ │ └── seo.ts # SEO generation │ └── instagram.service.ts # Instagram service ├── services/ # Shared services │ └── browser/ # Browser service │ ├── types.ts # Browser types │ └── browser.service.ts # Browser service ├── index.ts # Entry point └── server.ts # Main server class

構成

サーバーには次の環境変数が必要です。

  • CHROME_USER_DATA_DIR : ログインセッションを含むChromeユーザーデータディレクトリへのパス

追加の構成オプションは、構成マネージャーを通じて利用できます。

  • ブラウザ設定(ビューポート、タイムアウト)
  • Instagramの設定(遅延、バッチサイズ)
  • ディレクトリとファイルのパスを保存する

使用法

  1. 依存関係をインストールします:
    npm install
  2. サーバーを構築します。
    npm run build
  3. サーバーを実行します。
    CHROME_USER_DATA_DIR=/path/to/chrome/profile npm start

利用可能なツール

インスタグラムの投稿を取得する

Instagram プロフィールから最近の投稿を取得します。

パラメータ:

  • username (必須):投稿を取得するInstagramのユーザー名
  • limit (オプション): 取得する投稿数 (1-50) または「all」
  • saveDir (オプション): メディアファイルとメタデータを保存するディレクトリ
  • delayBetweenPosts (オプション): 投稿処理間の待機時間(ミリ秒)

例:

{ "jsonrpc": "2.0", "id": 1, "method": "call_tool", "params": { "name": "get_instagram_posts", "arguments": { "username": "example", "limit": 10 } } }

エラー処理

サーバーは標準化されたエラー コードとメッセージを使用します。

  • INVALID_REQUEST : リクエストの形式またはパラメータが無効です
  • INVALID_PARAMS : パラメータが不足しているか無効です
  • METHOD_NOT_FOUND : 不明なメソッドまたはツール
  • INTERNAL_ERROR : サーバー側のエラー

発達

  1. 開発モードで開始します:
    npm run dev
  2. リンターを実行します:
    npm run lint

オリジナルからの改良点

  1. モジュラーアーキテクチャ
    • 明確な関心の分離
    • より良いコード構成
    • メンテナンスと拡張が容易
  2. 型安全性
    • 包括的なTypeScript型
    • より優れたエラーキャッチ
    • IDEサポートの改善
  3. エラー処理
    • 標準化されたエラーコード
    • 改善されたエラーメッセージ
    • 適切なエラー伝播
  4. 構成
    • 集中構成
    • 環境変数の検証
    • 型安全な設定アクセス
  5. コード品質
    • 一貫したコーディングスタイル
    • より良いドキュメント
    • ログの改善
  6. テストサポート
    • モジュール設計によりテストが可能
    • 依存性注入対応
    • 明確なインターフェース

ライセンス

マサチューセッツ工科大学

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

モデル コンテキスト プロトコル (MCP) を介して Chrome の既存のログイン セッションを使用して Instagram の投稿を取得できるサーバー。

  1. 特徴
    1. 建築
      1. 構成
        1. 使用法
          1. 利用可能なツール
            1. インスタグラムの投稿を取得する
          2. エラー処理
            1. 発達
              1. オリジナルからの改良点
                1. ライセンス

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol (MCP) server for managing social media posts, currently supporting X (formerly Twitter).
                    Last updated -
                    3
                    7
                    JavaScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    This server provides a standardized framework using the Model Context Protocol (MCP) to seamlessly integrate and manage diverse tools, enabling features like Twitter automation, cryptocurrency updates, and ElizaOS interaction.
                    Last updated -
                    2
                    Python
                  • A
                    security
                    A
                    license
                    A
                    quality
                    An MCP server that provides tools for interacting with Chrome through its DevTools Protocol, enabling remote control of Chrome tabs to execute JavaScript, capture screenshots, monitor network traffic, and more.
                    Last updated -
                    7
                    30
                    14
                    TypeScript
                    MIT License
                    • Linux
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol (MCP) server that enables Claude or other LLMs to fetch content from URLs, supporting HTML, JSON, text, and images with configurable request parameters.
                    Last updated -
                    Python
                    MIT License

                  View all related MCP servers

                  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/duhlink/instagram-server-next-mcp'

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