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 "Install 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 Serverget 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
| 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.
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that enables integration with Instagram, allowing interaction with Instagram features through the Model Context Protocol.15288MIT
- AlicenseBqualityAmaintenanceAn MCP server for the official Instagram Graph API, enabling read, publish, comment, and analytics across Instagram Business/Creator accounts.29MIT
- AlicenseBqualityCmaintenanceMCP 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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