kempec110/linkedin-profile-mcp
If you are the rightful owner of linkedin-profile-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The LinkedIn Profile Explorer MCP is a comprehensive server that integrates with Claude Desktop to enable powerful LinkedIn data extraction and exploration.
ā ļø Important Notice: API Discontinuation
As of July 16, 2025, the RapidAPI LinkedIn Data API endpoints used by this project have been discontinued at the request of LinkedIn. This means the current version of the LinkedIn Profile Explorer MCP no longer functions as described.
A new solution has been prepared by the API provider and I also have a potential workaround available. If you are interested in getting this tool to work please reach out to me directly at thang@growth3.net for more information.
LinkedIn Data Explorer MCP
A comprehensive LinkedIn data extraction MCP (Model Context Protocol) server that integrates seamlessly with Claude Desktop. Fetch, explore, and search through LinkedIn posts and comments with powerful filtering and discovery tools.
š What This Tool Does
This MCP server transforms Claude Desktop into a powerful LinkedIn data exploration platform. You can:
- š Extract LinkedIn Posts: Fetch and browse posts from any public LinkedIn profile
- š¬ Comment Discovery: Extract and explore comments with engagement metrics
- š Smart Search: Search through posts and comments with keyword filtering
- š Performance Insights: Discover top performing posts and comment engagement
- š Date-Based Filtering: Filter content by specific date ranges
- š„ Engagement Discovery: Identify most active commenters and popular discussions
šÆ Features
Post Extraction
- Fetch all posts from any public LinkedIn profile
- Search posts by keywords
- Discover top performing posts by likes and reactions
- Filter posts by date range
- Paginated access to large datasets
Comment Exploration (New!)
- Complete Comment Threads: Fetch posts with all their comments in one go
- Paginated Comment Loading: Handle large comment threads efficiently
- Comment Search: Find specific discussions across all saved data
- Engagement Discovery: Discover most active commenters and popular comments
- Comment Performance: Track likes and reactions on individual comments
š Prerequisites
- Python 3.7+ installed on your system
- Claude Desktop application
- RapidAPI account with LinkedIn Data API access
š ļø Setup Guide
Step 1: Get Your RapidAPI Key
- Visit RapidAPI: Go to LinkedIn Data API on RapidAPI
- Create Account: Sign up for a free RapidAPI account if you don't have one
- Subscribe to API: Click "Subscribe" on the LinkedIn Data API page
- Choose Plan: Select a plan (free tier available for testing)
- Get Your Key: Copy your RapidAPI key from the dashboard
Step 2: Download and Setup
-
Clone the Repository:
git clone https://github.com/kempec110/linkedin-profile-mcp.git cd linkedin-profile-mcp
Or download the ZIP file from the repository and extract it to your desired location.
-
Install Python Dependencies:
pip install -r requirements.txt
-
Create Environment File:
- Create a file named
.env
in the project folder - Add your RapidAPI key:
RAPIDAPI_KEY=your_rapidapi_key_here
- Create a file named
Step 3: Configure Claude Desktop
-
Locate Claude Desktop Config:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
-
Edit Configuration File: Open the config file and add the LinkedIn MCP server:
{ "mcpServers": { "linkedin-analyzer": { "command": "python", "args": ["C:/path/to/your/linkedin-mcp/main.py"], "env": { "RAPIDAPI_KEY": "your_rapidapi_key_here" } } } }
Important: Replace
C:/path/to/your/linkedin-mcp/main.py
with the actual path to yourmain.py
file. -
Restart Claude Desktop: Close and reopen Claude Desktop to load the new MCP server.
Step 4: Verify Installation
- Open Claude Desktop
- Start New Conversation
- Test the Connection: Type something like:
Can you help me explore LinkedIn posts? What tools do you have available?
If successful, Claude should show you the available LinkedIn data extraction tools.
š How to Use
Basic Post Extraction
-
Fetch Posts from a Profile:
Fetch LinkedIn posts for the username "john-doe"
-
Search Through Posts:
Search all saved posts for mentions of "artificial intelligence"
-
Get Top Performing Posts:
Show me the top 5 posts by like count
Advanced Comment Exploration
-
Fetch Post with All Comments:
Get all comments for LinkedIn post URN 7169084130104737792
-
Search Comments:
Search all comments for the keyword "AI" and show engagement metrics
-
Explore Comment Engagement:
Show me comment insights including top commenters and most liked comments
Data Filtering and Discovery
-
Filter by Date:
Show me posts from January 2024 to March 2024
-
Get Comment Insights:
Explore comment engagement patterns for post 7169084130104737792
š§ Available Tools
Core Post Tools
Tool | Description |
---|---|
fetch_and_save_linkedin_posts | Fetch posts from any LinkedIn username |
get_saved_posts | Retrieve saved posts with pagination |
search_posts | Search posts by keywords |
get_top_posts | Get highest performing posts |
get_posts_by_date | Filter posts by date range |
Comment Exploration Tools (New!)
Tool | Description |
---|---|
fetch_post_with_comments | Get complete post with all comments |
fetch_post_comments_paginated | Load comments with pagination support |
get_saved_posts_with_comments | Retrieve posts with comment data |
get_saved_paginated_comments | Access specific comment pages |
search_comments | Search through all comment text |
get_top_commented_posts | Find most discussed posts |
get_comment_analytics | Comprehensive comment engagement insights |
š Project Structure
linkedin-mcp/
āāā main.py # Main MCP server implementation
āāā requirements.txt # Python dependencies
āāā .env # Environment variables (your API key)
āāā README.md # This documentation
āāā linkedin_posts.json # Saved posts data
āāā linkedin_posts_with_comments.json # Posts with complete comment threads
āāā linkedin_comments_paginated_*.json # Individual paginated comment files
š Data Files Explained
linkedin_posts.json
: Basic post data without commentslinkedin_posts_with_comments.json
: Complete posts with all associated commentslinkedin_comments_paginated_*.json
: Individual files for each post's paginated comments
šØ Troubleshooting
Common Issues
-
"MCP server not found":
- Check that the path in
claude_desktop_config.json
is correct - Ensure
main.py
exists at the specified location - Restart Claude Desktop after config changes
- Check that the path in
-
"API key error":
- Verify your RapidAPI key is correct in the
.env
file - Check that you're subscribed to the LinkedIn Data API on RapidAPI
- Ensure the
.env
file is in the same directory asmain.py
- Verify your RapidAPI key is correct in the
-
"No data found" errors:
- Fetch posts first using
fetch_and_save_linkedin_posts
- Check that JSON files are being created in the project directory
- Fetch posts first using
Getting Help
If you encounter issues:
- Check the file paths in your configuration
- Verify your API key is working on RapidAPI
- Ensure all dependencies are installed
- Restart Claude Desktop after making changes
š Privacy & Ethics
- This tool only accesses public LinkedIn data
- Always respect LinkedIn's terms of service
- Use responsibly and don't overwhelm the API with excessive requests
- Be mindful of privacy when exploring others' content
š¤ Contributing
Contributions are welcome! Here's how:
- Fork the Repository
- Create a Feature Branch:
git checkout -b feature/amazing-feature
- Commit Changes:
git commit -m 'Add amazing feature'
- Push to Branch:
git push origin feature/amazing-feature
- Open Pull Request
š License
This project is licensed under the MIT License - see the file for details.
šØāš» Author
Thang Doan - Email
š Acknowledgments
- rugvedp - for the original LinkedIn MCP implementation and foundation š«”
- RapidAPI - Providing reliable LinkedIn data access
- Anthropic - Claude AI platform and MCP framework
š API Integration Details
This project integrates with the following RapidAPI endpoints:
Primary Endpoints
GET /get-profile-posts
: Fetch posts from LinkedIn profilesGET /get-profile-post-and-comments
: Get complete post with all commentsGET /get-profile-posts-comments
: Paginated comment loading
API Configuration
- Base URL:
https://linkedin-data-api.p.rapidapi.com
- Required Headers:
x-rapidapi-key
: Your RapidAPI keyx-rapidapi-host
:linkedin-data-api.p.rapidapi.com