- Explore MCP Servers
- instagram-server-next-mcp
Instagram Server Next Mcp
What is Instagram Server Next Mcp
instagram-server-next-mcp is a Model Context Protocol (MCP) server designed to fetch Instagram posts using an existing Chrome login session. It allows users to retrieve posts programmatically while leveraging the user’s authenticated session.
Use cases
Use cases for instagram-server-next-mcp include automating the retrieval of Instagram posts for data analysis, content management systems, social media monitoring, and enhancing SEO strategies by generating optimized descriptions for Instagram content.
How to use
To use instagram-server-next-mcp, first install the dependencies with ‘npm install’. Then, build the server using ‘npm run build’. Finally, run the server by setting the ‘CHROME_USER_DATA_DIR’ environment variable to your Chrome profile path and executing ‘npm start’.
Key features
Key features include a modular architecture, TypeScript implementation for type safety, improved error handling and logging, environment variable configuration, JSON-RPC 2.0 compliant communication, automatic media downloading, and SEO-friendly description generation.
Where to use
undefined
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Instagram Server Next Mcp
instagram-server-next-mcp is a Model Context Protocol (MCP) server designed to fetch Instagram posts using an existing Chrome login session. It allows users to retrieve posts programmatically while leveraging the user’s authenticated session.
Use cases
Use cases for instagram-server-next-mcp include automating the retrieval of Instagram posts for data analysis, content management systems, social media monitoring, and enhancing SEO strategies by generating optimized descriptions for Instagram content.
How to use
To use instagram-server-next-mcp, first install the dependencies with ‘npm install’. Then, build the server using ‘npm run build’. Finally, run the server by setting the ‘CHROME_USER_DATA_DIR’ environment variable to your Chrome profile path and executing ‘npm start’.
Key features
Key features include a modular architecture, TypeScript implementation for type safety, improved error handling and logging, environment variable configuration, JSON-RPC 2.0 compliant communication, automatic media downloading, and SEO-friendly description generation.
Where to use
undefined
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
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
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 install -
Build the server:
npm run build -
Run 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 dev -
Run 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
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










