Instagram MCP Server
The Instagram MCP Server fetches and processes Instagram posts using Chrome's existing login session. Key capabilities include:
Fetch recent posts from an Instagram profile by specifying a username
Control the number of posts fetched (limit parameter accepts 1-50 or "all")
Fetch posts starting from a specific index using the
startFromparameterAutomatically download media files associated with posts
Generate metadata and SEO-friendly descriptions for posts
Configure through environment variables for Chrome user data, browser settings, and Instagram parameters
Utilize JSON-RPC 2.0 for standardized communication
Benefit from improved error handling with standardized codes and messages
Enables fetching and processing Instagram posts using Chrome's existing login session, with support for media downloading, metadata generation, and SEO-friendly description creation.
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 get recent posts from @natgeo, limit 5"
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
A Model Context Protocol (MCP) server for fetching Instagram posts using Chrome's existing login session.
Features
Modular architecture with clear separation of concerns
Type-safe implementation using TypeScript
Improved error handling and logging
Configurable through environment variables
JSON-RPC 2.0 compliant communication
Automatic media downloading and metadata generation
SEO-friendly description generation
Related MCP server: instagram-mcp
Architecture
The server follows a modular architecture with the following structure:
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
Configuration
The server requires the following environment variables:
CHROME_USER_DATA_DIR: Path to Chrome user data directory containing login session
Additional configuration options are available through the config manager:
Browser settings (viewport, timeouts)
Instagram settings (delays, batch sizes)
Save directory and file paths
Usage
Install dependencies:
npm installBuild the server:
npm run buildRun the server:
CHROME_USER_DATA_DIR=/path/to/chrome/profile npm start
Available Tools
get_instagram_posts
Fetches recent posts from an Instagram profile.
Parameters:
username(required): Instagram username to fetch posts fromlimit(optional): Number of posts to fetch (1-50) or "all"saveDir(optional): Directory to save media files and metadatadelayBetweenPosts(optional): Milliseconds to wait between processing posts
Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "call_tool",
"params": {
"name": "get_instagram_posts",
"arguments": {
"username": "example",
"limit": 10
}
}
}Error Handling
The server uses standardized error codes and messages:
INVALID_REQUEST: Invalid request format or parametersINVALID_PARAMS: Missing or invalid parametersMETHOD_NOT_FOUND: Unknown method or toolINTERNAL_ERROR: Server-side errors
Development
Start in development mode:
npm run devRun linter:
npm run lint
Improvements Over Original
Modular Architecture
Clear separation of concerns
Better code organization
Easier to maintain and extend
Type Safety
Comprehensive TypeScript types
Better error catching
Improved IDE support
Error Handling
Standardized error codes
Better error messages
Proper error propagation
Configuration
Centralized configuration
Environment variable validation
Type-safe config access
Code Quality
Consistent coding style
Better documentation
Improved logging
Testing Support
Modular design enables testing
Dependency injection ready
Clear interfaces
License
MIT
Available Tools
1 toolget_instagram_postsC
Get recent posts from an Instagram profile using existing Chrome login
Inputs: username (required), limit, startFrom.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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 Instagram MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
OAuth-enabled MCP server that extracts structured data from public social media posts.
Instagram data over MCP: profiles, posts, reels, stories, highlights and search as JSON
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
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server that enables integration with Instagram, allowing interaction with Instagram features through the Model Context Protocol.1518 npm9MIT
- AlicenseBqualityCmaintenanceAn MCP server for the official Instagram Graph API, enabling read, publish, comment, and analytics across Instagram Business/Creator accounts.29131 PyPI17MIT
- AlicenseBqualityFmaintenanceMCP server that connects AI agents to Instagram for reading statistics, insights, and comments via the official Meta Graph API.162MIT
- AlicenseNot gradedqualityCmaintenanceLocal MCP server for preparing previews and publishing single image posts to Instagram after explicit user confirmation, with OAuth and safety safeguards.MIT