{"_id":"@andrewlwn77/instagram-social-mcp","_rev":"3-4559826e7e60f1b48ed5c78b3ccc2b25","name":"@andrewlwn77/instagram-social-mcp","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@andrewlwn77/instagram-social-mcp","version":"1.0.0","keywords":["mcp","model-context-protocol","instagram","social-media","analytics","content-analysis","user-profiles","engagement-metrics"],"author":{"name":"andrewlwn77"},"license":"MIT","_id":"@andrewlwn77/instagram-social-mcp@1.0.0","maintainers":[{"name":"andrewlwn77","email":"andrewlwn@gmail.com"}],"homepage":"https://github.com/andrewlwn77/instagram-social-mcp#readme","bugs":{"url":"https://github.com/andrewlwn77/instagram-social-mcp/issues"},"bin":{"instagram-social-mcp":"dist/index.js"},"dist":{"shasum":"ac6fea1033ac2272898398a1226d4136e73f4625","tarball":"https://registry.npmjs.org/@andrewlwn77/instagram-social-mcp/-/instagram-social-mcp-1.0.0.tgz","fileCount":11,"integrity":"sha512-SLcbvsdfp1WWZUL+hLrJvjiJrrsVqFo31ZyI+ppVoQuOgTuq899IOK9CoM+iHuf0VmWG9n0aomd85jItBFSLrw==","signatures":[{"sig":"MEYCIQDpjBIdtHi/PzzbnB2IhuqhpfM1SXd2hZXcZGYELkp2SgIhALd5GlRwfdKk/B+tbcHtxC6RobP6OsBxORe3l6CSt7Ee","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":153498},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e152fe40acf7ddbe296f38ed52aa0332fafe1b54","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","postbuild":"chmod +x dist/index.js"},"_npmUser":{"name":"andrewlwn77","email":"andrewlwn@gmail.com"},"repository":{"url":"git+https://github.com/andrewlwn77/instagram-social-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for comprehensive Instagram data analysis and content discovery","directories":{},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.6.0","dotenv":"^16.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/instagram-social-mcp_1.0.0_1756524909153_0.809845058306262","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@andrewlwn77/instagram-social-mcp","version":"1.1.0","keywords":["mcp","model-context-protocol","instagram","social-media","analytics","content-analysis","user-profiles","engagement-metrics"],"author":{"name":"andrewlwn77"},"license":"MIT","_id":"@andrewlwn77/instagram-social-mcp@1.1.0","maintainers":[{"name":"andrewlwn77","email":"andrewlwn@gmail.com"}],"homepage":"https://github.com/andrewlwn77/instagram-social-mcp#readme","bugs":{"url":"https://github.com/andrewlwn77/instagram-social-mcp/issues"},"bin":{"instagram-social-mcp":"dist/index.js"},"dist":{"shasum":"14249565a1f2d94dd90dcf1d2e0575c6bf0d5797","tarball":"https://registry.npmjs.org/@andrewlwn77/instagram-social-mcp/-/instagram-social-mcp-1.1.0.tgz","fileCount":35,"integrity":"sha512-Bp7gpoQjjf41iok1Hvoxwas/8+bJLxL6kt7kFinW3dEkGe/MBWED5IdBHRYeGjjd0/oQPLeBDc/ih91696bC+g==","signatures":[{"sig":"MEQCIAbIctELQc+xv2yBsrYh0Tr/IH4hRSeuTi2dLLXjtwCGAiANxF8f7kBP0NPn+I7AMYdpZ7Sy8ZJmbEY3Fx2uSJzzug==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":168029},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"142e2582a353bcf15d5d82093cfbb212bcad10a2","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","postbuild":"chmod +x dist/index.js"},"_npmUser":{"name":"andrewlwn77","email":"andrewlwn@gmail.com"},"repository":{"url":"git+https://github.com/andrewlwn77/instagram-social-mcp.git","type":"git"},"_npmVersion":"10.9.2","description":"MCP server for comprehensive Instagram data analysis and content discovery","directories":{},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.6.0","dotenv":"^16.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/instagram-social-mcp_1.1.0_1758143425479_0.8305604017640811","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@andrewlwn77/instagram-social-mcp","version":"1.1.1","description":"MCP server for comprehensive Instagram data analysis and content discovery","main":"dist/index.js","bin":{"instagram-social-mcp":"dist/index.js"},"scripts":{"build":"tsc","postbuild":"chmod +x dist/index.js","dev":"tsc --watch","start":"node dist/index.js"},"keywords":["mcp","model-context-protocol","instagram","social-media","analytics","content-analysis","user-profiles","engagement-metrics"],"author":{"name":"andrewlwn77"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","axios":"^1.6.0","dotenv":"^16.0.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.9.2"},"engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/andrewlwn77/instagram-social-mcp.git"},"bugs":{"url":"https://github.com/andrewlwn77/instagram-social-mcp/issues"},"homepage":"https://github.com/andrewlwn77/instagram-social-mcp#readme","_id":"@andrewlwn77/instagram-social-mcp@1.1.1","gitHead":"22d30fc78cccfaebf57790a765bb318df4ebf812","types":"./dist/index.d.ts","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-whNfD3YE5/GkEGz4Rbms7ILxob/Io0DI3AqKabYSO9BYfGHRV3Ta7Jas9P/Z2vLV0s9vuckKi41t/MlTMkeI+g==","shasum":"1afefc4f6c517493d354bb6aa4c0bc133af1b2b5","tarball":"https://registry.npmjs.org/@andrewlwn77/instagram-social-mcp/-/instagram-social-mcp-1.1.1.tgz","fileCount":35,"unpackedSize":168704,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGPbXMPut8JEdRH2m5JDjXi3+8jRr3j14N3kcSs7aQ8rAiAtX7BCsvcrN4VEQU1jRS4UrLvrtKCB4SDVAPfjtwv/tg=="}]},"_npmUser":{"name":"andrewlwn77","email":"andrewlwn@gmail.com"},"directories":{},"maintainers":[{"name":"andrewlwn77","email":"andrewlwn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/instagram-social-mcp_1.1.1_1758147077664_0.880927557703262"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-30T03:35:09.071Z","modified":"2025-09-17T22:11:18.020Z","1.0.0":"2025-08-30T03:35:09.378Z","1.1.0":"2025-09-17T21:10:25.690Z","1.1.1":"2025-09-17T22:11:17.844Z"},"bugs":{"url":"https://github.com/andrewlwn77/instagram-social-mcp/issues"},"author":{"name":"andrewlwn77"},"license":"MIT","homepage":"https://github.com/andrewlwn77/instagram-social-mcp#readme","keywords":["mcp","model-context-protocol","instagram","social-media","analytics","content-analysis","user-profiles","engagement-metrics"],"repository":{"type":"git","url":"git+https://github.com/andrewlwn77/instagram-social-mcp.git"},"description":"MCP server for comprehensive Instagram data analysis and content discovery","maintainers":[{"name":"andrewlwn77","email":"andrewlwn@gmail.com"}],"readme":"# Instagram Social API MCP Server\n\nA Model Context Protocol (MCP) server for comprehensive Instagram data analysis and content discovery using the Instagram Social API.\n\n## Features\n\n- **User Profile Analysis**: Get detailed Instagram user information including stats, bio, and contact details\n- **Content Discovery**: Retrieve user posts and reels with engagement metrics\n- **Post Analysis**: Detailed information about specific Instagram posts, reels, and stories\n- **User Search**: Search for Instagram users by keywords, names, or usernames  \n- **Content Search**: Search for posts and reels by keywords and hashtags\n- **Hashtag Analytics**: Analyze hashtag performance and discover related content\n- **Intelligent Caching**: LRU cache with TTL to optimize API usage and performance\n- **Error Handling**: Comprehensive error handling with detailed user feedback\n\n## Installation\n\n```bash\nnpm install @andrewlwn77/instagram-social-mcp\n```\n\n## Configuration\n\n1. Get your API key from [Instagram Social API on RapidAPI](https://rapidapi.com/social-lens-social-lens-default/api/instagram-social-api)\n\n2. Set your environment variables:\n\n```bash\n# Required\nINSTAGRAM_SOCIAL_API_KEY=your_rapidapi_key_here\n\n# Optional (with defaults)\nCACHE_ENABLED=true\nCACHE_MAX_ENTRIES=200\nCACHE_TTL_SECONDS=600\n```\n\n## Usage\n\n### Available Tools\n\n#### `get_user_info`\nGet comprehensive Instagram user profile information.\n\n**Parameters:**\n- `username_or_id_or_url` (string): Instagram username (without @), user ID, or full profile URL\n\n**Examples:**\n```\nusername_or_id_or_url: \"mrbeast\"\nusername_or_id_or_url: \"25025320\"\nusername_or_id_or_url: \"https://instagram.com/mrbeast\"\n```\n\n#### `get_user_posts`\nRetrieve user posts and reels with engagement metrics.\n\n**Parameters:**\n- `username_or_id_or_url` (string): User identifier\n- `amount` (number, optional): Number of posts to retrieve (1-50, default: 12)\n- `end_cursor` (string, optional): Pagination cursor for next set of posts\n\n#### `get_post_info`\nGet detailed information about a specific Instagram post.\n\n**Parameters:**\n- `code_or_id_or_url` (string): Post code, ID, or full post URL\n\n**Examples:**\n```\ncode_or_id_or_url: \"CxYQJO8xuC6\"\ncode_or_id_or_url: \"https://instagram.com/p/CxYQJO8xuC6/\"\n```\n\n#### `search_users`\nSearch for Instagram users by keywords.\n\n**Parameters:**\n- `query` (string): Search query for finding users\n- `amount` (number, optional): Number of users to return (1-50, default: 20)\n\n#### `search_posts`\nSearch for Instagram posts and reels by content.\n\n**Parameters:**\n- `query` (string): Search query for finding posts\n- `amount` (number, optional): Number of posts to return (1-50, default: 20)\n\n#### `get_hashtag_posts`\nGet posts for a specific hashtag with analytics.\n\n**Parameters:**\n- `hashtag` (string): Hashtag name (without # symbol)\n- `amount` (number, optional): Number of posts to return (1-50, default: 20)\n\n## MCP Configuration\n\nAdd to your MCP settings file (`.mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"instagram-social-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"@andrewlwn77/instagram-social-mcp\"],\n      \"env\": {\n        \"INSTAGRAM_SOCIAL_API_KEY\": \"your_rapidapi_key_here\"\n      }\n    }\n  }\n}\n```\n\n## Performance Features\n\n### Intelligent Caching\n- **LRU Cache**: Least Recently Used eviction policy\n- **TTL Support**: Time-based expiration (default: 10 minutes)\n- **Configurable**: Adjust cache size and TTL via environment variables\n- **Automatic Cleanup**: Background cleanup of expired entries\n\n### Rate Limiting Protection\n- Built-in error handling for API rate limits\n- Automatic retry suggestions for recoverable errors\n- Cache-first approach reduces API calls\n\n## API Coverage\n\nThis MCP server implements the most valuable endpoints from the Instagram Social API:\n\n### User Profile Endpoints\n- User information with contact details\n- Follower/following data\n- Post and reel content\n- Account verification and privacy status\n\n### Content Analysis Endpoints  \n- Individual post details\n- Engagement metrics (likes, comments, views)\n- Media metadata and URLs\n- Content creation timestamps\n\n### Search and Discovery\n- User search by keywords\n- Content search across posts and reels\n- Hashtag performance analysis\n- Similar account discovery\n\n### Analytics Capabilities\n- Engagement rate analysis\n- Content performance metrics\n- Hashtag trend analysis\n- Audience growth insights\n\n## Error Handling\n\nThe server provides detailed error messages for:\n- Invalid API keys or authentication issues\n- Rate limit exceeded scenarios\n- Private or restricted content access\n- Malformed requests or invalid parameters\n- Network connectivity problems\n\n## Development\n\n```bash\n# Clone and install dependencies\ngit clone https://github.com/andrewlwn77/instagram-social-mcp.git\ncd instagram-social-mcp\nnpm install\n\n# Build the server\nnpm run build\n\n# Development with auto-rebuild\nnpm run dev\n\n# Start the server\nnpm start\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## Support\n\n- Create an issue on GitHub for bugs or feature requests\n- Check the Instagram Social API documentation for API-specific questions\n- Review RapidAPI dashboard for usage statistics and billing","readmeFilename":"README.md"}