Instagram MCP Server
Instagram MCPサーバー
Chrome の既存のログイン セッションを使用して Instagram の投稿を取得するための Model Context Protocol (MCP) サーバー。
特徴
関心事を明確に分離したモジュラーアーキテクチャ
TypeScriptを使用した型安全な実装
エラー処理とログの改善
環境変数で設定可能
JSON-RPC 2.0準拠の通信
自動メディアダウンロードとメタデータ生成
SEOに適した説明文生成
Related MCP server: instagram-mcp
建築
サーバーは、次の構造を持つモジュラー アーキテクチャに従います。
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の設定(遅延、バッチサイズ)
ディレクトリとファイルのパスを保存する
使用法
依存関係をインストールします:
npm installサーバーを構築します。
npm run buildサーバーを実行します。
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: サーバー側のエラー
発達
開発モードで開始します:
npm run devリンターを実行します:
npm run lint
オリジナルからの改良点
モジュラーアーキテクチャ
明確な関心の分離
より良いコード構成
メンテナンスと拡張が容易
型安全性
包括的なTypeScript型
より優れたエラーキャッチ
IDEサポートの改善
エラー処理
標準化されたエラーコード
改善されたエラーメッセージ
適切なエラー伝播
構成
集中構成
環境変数の検証
型安全な設定アクセス
コード品質
一貫したコーディングスタイル
より良いドキュメント
ログの改善
テストサポート
モジュール設計によりテストが可能
依存性注入対応
明確なインターフェース
ライセンス
マサチューセッツ工科大学
Available Tools
1 toolget_instagram_postsC
Get recent posts from an Instagram profile using existing Chrome login
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of posts to fetch (1-3) or "all" for continuous batches | |
| startFrom | No | Index to start fetching from (for pagination) | |
| username | Yes | Instagram username to fetch posts from |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden but only mentions 'using existing Chrome login' as a behavioral trait, hinting at authentication needs. It fails to disclose critical behaviors like rate limits, pagination mechanics (implied by 'startFrom' but not explained), error handling, or what 'recent' means temporally, leaving significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the core action and key constraint ('using existing Chrome login'). It's front-loaded with the main purpose, though it could be slightly more structured by separating functional from implementation details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool with 3 parameters and behavioral complexity. It lacks details on return values (e.g., post format, errors), authentication specifics, or operational limits, making it inadequate for full agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents parameters like 'limit' and 'startFrom'. The description adds no additional meaning beyond what's in the schema, such as clarifying 'recent' in relation to parameters or usage context, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get recent posts') and target resource ('from an Instagram profile'), making the purpose understandable. However, it doesn't differentiate from siblings (none exist), and the phrase 'using existing Chrome login' adds implementation detail rather than clarifying the core purpose, slightly reducing specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints beyond the implied need for Chrome login. With no siblings, differentiation isn't needed, but it lacks context like when to fetch posts (e.g., for monitoring, analysis) or any exclusions, leaving usage unclear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
get_instagram_posts
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as retrieving Instagram posts, leaving no room for misselection.
The single tool name follows a clear verb_noun pattern (get_instagram_posts), which is consistent and predictable. Since there is only one tool, naming consistency is inherently perfect.
One tool is too few for a server labeled 'Instagram MCP Server', which implies broader Instagram functionality. This minimal toolset feels thin and under-scoped for the apparent domain, limiting agent capabilities.
The tool surface is severely incomplete for Instagram operations. It only allows retrieving posts, with no coverage for actions like posting, commenting, liking, or managing profiles, leading to significant gaps that will cause agent failures.
Maintenance
Related MCP Connectors
Hosted MCP server for DataLikers — Instagram & TikTok data API. 51 tools: Instagram user search by demographics (gender/age/race/country/city), profiles, bulk lookup, engagement, posts & reels, comments, hashtags, locations, stories, highlights, music, business accounts, top users; TikTok users, videos, comments, hashtags, playlists and top charts. Streamable HTTP, Bearer API key. Free tier: 100 requests on signup at https://datalikers.com/p/1by27bwg
- MysocialOAuthio.mysocial
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
Instagram: Instagram public data scraper API for search, users, posts, hashtags, locations and more.
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that enables integration with Instagram, allowing interaction with Instagram features through the Model Context Protocol.159 npm8MIT
- AlicenseBqualityAmaintenanceAn MCP server for the official Instagram Graph API, enabling read, publish, comment, and analytics across Instagram Business/Creator accounts.2989 PyPI8MIT
- AlicenseBqualityFmaintenanceMCP server that connects AI agents to Instagram for reading statistics, insights, and comments via the official Meta Graph API.162MIT
- AlicenseNot gradedqualityAmaintenanceLocal MCP server for preparing previews and publishing single image posts to Instagram after explicit user confirmation, with OAuth and safety safeguards.MIT