nielsbosma/LinkedIn-Mcp
If you are the rightful owner of LinkedIn-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 dayong@mcphub.com.
The LinkedIn MCP Server is a tool designed to fetch LinkedIn profiles and return the data in a structured YAML format, leveraging the Model Context Protocol (MCP) for seamless integration.
LinkedIn MCP Server
A Model Context Protocol (MCP) server for fetching LinkedIn profiles. Returns profile data in YAML format.
Prerequisites
- .NET 9.0 or later
- An Apify API token (Get one here)
Installation
Install the tool globally using dotnet:
dotnet tool install --global Linkedin.Mcp
Configuration
1. Set up your Apify API token
The tool requires the APIFY_TOKEN environment variable to be set.
Windows (PowerShell):
$env:APIFY_TOKEN = "your-apify-token-here"
# To persist across sessions:
[System.Environment]::SetEnvironmentVariable('APIFY_TOKEN', 'your-apify-token-here', 'User')
Linux/macOS:
export APIFY_TOKEN=your-apify-token-here
# To persist, add to ~/.bashrc or ~/.zshrc:
echo 'export APIFY_TOKEN=your-apify-token-here' >> ~/.bashrc
2. Configure Claude Code
Add the MCP server to your Claude Code configuration file.
Location:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp",
"env": {
"APIFY_TOKEN": "your-apify-token-here"
}
}
}
}
Alternatively, if you've set the environment variable globally, you can omit the env section:
{
"mcpServers": {
"linkedin": {
"command": "linkedin-mcp"
}
}
}
Usage in Claude Code
Once configured, restart Claude Code. The LinkedIn MCP server will be available with the following tool:
fetch-profile
Fetches a LinkedIn profile and returns it in YAML format.
Parameters:
profile_url(required): The LinkedIn profile URLinclude(optional): Array of optional sections to include in the output. If not specified, all sections are included.
Available optional sections:
experiences- Work experience historyupdates- Recent activity and postsprofilePicAllDimensions- All profile picture dimensionsskills- Skills and endorsementseducations- Educational backgroundlicenseAndCertificates- Professional certificationshonorsAndAwards- Honors and awardslanguages- Language proficienciesvolunteerAndAwards- Volunteer workverifications- Profile verificationspromos- Promotional contenthighlights- Profile highlightsprojects- Projectspublications- Publicationspatents- Patentscourses- CoursestestScores- Test scoresorganizations- OrganizationsvolunteerCauses- Volunteer causesinterests- Interestsrecommendations- Recommendations
Note: Basic profile fields (name, headline, location, summary, etc.) are always included regardless of the include parameter.
Example prompts:
- "Fetch the LinkedIn profile for https://www.linkedin.com/in/username"
- "Get me the profile information for this LinkedIn URL: https://www.linkedin.com/in/username"
- "Show me the work experience from https://www.linkedin.com/in/username"
- "Fetch the profile but only include experiences and skills sections"
- "Get the profile with just educations and certifications"
Supported URL formats:
https://www.linkedin.com/in/usernamehttps://linkedin.com/in/usernamehttp://www.linkedin.com/in/usernamelinkedin.com/in/username